Why is hexadecimal used, and how do you convert between hexadecimal and binary?
Understand why hexadecimal notation is used and convert between hexadecimal and binary.
A focused answer to Edexcel GCSE Computer Science 2.1.6, covering why hexadecimal notation is used as a shorthand for binary and how to convert between hexadecimal, binary and denary.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
Edexcel wants you to explain why hexadecimal (base 16) is used in computing, and to convert between hexadecimal and binary (and to and from denary) confidently, using the fact that one hex digit equals exactly four bits.
Why hexadecimal is used
The single biggest reason Edexcel rewards is readability with fewer errors. Compare the binary with its hex form : eight characters become two, so the hex is far quicker to read and far easier to copy without slipping a digit. A single mistyped bit in a long binary string is easy to miss, whereas a two-character hex value is checked at a glance, which is why technical documentation and tools display values in hex.
Hexadecimal is common wherever raw binary would be unwieldy. Colour codes in web design use it (for example #FF8800, where each pair of hex digits is the red, green and blue intensity from 0 to 255). Memory addresses are written in hex because they are long binary values. Machine-code and error dumps are shown in hex so a programmer can read them. In every case it is not that the computer uses hex internally (it still stores binary); hex is purely a convenient notation for people.
The hex-binary relationship
The conversion table for one nibble is worth knowing by heart: , , ..., , , , , , , .
Converting binary to hexadecimal
Converting to and from denary
To convert hex to denary, multiply the left digit by 16 and add the right digit (for two-digit hex): . To convert denary to hex, the easiest route at GCSE is via binary: write the denary number in binary, then group into nibbles. For example , which splits into and , giving . Going through binary avoids errors and uses the four-bits-per-digit rule you already know.
Try this
Q1. Convert the hexadecimal value to denary. [2 marks]
- Cue. .
Q2. Convert the binary number to hexadecimal. [2 marks]
- Cue. and , so .
Exam-style practice questions
Practice questions written in the style of Pearson Edexcel exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Edexcel 20232 marksConvert the binary number 11010110 into hexadecimal. Show your working.Show worked answer →
Split the 8-bit number into two 4-bit nibbles and convert each to a hex digit.
and . So in hexadecimal.
Markers reward splitting into nibbles, converting each nibble correctly (1101 to D, 0110 to 6), and writing the two hex digits in the right order. The denary check is .
Edexcel 20223 marksExplain one reason why hexadecimal is used to represent binary values, and convert the hexadecimal value 2F into binary.Show worked answer →
Hexadecimal is used because it is a shorter, more readable shorthand for binary: one hex digit represents exactly four bits, so a long binary string becomes far fewer characters, which is easier for people to read and write and less error-prone.
To convert 2F: and , so .
Markers reward a valid reason (more compact or readable, fewer errors than long binary), and converting each hex digit to its 4-bit group in the correct order.
Related dot points
- Understand that computers use binary to represent data (numbers, text, sound, graphics) and program instructions, and determine the maximum number of states that can be represented by a binary pattern of a given length.
A focused answer to Edexcel GCSE Computer Science 2.1.1, covering why computers use binary to represent all data and instructions, and how to calculate the maximum number of states a binary pattern of a given length can represent.
- Understand how computers represent and manipulate unsigned integers and two's complement signed integers, and convert between denary and 8-bit binary numbers (0 to 255, and -128 to +127).
A focused answer to Edexcel GCSE Computer Science 2.1.2 and 2.1.3, covering unsigned and two's complement signed integers and converting between denary and 8-bit binary (0 to 255 and -128 to +127).
- Add together two positive binary patterns, apply logical and arithmetic binary shifts, and understand the concept of overflow in relation to the number of bits available to store a value.
A focused answer to Edexcel GCSE Computer Science 2.1.4 and 2.1.5, covering binary addition of two positive patterns, logical and arithmetic binary shifts, and the concept of overflow when a result needs more bits than are available.
- Understand that data storage is measured in binary multiples (bit, nibble, byte, kibibyte, mebibyte, gibibyte, tebibyte), construct expressions to calculate file sizes and data capacity, and understand the need for and methods of compression (lossless, lossy).
A focused answer to Edexcel GCSE Computer Science 2.3.1 and 2.3.2, covering the binary storage multiples (bit, nibble, byte, kibibyte up to tebibyte), file-size and capacity calculations, and lossy and lossless compression.
- Understand how computers encode characters using 7-bit ASCII.
A focused answer to Edexcel GCSE Computer Science 2.2.1, covering how computers encode characters using a character set, the 7-bit ASCII system, its 128 codes, and the ordering of letters and digits.
Sources & how we know this
- Pearson Edexcel GCSE (9-1) Computer Science (1CP2) specification — Pearson (2020)