Teachers' Portal  /  A-Level Computer Science 9618  /  Information representation  /  Binary, denary, hexadecimal and BCD
Lesson pack · A-Level Computer Science 9618 · 1.1 · AS Level

Binary, denary, hexadecimal and BCD

Same value, new clothes. A pattern of bits means nothing until you know how it is being represented.

Student lesson Lab, full screen
At a glance

The shape of the lesson

Topic
Information representation
Syllabus reference
Cambridge International AS and A Level Computer Science 9618, 1.1
Level
AS Level
Duration
45 minutes, lab-led; stretches to a 60 minute block (see the contingency notes)
Position in topic
Lesson 2 of 7 in Information representation; follows Binary and decimal prefixes; leads into Two's complement and binary arithmetic
Central model
Fig. 1: denary 183 as a binary integer, in hexadecimal, and in BCD
Cooperative structure
Assessment
Stage 1 check and the exam-style plenary from the student lesson, plus the worksheet as the exit task
Learning objectives

By the end of the lesson, learners can

Section by section
  • Binary, denary and hex: Use the lab to flip bits and watch the denary and hex values change together.
  • Binary Coded Decimal: In BCD mode, type a denary number into the lab and see each digit become its own nibble.
  • Where hex and BCD are used: Exam questions ask for practical applications, so learn a reason with each one.
Key points to leave on the board
  • Binary and hex: one hex digit = one nibble; group from the right.
  • Hex to denary: place values 4096, 256, 16, 1.
  • BCD: one nibble per denary digit; 1010 to 1111 are invalid.
  • Uses: BCD for displays and money; hex for memory addresses, dumps, colours and MAC addresses.
The core visual model

One picture every idea returns to

Denary is base 10, binary is base 2 and hexadecimal is base 16 (digits 0 to 9 then A to F). One hex digit is exactly 4 bits, so binary and hex convert a nibble at a time. Binary Coded Decimal (BCD) is different: each denary digit is stored separately in its own 4-bit nibble, so 59 is 0101 1001. Nibbles 1010 to 1111 are never valid in BCD.

one denary value, three representations 183 binary hexadecimal BCD 1011 0111 B7 0001 1000 0011 128+32+16+4+2+1 11 × 16 + 7 1 | 8 | 3, one nibble each
Fig. 1: denary 183 as a binary integer, in hexadecimal, and in BCD
Lesson sequence

Forty-five minutes, phase by phase

TimePhaseWhat happens in the roomGrouping
0 to 5 minHook: predictOpen with the question in the title, Same value, new clothes.. A pattern of bits means nothing until you know how it is being represented. Put the figure on the board: it is the one picture every idea in the lesson returns to.Whole class, then pairs
5 to 13 minTeach and check: Binary, denary and hexUse the lab to flip bits and watch the denary and hex values change together. Project tab 2 of the lab (Binary, denary and hexadecimal) and let a student drive it while the class predicts. Model the worked example Denary to binary and hex on the board, one line at a time. Your turn: Convert 1001 1110 to denary and to hexadecimal.Whole class, then pairs
13 to 21 minTeach and check: Binary Coded DecimalIn BCD mode, type a denary number into the lab and see each digit become its own nibble. Project tab 6 of the lab (Binary Coded Decimal) and let a student drive it while the class predicts. Model the worked example Decode BCD on the board, one line at a time. Your turn: Write 2026 in BCD.Pairs
21 to 30 minTeach and check: Where hex and BCD are usedExam questions ask for practical applications, so learn a reason with each one.Rally Coach
30 to 36 minCheckThe four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong.Individual, then whole class
36 to 43 minPlenaryThe exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording.Individual, random call
43 to 45 minExit and homeworkSet the worksheet below (6 questions, 16 marks). Learners self-assess against the objectives before they leave.Individual
Timing and contingency

Protect the parts that carry the learning

The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.

Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.

Cut first if the build overruns: the last check in Where hex and BCD are used, never the check or the plenary.

In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.

Running the cooperative task

Rally Coach

Pairs share one worksheet. One partner solves the first question aloud while the other coaches, checking each line and offering a prompt rather than the answer; they swap roles for the next question.

The full structure, with its variations and the other twelve, is on the cooperative-learning page.

Examiner traps to pre-empt

What to head off, and how

Trap learners fall intoTeaching move that pre-empts it
Do not convert the whole number to binary and call it BCD.In BCD, 59 is 0101 1001 (5 then 9), but 59 in pure binary is 0011 1011.
Hexadecimal is for humans.The computer never stores or processes hex: it converts it to binary. Saying "hex uses less memory" earns no marks.
Worksheet

Binary, denary, hexadecimal and BCD: worksheet

6 questions, 16 marks. Written in the style of the papers; no past paper question is reproduced.

NameClassDate
Q1 · convert[2 marks]

Convert the binary number 10011110 to (a) denary and (b) hexadecimal.

Q2 · convert[2 marks]

Convert the denary number 300 to (a) 12-bit binary and (b) hexadecimal.

Q3 · convert[2 marks]

