Section 6.8: Bitwise Logical Operations (Frame 1)                     [     ][home][next]
Most computers provide machine instructions to perform AND, OR and NOT on strings of bits. The Boolean operations are applied independently to each bit, which is why they are called bitwise. Below are some examples using 8-bit registers. The C operators for bitwise AND (&), bitwise OR (|) and bitwise NOT (^) are employed.
   10011100     1011100    1011100
 & 01101010   | 0110101   ^
-----------   ---------   --------
   00001000     1111101    0100011