Professional Documents
Culture Documents
Bits
Bit is short for binary digit. Computers represent information using bits. A bit has two possible
values, 0 and 1, which represent a truth value. As customary done, 1 will be used to represent T and 0 will
be used to represent F.
A byte is 8 bits.
A word is 16 bits or 2 bytes.
1 → 1 x 2! = 1 x 128 = 128
0 → 0 x 2" = 0 x 64 = 0
1 → 1 x 2# = 1 x 32 = 32
1 → 1 x 2$ = 1 x 16 = 16
0 → 0 x 2% = 0 x 8 = 0
0 → 0 x 2& = 0 x 4 = 0
0 → 0 x 2' = 0 x 2 = 0
1 → 1 x 2( = 1 x 1 = 1
The bitwise OR, bitwise AND, and bitwise XOR of two strings of the same length are defined as
the strings that have as their bits the connectives OR, AND, and XOR of the corresponding bits in the two
strings respectively.