Number bases (binary, denary, hexadecimal, BCD), two's complement, character sets, bitmap and vector images, and the representation of sound.
Number bases
Computers store everything in binary (base 2), using only the digits 0 and 1. We also use denary (base 10) for humans and hexadecimal (base 16) as a compact way of writing binary — each hex digit represents exactly four bits (a nibble).
| Denary | Binary (4 bit) | Hex |
|---|---|---|
| 0 | 0000 | 0 |
| 5 | 0101 | 5 |
| 10 | 1010 | A |
| 15 | 1111 | F |
To convert binary → denary, add the place values where a 1 appears. For an 8-bit number the place values are 128 64 32 16 8 4 2 1. For example 01001011 = 64 + 8 + 2 + 1 = 75.
To convert denary → binary, repeatedly subtract the largest place value that fits, or repeatedly divide by 2 and read the remainders bottom-up.
To convert binary → hex, split into nibbles from the right and write each as one hex digit: 1011 0110 = B6. To convert hex → denary, multiply each digit by its power of 16: B6 = 11×16 + 6 = 176 + 6 = 182.
Viewing only
This content is free to read on superexams.com and cannot be printed or downloaded.
Read the full note — free
Create a free account to read this note in full. Every free account gets 2 complete revision notes — no card needed.