Write the denary number 4709 in Binary Coded Decimal.

Q4 · convert[3 marks]

The 12 bits 1000 0110 0101 are stored in BCD. (a) Give the denary value. (b) Give the same value in hexadecimal.

Q5 · explain[4 marks]

Describe one practical application of BCD and one practical application of hexadecimal. Justify each.

Q6 · analysis[3 marks]

A register holds the byte 0100 1001. Explain why its value cannot be stated without knowing how it is represented, giving its value as an unsigned binary integer and as BCD.

Answer key and marking notes
Q1 · 2 marks
  • (a) 128 + 16 + 8 + 4 + 2 = 158.
  • (b) 1001 = 9 and 1110 = E, so 9E.
Q2 · 2 marks
  • (a) 300 = 256 + 32 + 8 + 4, so 0001 0010 1100.
  • (b) 0001 = 1, 0010 = 2, 1100 = C, so 12C.
Q3 · 2 marks
  • 4 = 0100, 7 = 0111, 0 = 0000, 9 = 1001.
  • 0100 0111 0000 1001.
Q4 · 3 marks
  • (a) 1000 = 8, 0110 = 6, 0101 = 5, so 865.
  • 865 in binary is 0011 0110 0001 (512 + 256 + 64 + 32 + 1).
  • (b) 361 in hexadecimal.
Q5 · 4 marks
  • BCD: digital clock, calculator or meter display.
  • Each digit is held in its own nibble and can be sent directly to its own display digit (or: money values are stored exactly with no rounding errors).
  • Hex: memory addresses / memory dumps / MAC addresses / colour codes.
  • Shorter and easier for people to read and check than binary, and it converts to binary easily (4 bits per digit).
Q6 · 3 marks
  • A bit pattern only has meaning under a chosen representation.
  • As an unsigned binary integer: 64 + 8 + 1 = 73.
  • As BCD: 0100 = 4 and 1001 = 9, so 49.
Quiz

6 multiple-choice questions on this lesson

From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.

Q11 mark

What is the denary number 214 in hexadecimal?

  • AD6
  • B6D
  • CB6
  • DE6
Q21 mark

Convert the hexadecimal number 2F4 to denary.

  • A756
  • B591
  • C516
  • D2154
Q31 mark

How is the denary number 47 stored in Binary Coded Decimal (BCD)?

  • A0100 0111
  • B0010 1111
  • C0111 0100
  • D0100 1111
Q41 mark

Which is a suitable application of Binary Coded Decimal?

  • ASending each digit of a digital clock to its own 7-segment display
  • BWriting memory addresses in a form programmers can read easily
  • CReducing the number of bits needed to store large integers
  • DGiving the colour of each element on a web page
Q51 mark

A register holds the 12 bits 1001 0110 0011. What denary value does this represent if it is read as BCD, and if it is read as an unsigned binary integer?

  • A963 in BCD and 2403 as binary
  • B2403 in BCD and 963 as binary
  • C963 in BCD and 963 as binary
  • D936 in BCD and 2403 as binary
Q61 mark

Which 8-bit pattern could NOT be a valid BCD value?

  • A0101 1100
  • B1001 1001
  • C0000 0111
  • D1000 0000
Quiz key
Q1: A

214 = 1101 0110 in binary; 1101 = D and 0110 = 6, giving D6 (13 × 16 + 6 = 214). 6D reads the remainders in the wrong order (6D = 109), B6 = 182 and E6 = 230.

Q2: A

2 × 256 + 15 × 16 + 4 = 512 + 240 + 4 = 756. 591 reverses the place values of F and 4, 516 forgets that F is worth 15, and 2154 just writes the digit values 2, 15 and 4 side by side.

Q3: A

4 = 0100 and 7 = 0111, so 47 in BCD is 0100 0111. 0010 1111 is 47 in pure binary, not BCD. 0111 0100 puts the digits in the wrong order (74), and 0100 1111 contains the nibble 1111, which is not a valid BCD digit.

Q4: A

BCD stores each denary digit in its own nibble, so each one can drive a display digit directly. Memory addresses and web colour codes are written in hexadecimal. BCD needs more bits than pure binary, not fewer: 183 takes 12 bits in BCD but 8 in binary.

Q5: A

As BCD the nibbles are 9, 6 and 3, giving 963. As binary, 2048 + 256 + 64 + 32 + 2 + 1 = 2403. Swapping the two values confuses the methods, giving 963 both times assumes BCD and binary are the same thing, and 936 reads the last two nibbles in the wrong order.

Q6: A

BCD nibbles only take the values 0000 to 1001 (0 to 9). 1100 is 12, which is not a denary digit, so 0101 1100 is invalid. 1001 1001 is 99, 0000 0111 is 07 and 1000 0000 is 80, all valid.

Lab and demo

What to project

The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.

Slides

Slides for this lesson

A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.

Also for this topic

Everything else you can use

Original work by the TheLucidSTEM team. The worksheet items are written in the style of the papers; no past paper question is reproduced.
Previous lessonBinary and decimal prefixes