Skip to content
VirtusAcademy

Converting Between Binary and Hexadecimal

FoundationHigherAQA

Master Converting Between Binary and Hexadecimal for GCSE Computer Science with this free worksheet and full mark scheme — Foundation and Higher exam-style questions with worked answers for AQA GCSE Computer Science (8525). Each hexadecimal digit represents exactly four binary bits (a nibble), making conversion quick.

Free downloads

These worksheets and mark schemes are original, written for Virtus Academy and checked against the current AQA specification. Every worksheet comes with a full mark scheme.

Topic overview

Converting between binary and hexadecimal is straightforward because one hex digit corresponds to exactly four binary digits.

To convert binary to hex, split the binary into groups of four starting from the right, then convert each group separately. If the leftmost group is short, pad it with leading zeros. So 11010110 splits into 1101 and 0110, which are 13 and 6, giving D6.

To convert hex to binary, replace each hex digit with its four-bit pattern. So 2F becomes 0010 for the 2 and 1111 for the F, giving 00101111. Grouping from the right rather than the left is essential — grouping from the left gives a completely wrong answer whenever the digit count is not a multiple of four.

Revision notes

Binary to hexadecimal

Split the binary into groups of four starting FROM THE RIGHT.

Pad the leftmost group with leading zeros if it is short. Convert each group to a single hex digit. 11010110 gives 1101 = 13 = D and 0110 = 6, so the answer is D6.

Hexadecimal to binary

Replace each hex digit with its four-bit binary pattern.

2F gives 0010 for 2 and 1111 for F, so the result is 00101111. Each hex digit always produces exactly four bits, including leading zeros.

Why group from the right

The rightmost bits are the smallest place values, so grouping must start there.

Grouping from the left shifts every place value when the digit count is not a multiple of four, giving a completely wrong answer.

Key points

  • One hex digit equals four binary digits.
  • Split binary into groups of four from the right.
  • Pad the leftmost group with leading zeros.
  • Convert each group separately.
  • Replace each hex digit with four bits.
  • Always group from the right, never the left.

Worked examples

Example 1

Convert the binary number 11010110 to hexadecimal. [3 marks]

Working

Split into groups of four from the right: 1101 and 0110group the binary digits
1101 = 13 = D, and 0110 = 6convert each group to a hex digit
The answer is D6combine the hex digits

Example 2

Convert the hexadecimal number 2F to binary. [3 marks]

Working

2 in binary is 0010convert the first hex digit to four bits
F is 15, which in binary is 1111convert the second hex digit to four bits
Combined: 00101111join the two groups

Example 3

Explain why binary digits are grouped from the right when converting to hexadecimal. [2 marks]

Working

The rightmost bits carry the smallest place values, so grouping must start therestate the reason
Grouping from the left would shift every place value when the digit count is not a multiple of fourexplain the consequence

Common mistakes

  • Grouping from the left.

    Always group from the right, padding the left with zeros.

  • Dropping leading zeros within a group.

    Each hex digit produces exactly four bits, including leading zeros.

  • Forgetting the letter values.

    A is 10 through F is 15.

  • Converting the whole binary number at once.

    Convert each group of four separately.

Exam tips

  • Group from the right every time.
  • Pad the leftmost group with zeros.
  • Write each hex digit as exactly four bits.
  • Check by converting back.

Key terms

Nibble
A group of four bits, equal to one hex digit.
Padding
Adding leading zeros to complete a group.
Hexadecimal
Base 16, using 0 to 9 and A to F.
Grouping
Splitting binary into fours from the right.

Written and reviewed against the current AQA specification. Spotted an error? Let us know.