GCSE Computer Science

Binary and hexadecimal โ€” GCSE Computer Science

Why computers use binary

Computers store everything as binary โ€” sequences of 1s and 0s. Not because it's elegant, but because it maps directly to physical reality: a switch is either on or off, a transistor is either conducting or not. Binary isn't a convention. It's a consequence of how the hardware works.

GCSE Computer Science expects you to convert between binary, denary, and hexadecimal โ€” and to understand why each one exists.

Binary โ€” base 2

Each binary digit is a bit. Eight bits make a byte. Each bit has a place value โ€” 128, 64, 32, 16, 8, 4, 2, 1 โ€” and the value of the number is the sum of all the place values where the bit is 1.

128  64  32  16   8   4   2   1
  0   1   0   0   1   1   0   1  =  77

64 + 8 + 4 + 1 = 77. That's all binary conversion is โ€” adding up the place values of the bits that are switched on.

Hexadecimal โ€” base 16

Hexadecimal uses 16 digits: 0โ€“9, then Aโ€“F. A is 10, B is 11, up to F which is 15. Each hex digit represents exactly four binary bits โ€” which is why hex is used as a shorthand for binary. Two hex digits represent one byte.

Binary:  0100  1101
Hex:        4     D  =  4D

Converting between them

Denary to binary: find the largest place value that fits, subtract it, repeat.

Binary to hex: split into groups of four bits, convert each group.

Hex to denary: multiply each digit by its place value (16ยน, 16โฐ) and add.

The interactive tool below lets you type any value and watch the conversion happen in real time. The relationship between the columns becomes intuitive faster than any written explanation can make it.

What examiners actually test

Conversion questions are almost always worth straightforward marks โ€” if you know the method, you get the marks. The most common mistakes are getting the place values wrong, forgetting that hex goes Aโ€“F, and losing track of which direction the conversion is going. Practice with the tool until the place values are automatic.

Want structured Python lessons? Python Coach covers 27 lessons and 195 challenges โ€” free 60 teaching day trial.

Start learning →