10011100 1011100 1011100 & 01101010 | 0110101 ^ ----------- --------- -------- 00001000 1111101 0100011
Oftentimes these bitwise operations are used for data manipulation tasks that are only remotely connected to logic. AND is often used as a mask or filter, only allowing bits whose positions are 1s in the other operand to be viewed. OR is often used as a collector of bits to combine several different data bits into one mask. NOT is used to compute the 1's complement.
Performing the OR of a string of bits is harder. One could logically shift the value and OR together all of the bits as they pass through the MSB, which is the N bit. Another way is to simply ask if the decimal value of the bit string is 0. If it is then there are no 1s anywhere in it. If it is not 0, then there is at least one 1. AND of a string of bits is similar. If the string is -1 (all 1s) in 2's complement then the AND of this string is 1. But if it is any other value, the AND is 0, since there is at least one 0.