Computers use the binary number system โ also called Base 2. Unlike our everyday decimal system (Base 10) which uses digits 0โ9, binary only uses two digits: 0 and 1.
Each binary digit is called a bit. A group of 8 bits is called a byte.
When asked "why do computers use binary?", always mention that electronic components have two states โ on and off โ which map directly to 1 and 0.
Each position in a binary number has a place value โ a power of 2. Starting from the right:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 2โท | 2โถ | 2โต | 2โด | 2ยณ | 2ยฒ | 2ยน | 2โฐ |
To convert binary to denary (decimal), add up the place values where there is a 1.
Example: Convert 10110101 to denary
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
128 + 32 + 16 + 4 + 1 = 181
Always show your working in the exam โ write out the place value table and circle the 1s. Even if your final answer is wrong, you can still gain method marks.
To convert a denary number to binary, work from the largest place value downwards. Ask: "Does this place value fit into the number?"
Example: Convert 75 to binary
128 โ No (75 < 128) โ 0
64 โ Yes (75 โ 64 = 11) โ 1
32 โ No (11 < 32) โ 0
16 โ No (11 < 16) โ 0
8 โ Yes (11 โ 8 = 3) โ 1
4 โ No (3 < 4) โ 0
2 โ Yes (3 โ 2 = 1) โ 1
1 โ Yes (1 โ 1 = 0) โ 1
Result: 01001011
Remember to pad your answer to 8 bits with leading zeros if needed. "1001011" should be written as "01001011".
Binary addition follows four simple rules:
Example: 00110101 + 00011010
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
| 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
Answer: 01001111 = 79 in denary
If your binary addition produces a 9th bit (overflow), note this in your answer โ examiners may specifically ask about overflow errors.
You haven't answered any questions yet.