• Binary math is based on powers of 2, as opposed to powers of 10 for
decimal math.
– Whereas decimal math has a 1s place, 10s place, 100s place, and so forth…
– Binary math has a 1s place, 2s place, 4s place, 8s place, and so forth.
• Given an octet (8 bits), when a bit in the octet is set (1) its value is…
– 128 = left-most bit (most significant bit) = 27
– 64 = next bit = 26
– 32 = next bit = 25
– 16 = next bit = 24
– 8 = next bit = 23
– 4 = next bit = 22
– 2 = next bit = 21
– 1 = right-most bit (least significant bit) = 20
• When a bit in an octet is not set (0) its value is zero.
• The decimal value of an octet is the sum of each set bit’s value.
– 11000000 = 128 + 64 = 192
– 10101000 = 128 + 32 + 8 = 168
– 11111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255