Skip to main content
EnglandComputer ScienceSyllabus dot point

What number bases do computers use and how do we convert between them?

Understand the decimal, binary and hexadecimal number systems, why computers use binary and hexadecimal, and how to convert between the three bases.

A focused answer to AQA A-Level Computer Science 4.5.1, covering the decimal, binary and hexadecimal number systems, why computers use binary and hexadecimal, and how to convert between the three bases.

Generated by Claude Opus 4.88 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The three number systems
  3. Why binary and hexadecimal
  4. Converting between bases

What this dot point is asking

AQA wants you to describe the decimal, binary and hexadecimal number systems, explain why computers use binary and why hexadecimal is convenient, and convert numbers between the three bases reliably under exam time.

The three number systems

A positional number system gives each column a weight equal to a power of the base. In binary the column weights from the right are 1,2,4,8,16,32,64,1281, 2, 4, 8, 16, 32, 64, 128 and so on, each double the one before. In hexadecimal the weights are 1,16,256,40961, 16, 256, 4096. The same idea (digit times place value, summed) recovers the denary value in any base, which is the single rule that underpins every conversion you will be asked to do.

Why binary and hexadecimal

Hexadecimal does not change how the machine stores data; the hardware is still binary. Hex is purely a notation that programmers and the exam use because it compresses binary by a factor of four without any awkward arithmetic, since the base is a power of two.

Converting between bases

Binary to decimal: write the place values above the bits and add the values where there is a 1. So 10112=8+0+2+1=11101011_2 = 8 + 0 + 2 + 1 = 11_{10}.

Decimal to binary: repeatedly divide by 2, recording remainders, then read the remainders from bottom to top. So 13Γ·213 \div 2 gives quotient 6 remainder 1, then 3 r 0, then 1 r 1, then 0 r 1, read upward as 110121101_2. An equivalent method is place-value subtraction: take out the largest power of two that fits, set that bit, and repeat with the remainder.

Binary and hexadecimal: split the binary into groups of four bits from the right (pad the left with zeros if needed) and convert each group to one hex digit. So 1011 11102=BE161011\,1110_2 = \text{BE}_{16}, and each hex digit expands back to four bits. Hexadecimal to decimal multiplies each digit by its power of 16: 2F16=2Γ—16+15=4710\text{2F}_{16} = 2 \times 16 + 15 = 47_{10}.

Exam-style practice questions

Practice questions written in the style of AQA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

AQA 20194 marksConvert the denary number 217 into binary and then into hexadecimal. Show your working.
Show worked answer β†’

Work in 8 bits with place values 128,64,32,16,8,4,2,1128, 64, 32, 16, 8, 4, 2, 1.

Denary to binary by subtraction: 217βˆ’128=89217 - 128 = 89 (set the 128 bit), 89βˆ’64=2589 - 64 = 25 (set 64), 25βˆ’16=925 - 16 = 9 (set 16), 9βˆ’8=19 - 8 = 1 (set 8), 1βˆ’1=01 - 1 = 0 (set 1). The set columns are 128,64,16,8,1128, 64, 16, 8, 1, giving 1101 100121101\,1001_2.

Binary to hex by grouping in fours from the right: 1101=D1101 = \text{D} and 1001=91001 = 9, so 21710=D916217_{10} = \text{D9}_{16}.

Markers award method marks for the place-value subtraction and the grouping into nibbles, then accuracy marks for 1101 100121101\,1001_2 and D916\text{D9}_{16}. A single arithmetic slip that is carried correctly still earns method marks.

AQA 20212 marksExplain why hexadecimal is commonly used as a shorthand for binary in computing.
Show worked answer β†’

Each hexadecimal digit maps to exactly four binary digits (a nibble), because 16=2416 = 2^4. This means a long string of bits can be written compactly: one byte is two hex digits rather than eight ones and zeros.

Markers reward the precise reason (one hex digit equals four bits) plus a consequence such as fewer transcription errors or easier reading of memory addresses and colour codes. A vague answer ("it is shorter") without the four-bit relationship earns only one mark.

Related dot points

Sources & how we know this