Number Systems · Cambridge syllabus 1.1 · Lesson 1 of 5
Binary, Denary and Hexadecimal
A number’s base determines its place values. Binary uses 0 and 1 with powers of two; denary uses ten digits; hexadecimal uses 0–9 and A–F. Digital circuits reliably distinguish two states, so binary is a practical representation rather than a special kind of information.
By the end, you can
- Understand how and why computers use binary to represent all data: data must be converted to binary to be processed, is processed by logic gates and is stored in registers.
- Understand denary as base 10.
- Understand binary as base 2.
- Understand hexadecimal as base 16.
- Recognise the digits used in each number system.
- Convert positive denary integers to binary.
- Convert positive binary integers to denary.
- Convert positive denary integers to hexadecimal.
- Convert positive hexadecimal integers to denary.
- Convert positive hexadecimal values to binary.
- Convert positive binary values to hexadecimal.
Number systems
A number system is defined by how many digits it uses, and that count is its base. Denary, the everyday system, uses ten digits and so has base 10. Binary uses only 0 and 1, so base 2. Hexadecimal uses sixteen digits — 0 to 9 and then A to F standing for 10 to 15 — so base 16.
Computers use binary because their components have two reliable states: a switch on or off, a voltage high or low, a region magnetised one way or the other. Building hardware that distinguishes ten different voltage levels reliably would be far harder, and any noise would corrupt it. Two states is the simplest thing that can carry information.
So any form of data — a number, a letter, a sound, a picture — must be converted to binary before a computer can process it. The processing is done by logic gates, tiny circuits that each take binary inputs and give a binary output, and while the data is being worked on it is stored in registers, small stores of binary inside the processor. Nothing inside the computer is ever held as denary or as text.
In every system the column values are powers of the base. In denary the columns are 1, 10, 100; in binary they are 1, 2, 4, 8, 16 and so on, doubling each time; in hexadecimal they are 1, 16, 256.
A single binary digit is a bit, and eight bits are a byte. Four bits — half a byte — is a nibble, which matters because a nibble is exactly one hexadecimal digit.
Worth remembering
- Binary base 2, denary base 10, hexadecimal base 16 with A to F for 10 to 15.
- Computers use binary because components have two reliable states.
- All data is converted to binary, processed by logic gates and stored in registers.
- 8 bits = 1 byte; 4 bits = 1 nibble = 1 hex digit.
Converting between number systems
Binary to denary: write the place values above the digits and add the ones where a 1 appears. For 01011010 the columns holding a 1 are 64, 16, 8 and 2, so the number is 90.
Denary to binary: work from the largest place value down, asking whether it fits. For 90, 128 does not fit so write 0; 64 fits leaving 26, so write 1; 32 does not fit; 16 fits leaving 10; 8 fits leaving 2; 4 does not; 2 fits leaving 0; 1 does not. That gives 01011010. Checking by converting back takes seconds and catches most errors.
Binary to hexadecimal: split into groups of four from the right and convert each group. 10110110 becomes 1011 and 0110, which are 11 and 6, so B6. Going the other way, expand each hex digit into four bits — and keep the leading zeros, because dropping them misaligns everything.
Hexadecimal to denary goes through the place values 16 and 1: B6 is 11 × 16 + 6 = 182. Or convert to binary first and add the place values, which avoids the multiplication.
Worth remembering
- Binary to denary: add the place values where a 1 appears.
- Denary to binary: work down from the largest place value that fits.
- Binary to hex: group in fours from the right, keeping leading zeros.
Worked example
101101₂ = 32 + 8 + 4 + 1 = 45₁₀. Split 0010 1101₂ into nibbles: 2 and D, giving 2D₁₆.
Practice
Warm-up · not marked
Check your understanding
Answer in your own words, then compare with the worked answer. Nothing here is saved or scored.
Worked answer
128 + 64 + 8 + 2 = 202. The nibbles 1100 and 1010 give CA₁₆.
Check your method, units and explanation against it.
Marked practice
Could not load practice questions. Please try again.