Binary and Bit Patterns
Why Computers Use Binary
Computers are built from transistors, electronic switches that have exactly two states:
- On (high voltage) → represented as 1
- Off (low voltage) → represented as 0
Because hardware can only reliably represent two states, binary (base-2) is the natural number system for digital computers. All data, numbers, text, images, sound, is ultimately stored and processed as binary.
Bits and Bytes
| Unit | Definition |
|---|---|
| Bit | A single binary digit: either 0 or 1 |
| Nibble | 4 bits |
| Byte | 8 bits |
A byte can represent:
- A number (0-255)
- A character (see Character Sets)
- Part of an image or sound file
States and Combinations
With n bits, you can represent 2ⁿ different states (combinations):
| Bits | 2ⁿ Values | Range |
|---|---|---|
| 1 | 2 | 0-1 |
| 2 | 4 | 0-3 |
| 3 | 8 | 0-7 |
| 4 (nibble) | 16 | 0-15 |
| 7 | 128 | 0-127 |
| 8 (byte) | 256 | 0-255 |
| 16 | 65,536 | 0-65,535 |
| 24 | 16,777,216 | 0-16,777,215 |
Bit Patterns
A bit pattern is a string of bits. The meaning of a bit pattern depends entirely on context and interpretation:
The same bit pattern 01000001 could mean… |
|---|
| The number 65 (unsigned integer) |
| The character ‘A’ (ASCII encoding) |
| Part of a pixel colour in an image |
| An instruction code for the CPU |
The hardware stores only 0s and 1s, the software layer determines what they represent.
Exam Questions
Q: Explain why computers use binary to store data.
Computers are built from transistors which have two stable states, on and off. Binary uses only two digits (0 and 1) to represent these states, making it the natural and reliable number system for digital hardware.
Q: How many different values can be represented with 8 bits?
2⁸ = 256 different values.
Q: What is a bit pattern?
A string of binary digits (bits) whose meaning depends on context, the same pattern can represent a number, a character, part of an image, or an instruction depending on how it is interpreted.
Exam Tip
Always state that the meaning of a bit pattern is determined by context, this is a key point examiners look for.