A bit is the most basic part of memory.
Four bits makes a nibble. By combining the digits of 0 and 1, you can create 16 unique values ranging from 0000 to 1111.
Each bit in a nibble represents a power of 2. The left-most digit is 2³ (8), the second-to-left is 2² (4), then the second-to-last is 2¹ (2), then the right-most digit being 2⁰ (1).
Each bit in a nibble represents a power of 2 as you can see in this chart. Notw that the "Bit Column" represents a digit position couting upwards from the right end of the byte towards the left.
| Bit Column | Power of 2 | Hex Value | Decimal Value |
|---|---|---|---|
| 0 | 2⁰ | 1 | 1 |
| 1 | 2¹ | 2 | 2 |
| 2 | 2² | 4 | 4 |
| 3 | 2³ | 8 | 8 |
To represent, for example, a number 9, you would need a nibble of 1001, with the left-most digit being 8 and the right-most digit being 1, so 8 + 1 = 9.
To represent, for example, a number 12, you would need a nibble of 1100, with the left-most digit being 8 and the next-to-left-most digit being 4, so 8 + 4 = 12. 12 in decimal is also the hexadecimal digit of C, in fact, the complete range of hexadecimal digits are represented by a nibble.
| Bits | Decimal Value | Hexadecimal Value |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | 10 | A |
| 1011 | 11 | B |
| 1100 | 12 | C |
| 1101 | 13 | D |
| 1110 | 14 | E |
| 1111 | 15 | F |
© 1995-2026. davesfunstuff.com. All Rights Reserved. Reproduction of any part of this website without expressed written consent is prohibited.