1. Bitwise operations are similar to Boolean logic operations except that they work on individual bits in a byte rather than on whole codes or characters
2. The application and use of bitwise manipulation and masks include:
3. Bitwise Operations are faster and closer to the system and sometimes are able to really help with program optimisation.
4. Identify the process using logical operators to normalise a floating point number
5. Interrupts from various sources are stored as bits in a binary value. How can logical operations be used to identify whether a specific interrupt has been generated?
6. The image below shows a list of the bitwise operators. What does the bitwise AND operator do?
7. Bitwise operators can check the status of 'flags'. A flag is simply an indicator of whether something is ____________ or is used to indicate whether something has happened or not
8. We can use bitwise operators to perform some Maths tasks, as SHIFT RIGHT has the effect on a number of _________________
9. SHIFT LEFT has the effect of ______________
10. The 'shifting of bits' is used in the algorithm known as MD5, which is used to verify that a file has not been corrupted
11. Another use of bitwise operators is to quickly clear out a register. This can easily be achieved by ANDing a 16-bit register with ________________
12. A mask is a _________________________, which allows specific bits in a piece of data to be tested or altered.
13. With a single left shift, each bit is moved up one location with the leftmost bit discarded (the MSB) and a _______________________
14. With logical shifts, the sign is always preserved. The sign is never discarded under any circumstances.
15. A popular use of masking is with ________________. The 'subnet mask' extracts the network address of a device from its IP address.
16. If a device has an IP address of 192.168.2.34 and the subnet mask is 255.255.255.0, then applying an 'AND' to these two numbers (in binary) will return:
17. With a circular shift, the MSB is copied into the LSB and the bit is then multiplied by 10.
18. An OR bit set is useful to set a bit within a word or byte without regard to the other bits.
19. If a programmer has stored 8 independent flags in a byte, 1001 0000 and wants to set the 2nd and 3rd bits from the left. He could apply:
20. The Binary XOR: copies the bit if it is set in one operand but not both
21. Bitwise operators operate on numbers (normally), but instead of treating that number as if it were a single value, they treat it as if it were ______________________
22. Create a mask to reverse the first four bits of a value, leaving the last four bits in their original state. State which logical operation is required.
23. Identify the process using logical operators to create a two’s complement of a binary value.
24. What is this describing? "Mask with 01000… using AND to see if second digit is 1. Shift left 1 if not the case and repeat until it is"