You may have noticed that
Say
that a number is represented with all ones on the right
and all zeros on the left, like this:
For example,
the equivalent of
Here is another table of bit patterns (regarded as representing positive integers) and their decimal equivalent. See if you can notice something interesting.
Binary | Decimal | Notes |
---|---|---|
0000 0001 | 1 | |
0000 0010 | 2 | 1 × 2 |
0000 0100 | 4 | 2 × 2 |
0000 1000 | 8 | 4 × 2 |
0000 0011 | 3 | |
0000 0110 | 6 | 3 × 2 |
0000 1100 | 12 | 6 × 2 |
0001 1000 | 24 | 12 × 2 |
0000 0111 | 7 | |
0000 1110 | 14 | 7 × 2 |
0001 1100 | 28 | 14 × 2 |
0011 0000 | 56 | 28 × 2 |
The bit pattern 0011 0010 represents 5010. What bit pattern represents 10010?