Binary & Hexadecimal Explained Simply
If you have just started learning Computer Science, Binary can look strange at first. A page full of 1s and 0s does not immediately feel like a number system. It can look more like a secret code.
Many students ask the same questions: Why do computers use Binary? Why do we need Hexadecimal? Why can't computers just use the normal numbers we use every day?
Those are good questions. In this FutureLogic lesson, we are going to answer them properly. We will not just memorise methods. We will understand why they work.
Before we begin...
If Binary feels confusing at first, that does not mean you are bad at Computer Science. It usually means you have been shown the method before you understood the reason behind it.
This lesson is designed to build confidence first. We will start with the idea, then move into the method, then practise the exam skills.
By the end of this lesson, you will be able to:
Why students find Binary difficult
Most students do not struggle with Binary because it is too hard. They struggle because they are often asked to convert numbers before anyone has explained why Binary exists.
That is the wrong order. If you start with a table of place values, Binary feels like something to memorise. If you start with the computer hardware, Binary begins to make sense.
Why do computers use Binary?
Imagine a simple light switch. It has only two reliable positions:
- OFF
- ON
Now imagine shrinking that switch until billions of them can fit inside a tiny computer chip. Those tiny electronic switches are called transistors.
A transistor can be thought of as having two reliable electrical states. Engineers represent those two states using the digits 0 and 1.
| Electrical State | Binary Value |
|---|---|
| OFF | 0 |
| ON | 1 |
This is why Binary is a base-2 number system. It only uses two digits: 0 and 1. Your revision notes summarise this clearly: electronic circuits have two states, ON and OFF, represented by 1 and 0.
Check Your Understanding 1
- What are the two digits used in Binary?
- What do ON and OFF represent?
- Why is Binary suitable for electronic circuits?
Check the answer
Binary uses 0 and 1. These match the two reliable electronic states of a circuit: OFF and ON.
What are Binary place values?
In Denary, the number system we normally use, each column is worth ten times more as you move left. That is why we have ones, tens, hundreds and thousands.
Binary works in a similar way, but because it is base-2, each column is worth two times more as you move left.
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 2โท | 2โถ | 2โต | 2โด | 2ยณ | 2ยฒ | 2ยน | 2โฐ |
The key place values for an 8-bit binary number are:
These are the values you should write above every 8-bit binary number before converting. Your revision notes give exactly the same exam warning: do not try to do the place values in your head.
Binary to Denary: how to convert
To convert Binary to Denary, look at each column. If the bit is 1, include that place value. If the bit is 0, ignore that place value.
Worked example: Convert 01010101 to Denary
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
| โ | 64 | โ | 16 | โ | 4 | โ | 1 |
So:
The small โ means Binary. The small โโ means Denary. You do not always need to write those small base numbers in your exam answer, but they are useful while learning.
Check Your Understanding 2
Convert 10101010 into Denary.
Hint: Add the active place values where the bit is 1.
Check the answer
10101010 = 128 + 32 + 8 + 2 = 170.
Denary to Binary: how to convert
Converting Denary to Binary works in the opposite direction. Start with the largest place value on the left and ask one question each time:
If it fits, write 1 and subtract it. If it does not fit, write 0 and move to the next place value.
Worked example: Convert 45 to Binary
| Place Value | Fits into 45? | Bit | Remainder |
|---|---|---|---|
| 128 | No | 0 | 45 |
| 64 | No | 0 | 45 |
| 32 | Yes | 1 | 13 |
| 16 | No | 0 | 13 |
| 8 | Yes | 1 | 5 |
| 4 | Yes | 1 | 1 |
| 2 | No | 0 | 1 |
| 1 | Yes | 1 | 0 |
Reading the bits from top to bottom gives:
The leading zeros matter. In an 8-bit answer, 00101101 is better than just writing 101101, because it shows the complete 8-bit pattern.
What is Hexadecimal?
Hexadecimal is a base-16 number system. That means it uses sixteen symbols instead of two or ten.
The symbols are:
The letters represent the values from 10 to 15.
| Denary | Hex | Binary | Denary | Hex | Binary |
|---|---|---|---|---|---|
| 0 | 0 | 0000 | 8 | 8 | 1000 |
| 1 | 1 | 0001 | 9 | 9 | 1001 |
| 2 | 2 | 0010 | 10 | A | 1010 |
| 3 | 3 | 0011 | 11 | B | 1011 |
| 4 | 4 | 0100 | 12 | C | 1100 |
| 5 | 5 | 0101 | 13 | D | 1101 |
| 6 | 6 | 0110 | 14 | E | 1110 |
| 7 | 7 | 0111 | 15 | F | 1111 |
Why is Hexadecimal used?
Computers use Binary, but long Binary numbers are difficult for humans to read. Hexadecimal makes Binary shorter and easier to work with.
The important fact is this:
Four bits are called a nibble. This makes conversion between Binary and Hexadecimal very neat.
| Reason | Explanation |
|---|---|
| Shorter than binary | 8 binary bits can be written as 2 hexadecimal digits. |
| Easier to read | FF is easier for humans to check than 11111111. |
| Easy to convert | Split Binary into groups of 4 bits and convert each group. |
| Used in computing | Colour codes, memory addresses and MAC addresses often use Hexadecimal. |
Binary to Hexadecimal: how to convert
To convert Binary to Hexadecimal, split the binary number into groups of four bits from the right. Then convert each group into one hexadecimal digit.
Worked example: Convert 11111111 to Hexadecimal
F F
So:
This is why Hexadecimal is useful. Eight binary digits become just two hexadecimal digits.
Worked example: Convert 10100111 to Hexadecimal
A 7
So:
Check Your Understanding 3
- What is hexadecimal A in binary?
- Why is Hexadecimal easier for humans to read than long Binary strings?
- How many bits does one hexadecimal digit represent?
Check the answer
A = 1010. Hexadecimal is shorter and easier to read because each hex digit represents exactly 4 bits.
Binary Addition
Binary addition works column by column, just like Denary addition. The difference is that Binary can only use 0 and 1, so when a column becomes too large, you carry into the next column.
| Sum | Result | Carry |
|---|---|---|
| 0 + 0 | 0 | 0 |
| 0 + 1 | 1 | 0 |
| 1 + 1 | 0 | 1 |
| 1 + 1 + 1 | 1 | 1 |
What is Overflow?
Overflow happens when the result of a binary addition is too large to fit into the number of bits available.
For example, in 8 bits:
The true answer needs 9 bits. But if only 8 bits are available, the extra bit cannot be stored. The stored result becomes:
That is overflow. The result is wrong because the answer did not fit into the available number of bits.
What is Two's Complement?
Two's complement is a method used to represent negative numbers in Binary.
The method has two steps, and the order matters:
- Invert all the bits.
- Add 1.
Worked example: Find the two's complement of 00101101
| Step | Action | Result |
|---|---|---|
| 1 | Invert all bits | 11010010 |
| 2 | Add 1 | 11010011 |
So the two's complement version is:
Exam Focus
In Cambridge IGCSE questions, Binary and Hexadecimal marks often come from accuracy and method. Show your place values, show your carries, split Hexadecimal into groups of four bits, and use the correct order for two's complement.
The method matters. Even if the final answer goes wrong, clear working can still help you gain marks.
Common Exam Mistakes
Write 128 64 32 16 8 4 2 1 above the number before converting.
Write carry digits above the column. A missed carry changes everything to the left.
Pause before calculating and check which number system the question requires.
If the question expects 8 bits, write the full 8-bit answer.
Split Binary into nibbles of 4 from the right.
Always invert first, then add 1.
Examiner Tips
- Show your working. Method marks can still be awarded even if the final answer is wrong.
- Write place values above numbers. It takes seconds and prevents common errors.
- Check carries carefully. A missed carry can ruin the answer.
- Practise conversions regularly. Speed and accuracy come from repetition.
Quick Quiz
- Convert 10101010 into Denary.
- Convert 45 into 8-bit Binary. Show your working.
- What is hexadecimal A in Binary?
- What causes overflow, and how can you detect it?
- Convert 00110011 to its two's complement.
Quick Quiz Answers
- 10101010 = 128 + 32 + 8 + 2 = 170
- 45 = 32 + 8 + 4 + 1 = 00101101
- Hexadecimal A = 1010
- Overflow occurs when the result is too large for the available bits. It can be detected when there is a carry out of the most significant bit.
- Invert: 11001100. Add 1: 11001101
Final Summary
Binary
Base-2. Uses only 0 and 1. Matches ON/OFF electronic states.
Binary โ Denary
Add the place values where a 1 appears.
Denary โ Binary
Subtract place values from left to right. Pad to 8 bits.
Hexadecimal
Base-16. Uses 0โ9 and AโF. One hex digit equals 4 bits.
Binary Addition
1 + 1 gives 0 with a carry of 1.
Overflow
The result is too large for the available number of bits.
Two's Complement
Invert all bits, then add 1. Used for negative numbers.
Exam Success
Show working, write place values and practise little and often.