Learn in your language
Skip to content
A Level · Cambridge (CIE) · 9618

Binary and hexadecimal

Translate between compact hexadecimal notation and bit patterns.

What you will learn

  • Convert binary nibbles to hexadecimal.
  • Check a result using denary place values.

One hex digit represents four bits

Hexadecimal is base 16 and uses digits 0–9 and letters A–F for values 10–15. Four binary bits have 16 possible patterns, so each group maps directly to one hexadecimal digit.

Group bits from the right. Add leading zeros to complete the leftmost group when necessary. Do not add zeros on the right because that changes the value.

Check with place values

Two hexadecimal digits XY represent 16×X+Y. You can compare that denary value with the binary place-value total as an independent check.

If asked for two hexadecimal digits, write the two digits themselves. A prefix such as 0x identifies notation in some programming languages but is not one of the two digits.

A=10, B=11, C=12, D=13, E=14, F=15
Put the idea to work

Worked example

Convert binary 10111100 to hexadecimal.

Show the worked solution
  1. Split into 1011 and 1100.
  2. 1011=11=B and 1100=12=C.
  3. Check: 11×16+12=188, equal to 128+32+16+8+4.

Answer BC

Common mistakes

  • Group from the right rather than making arbitrary groups.
  • The letters represent values above nine, not additional bits.
Recall without your notes

What can you explain now?

Write hexadecimal 3F in eight-bit binary.

Compare with the explanation

00111111

3 maps to 0011 and F to 1111.

After trying it yourself, choose your next review. This is your self-assessment.

Your review choice appears on Today. Sign in to sync it across devices.

Keep learning Computer Science

Course scope and assessment

This pathway maps the 2026 Version 2 and 2027–2029 Version 2 syllabuses, which Cambridge says have no significant changes affecting teaching. It has original teaching and guided, independent and transfer practice for all 20 syllabus sections, with topic links to the official section headings. It is mapped teaching, not proof of exam readiness or an official Cambridge grade. Paper 4 requires complete programs and testing evidence in a programming environment; the current course offers explained code and algorithm practice but does not yet provide a locked-down timed programming-paper environment, full four-paper mocks or human subject-teacher review.

StudyForA · Learn with understanding

Original teaching content and links to official sources. Check your exam year and qualification before using a resource.