Information representation

Information representation

Number bases, prefixes and BCD

Data Representation AS Level 26 min read

On this page
  1. What you need to be able to do
  2. Binary and decimal prefixes
  3. Number bases and place value
  4. Binary and denary
  5. Hexadecimal
  6. Binary Coded Decimal (BCD)
  7. Where hexadecimal and BCD are used
  8. Mark-scheme focus
  9. Worked examples
  10. Summary
  11. Can I do this?
  12. Quiz

What you need to be able to do

Syllabus 1.1 Data representation
  • 1.1Explain the difference between binary prefixes (kibi, mebi, gibi, tebi: powers of 1024) and decimal prefixes (kilo, mega, giga, tera: powers of 1000) and convert between them.
  • 1.1Use the binary, denary and hexadecimal number bases and Binary Coded Decimal (BCD).
  • 1.1Convert an integer from any of these to any other, showing working when asked.
  • 1.1Work out how many values n bits can hold and the fewest bits a value needs.
  • 1.1Describe practical uses of BCD and hexadecimal, with a reason for each.

Nothing before this: it is the first page of the course. Next: Negative numbers and binary arithmetic, which adds one's and two's complement.

Binary and decimal prefixes

A computer stores everything as bits (binary digits, 0 or 1). Eight bits make a byte. Large amounts are written with a prefix, and there are two families of prefix because memory is built in powers of 2 while everyday measurement uses powers of 10.

Decimal (denary) prefixValueBinary prefixValue
kilobyte (kB)\(10^3=1000\) byteskibibyte (KiB)\(2^{10}=1024\) bytes
megabyte (MB)\(10^6=1000\) kBmebibyte (MiB)\(2^{20}=1024\) KiB
gigabyte (GB)\(10^9=1000\) MBgibibyte (GiB)\(2^{30}=1024\) MiB
terabyte (TB)\(10^{12}=1000\) GBtebibyte (TiB)\(2^{40}=1024\) GiB

The rule in one line

Each step up the decimal ladder multiplies by 1000; each step up the binary ladder multiplies by 1024. The two ladders never mix: a tebibyte is 1024 gibibytes, not 1024 gigabytes.

How to spot which is which

The binary prefixes all contain “bi” (kibi, mebi, gibi, tebi) and their symbols an i (KiB, MiB). No “bi” = decimal.

Bits or bytes?

1 byte = 8 bits, so 1 kilobyte = 8000 bits and 1 kibibyte = 8 × 1024 = 8192 bits. Say “bytes” when you mean bytes: “a kilobyte is 1000 bits” was marked wrong.

The binary one is bigger

Same number, binary prefix = more bytes: 1 KiB (1024) > 1 kB (1000); 1 MiB = 1 048 576 bytes > 1 MB = 1 000 000 bytes. The gap grows at every step (1 TiB is about 10% more than 1 TB).

How to convert between prefixes

  1. Write the amount in bytes first: multiply by 1000 for each decimal step, or 1024 for each binary step.
  2. Then divide by 1000s or 1024s to reach the unit the question asks for.
  3. To compare amounts in different prefixes ("which file is largest?"), convert them all to bytes and compare.

1 Binary prefix to bytes

How many bytes are 5 KiB?

AskedbytesKnow1 KiB = 1024 BRoute× 1024

  1. 5 × 1024 = 5120 bytes

2 Decimal prefix down a step

How many gigabytes are 3 TB?

AskedGBKnow1 TB = 1000 GBRoute× 1000

  1. 3 × 1000 = 3000 GB

3 Binary prefix two steps down

How many kibibytes are 2 GiB?

AskedKiBKnowGiB → MiB → KiBRoute× 1024 twice

  1. 2 × 1024 = 2048 MiB
  2. 2048 × 1024 = 2 097 152 KiB

4 Which is larger?

Which is larger: 2 MiB or 2100 kB?

AskedcompareKnowboth to bytesRouteconvert then compare

  1. 2 MiB = 2 × 1024 × 1024 = 2 097 152 bytes
  2. 2100 kB = 2100 × 1000 = 2 100 000 bytes
  3. 2100 kB is (just) larger

Never compare the numbers in front of the prefixes. Convert both to bytes.

5 Bits to a binary prefix

How many KiB are 81 920 bits?

AskedKiBKnow8 bits = 1 byte, 1024 bytes = 1 KiBRoute÷ 8 then ÷ 1024

  1. 81 920 ÷ 8 = 10 240 bytes
  2. 10 240 ÷ 1024 = 10 KiB

Number bases and place value

A number base is how many different digits a system uses. Every system works the same way: each column is worth the base times the column to its right.

BaseDigits usedColumn values (right to left)Written as
Denary (base 10)0-91, 10, 100, 1000 …45
Binary (base 2)0, 11, 2, 4, 8, 16, 32, 64, 128 …101101
Hexadecimal (base 16)0-9 and A-F (A = 10 … F = 15)1, 16, 256, 4096 …2D (or &2D in assembly code)

The same value, 45, in all three:

45 = 32 + 8 + 4 + 1. A 1 means “this column is included”; a 0 means it is not.
1286432168421
Binary00101101

How many values do n bits hold?

Number of different values

n bits can make \(2^n\) different patterns. 8 bits: \(2^8=256\) values; 16 bits: \(2^{16}=65\,536\).

Largest unsigned value

The patterns start at 0, so the largest is \(2^n-1\). 8 bits: 0 to 255; 12 bits: 0 to 4095.

Fewest bits for a value

Find the smallest n with \(2^n\) greater than the value (or at least the number of different values needed). 200 needs 8 bits (\(2^7=128\) is too few); 256 different colours need exactly 8 bits.

Values vs largest value

“How many values can 16 bits represent?” = 65 536. “Largest value in 16 bits?” = 65 535. Mixing these up was a common error.

Binary and denary

Binary to denary

  1. Write the place values (1, 2, 4, 8 …) above the bits, starting with 1 at the right.
  2. Add up the place values that have a 1 under them.
  3. Check: an odd number ends in 1; the answer can't be more than \(2^n-1\).
1001 1100 = 128 + 16 + 8 + 4 = 156
1286432168421
Bits10011100

Denary to binary: two methods, same example (156)

Method A: subtract the biggest place value that fits

  1. List the place values up to the one just above your number: 128, 64, 32, 16, 8, 4, 2, 1.
  2. Does 128 fit into 156? Yes: write 1, and 156 − 128 = 28 is left.
  3. 64? No: 0. 32? No (28 < 32): 0. 16? Yes: 1, 28 − 16 = 12 left.
  4. 8? Yes: 1, 4 left. 4? Yes: 1, 0 left. 2 and 1: 0, 0.
  5. Read the bits left to right: 1001 1100.

Method B: keep dividing by 2, read the remainders upwards

DivideAnswerRemainder
156 ÷ 2780
78 ÷ 2390
39 ÷ 2191
19 ÷ 291
9 ÷ 241
4 ÷ 220
2 ÷ 210
1 ÷ 201
  1. Divide by 2 and write the remainder (0 or 1) each time, until the answer is 0.
  2. The first remainder is the rightmost bit, so read the remainders from the bottom up: 1001 1100.
  3. Pad with 0s on the left to the number of bits asked for (8-bit, 12-bit …).
Which method should I use? Method A is quicker for numbers up to a few hundred and gives you the place values you need for hex; Method B never needs you to know the place values. Both are fine for the mark scheme.

Hexadecimal

Hexadecimal (hex) has 16 digits, 0-9 then A-F. The reason it is used in computing: one hex digit is exactly four bits (a nibble), because \(16=2^4\). So a byte is always two hex digits, and converting is just grouping.

Denary0123456789101112131415
Hex0123456789ABCDEF
Binary0000000100100011010001010110011110001001101010111100110111101111
Build the table yourself in the exam: count up in binary in four columns 8 4 2 1. Two you will use all the time: A = 1010 = 10 and F = 1111 = 15.

Binary to hex

  1. Split the bits into groups of four from the right. If the left group is short, pad it with 0s.
  2. Turn each group into one hex digit (8 4 2 1 place values, 10-15 become A-F).
  3. Write the digits in the same order.
1011 0011 1010 → B 3 A. Each nibble is worked out on its own with place values 8 4 2 1.
842184218421
Binary101100111010
HexB3A

Hex to binary

Reverse it: write every hex digit as exactly four bits, zeros included. A04 = 1010 0000 0100. Dropping the middle 0000 (giving 1010 0100 = 164) was a common mistake in June 2023.

Hex to denary: two methods, same example (C0F)

Method A: multiply by the hex place values

  1. Hex place values from the right: 1, 16, 256 (\(16^2\)), 4096 (\(16^3\)).
  2. C0F: C = 12 in the 256s, 0 in the 16s, F = 15 in the 1s.
  3. \(12\times256+0\times16+15\times1=3072+0+15=\)3087.

Method B: go through binary

  1. C0F → 1100 0000 1111 (each digit four bits).
  2. Add the place values of the 1s: 2048 + 1024 + 8 + 4 + 2 + 1 = 3087.
Wrong: F0 → “150” (writing 15 then 0 side by side). Right: F0 = 15 × 16 + 0 = 240. Every hex digit must be multiplied by its place value (November 2021 report).

Denary to hex: two methods, same example (251)

Method A: convert to binary, then group in fours

  1. 251 = 128 + 64 + 32 + 16 + 8 + 2 + 1 = 1111 1011.
  2. Split into nibbles: 1111 | 1011.
  3. 1111 = F, 1011 = B, so 251 = FB.

Method B: divide by 16 and use the remainder

  1. 251 ÷ 16 = 15 remainder 11 (15 × 16 = 240, 251 − 240 = 11).
  2. 15 = F is the left digit; the remainder 11 = B is the right digit: FB.
  3. For numbers ≥ 256, divide the answer by 16 again and keep going; read the remainders from the bottom up.
The June 2022 report: candidates who went through binary “almost invariably” got the hex right, while those dividing by 16 often got the remainder digit wrong. Under pressure, go through binary.

Binary Coded Decimal (BCD)

Binary Coded Decimal (BCD): each denary digit is stored separately as its own 4-bit binary code (a nibble), 0000 for 0 up to 1001 for 9.

BCD does not convert the whole number into binary. It converts each digit. Compare 87 both ways:

BCD: 8 → 1000, 7 → 0111. Plain binary: 87 = 64 + 16 + 4 + 2 + 1. Different patterns!
87 in BCD10000111
87 in binary01010111

Denary to BCD

Write each digit as 4 bits, keeping every digit: 108 → 0001 0000 1000 (the 0 still needs its own nibble).

BCD to denary

Split into nibbles from the left, turn each into one digit: 0101 0111 0011 → 5, 7, 3 → 573. Write 573, not “5, 7, 3” (no separators).

Unsigned binary to BCD

Two steps: binary → denary first, then each digit to 4 bits. 1001 0101 = 149 → 0001 0100 1001.

Not valid BCD

A nibble above 1001 (9) cannot be BCD: 1010 to 1111 (10-15) never appear, because one denary digit only goes up to 9.

Trap (November 2022, “very common”): “convert the unsigned binary integer 10010101 into BCD”. Reading the nibbles 1001 = 9, 0101 = 5 and answering 95 treats the input as if it were already BCD. It is plain binary: it is worth 149, so the BCD is 0001 0100 1001.

Where hexadecimal and BCD are used

RepresentationUsed forWhy (the justification the scheme credits)
Hexadecimalmemory addresses and memory dumps when debugging; assembly code (&4A); MAC addresses; colour codes in web pages (#FC238A); error codes; IPv6 addressesshorter and easier for people to read and remember than binary; fewer errors when copying; each hex digit is exactly 4 bits, so it converts straight to and from binary
BCDfinancial / banking calculationsmoney uses two decimal places and must be exact: decimal fractions like 0.1 can't be stored exactly in normal binary, so binary sums build up rounding errors; BCD keeps every digit exact
BCDelectronic displays: calculators, digital clocks, metersthe display shows individual digits, and each nibble drives one digit, so conversion between denary and BCD is straightforward
BCDthe date and time held in a PC's BIOS (real-time clock); barcode systemsconversion between denary and BCD is simple and exact

Benefits of BCD to quote (November 2022): straightforward to convert to and from denary, so less complex to encode and decode; easy for digital equipment to display; monetary values are represented exactly. Its drawback: it wastes bits (4 bits hold only 10 of the 16 possible patterns), so it needs more storage than plain binary.

Mark-scheme focus

“State one difference between a tebibyte and a gigabyte” (1 mark)

9618/11/O/N/24 Q1Paper 1 · Theory fundamentalsPart (a)1 markFull size
(a) State one difference between a tebibyte and a gigabyte. [1]
Credited
  • A tebibyte = 1024 gibibytes (\(2^{40}\) bytes) whereas a gigabyte = 1000 megabytes (\(10^9\) bytes)
  • Tebi is a binary prefix, giga is a denary (decimal) prefix
Not credited
  • “A tebibyte is bigger than a gigabyte” (true, but not a difference in what they are)
  • “A tebibyte is 1024 gigabytes” (must be gibibytes)
  • “a kilobyte is 1000 bits”-style slips: bits instead of bytes
Why

The mark is for the base each prefix counts in (1024 vs 1000, or binary vs denary). A comparison of size alone does not show you know why they differ.

Also accepted

Any correct pair of values with both units right, e.g. kibibyte = 1024 bytes and megabyte = 1 000 000 bytes.

From: 9618/11/O/N/24 Q1(a)

“Give one application where BCD is used and justify its use” (2 marks)

9618/12/M/J/25 Q2Paper 1 · Theory fundamentalsPart (c)2 marksFull size
(c) Give one application where Binary Coded Decimal (BCD) is used and justify its use. Application … Justification … [2]
Credited
  • Application: an application performing financial / banking calculations B1
  • Justification: values must be exact, no accumulating / rounding errors; it is difficult to represent decimal fractions exactly in normal binary B1
  • or: electronic displays B1 because displays only need to show individual digits / conversion is straightforward B1
Not credited
  • “Calculators” with “because it is easier” (easier than what? for which part?)
  • A justification that doesn't match the application (e.g. banking … because it shows digits)
Why

The second mark is a corresponding justification: it has to explain why BCD suits that application.

Also accepted

Date and time in the BIOS (conversion with denary is easier); barcode systems.

From: 9618/12/M/J/25 Q2(c)

“State why the value in the register cannot be a BCD value” (1 mark)

9618/12/O/N/21 Q4Paper 1 · Theory fundamentalsPart (d)1 markFull size
A register stores 1100 1101. (d) State why the value in the register cannot be interpreted as a Binary Coded Decimal (BCD). [1]
Credited
  • The denary value in each nibble / group of 4 bits is greater than 9 (1100 = 12, 1101 = 13)
Not credited
  • “The register holds a value greater than 9” (the whole register, not each nibble)
Why

BCD is judged nibble by nibble: each 4-bit group must be one denary digit 0-9. The report noted many answers talked about the whole register.

From: 9618/12/O/N/21 Q4(d)

“State the number of unique binary values that can be represented in 16 bits” (1 mark)

9618/12/M/J/23 Q4Paper 1 · Theory fundamentalsPart (a)1 markFull size
Data in a computer is stored in binary form. (a) State the number of unique binary values that can be represented in 16 bits. [1]
Credited
  • \(2^{16}\) or 65 536
Not credited
  • 65 535 (that is \(2^{16}-1\), the largest value, not the number of values)
Why

Zero is one of the values. 16 bits run from 0 to 65 535, which is 65 536 different values.

From: 9618/12/M/J/23 Q4(a)

  • Conversions: in nearly every paper, 1 mark each (binary ↔ denary ↔ hex, BCD both ways). With “show your working”: 1 for working, 1 for the answer.
  • Prefixes: a 1-mark difference, a fill-in (4 marks) or a line-matching question (5 marks).
  • BCD: an application + justification (2 marks) or two benefits (2 marks).
  • Lost marks: answering in the wrong base (binary when denary was asked), dropping zero nibbles, converting to binary instead of BCD.

Worked examples

Example 1 · Matching binary values to prefixes (Paper 1, 5 marks) ★ Easy
9618/11/O/N/21 Q1Paper 1 · Theory fundamentalsPart (a)5 marksFull size
(a) Draw one line from each binary value to its equivalent (same) value on the right. Left: 8 bits, 8000 bits, 1000 kilobytes, 1024 mebibytes, 8192 bits. Right: 1 kibibyte, 1 gigabyte, 1 byte, 1 kilobyte, 1 gibibyte, 1 megabyte, 1 mebibyte. [5]
1 Read it with me what is actually happening?

Five amounts on the left, seven on the right: two right-hand boxes are spare. Each left box equals exactly one right box.

  • one line from each5 lines, one per left box; two right boxes stay empty
  • equivalent (same)exactly equal, so kilo vs kibi matters
2 What is it asking for? the target, part by part
  • (a)five correct lines5 marks, 1 each
3 What do we know? everything the question gives us
  • 8 bits
  • 8000 bits
  • 1000 kilobytes
  • 1024 mebibytes
  • 8192 bits
  • 1 byte = 8 bits
  • decimal steps × 1000, binary steps × 1024
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • Matcheach left box
    • Bits÷ 8 to get bytes first
    • Prefix1000 → decimal, 1024 → binary
8000 bits is how many bytes?

1000 bytes = 1 kilobyte.

8192 bits?

1024 bytes = 1 kibibyte.

5 Now solve it have a go on paper first, then open the worked solution
  1. 8 bits → 1 byte B1
  2. 8000 bits = 1000 bytes → 1 kilobyte B1
  3. 1000 kilobytes → 1 megabyte B1
  4. 1024 mebibytes → 1 gibibyte B1
  5. 8192 bits = 1024 bytes → 1 kibibyte B1
6 Check it does the answer make sense?

1 gigabyte and 1 mebibyte are the unused distractors: neither equals any left box. A decimal amount (1000) always went to a decimal prefix and 1024 to a binary one ✓.

Example 2 · Largest file size, then hex to denary (Paper 1, 3 marks) ★ Easy
9618/12/M/J/24 Q7Paper 1 · Theory fundamentalsParts (a) and (c)3 marksFull size
A computer stores binary data. (a) Tick one box only to identify the largest file size: 3300 kibibytes, 0.3 megabytes, 3 mebibytes, 3300 kilobytes. [1] (c) Convert the hexadecimal number C0F into denary. Show your working. [2]
1 Read it with me what is actually happening?

(a) mixes binary and decimal prefixes, so the numbers in front can't be compared directly. (c) wants hex place values, with working.

  • tick one box onlytwo ticks scores nothing
  • show your workinga working mark: write the place-value sum
2 What is it asking for? the target, part by part
  • (a)the largest1
  • (c)C0F in denary2
3 What do we know? everything the question gives us
  • 3300 KiB, 0.3 MB, 3 MiB, 3300 kB(a)
  • C0F(c)
  • C = 12, F = 15
  • hex place values 256, 16, 1
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • (a)largest
    • Bytesconvert all four
  • (c)denary
    • Place values12 × 256 + 0 × 16 + 15
3300 KiB vs 3300 kB?

Same number, binary prefix bigger: 3300 KiB wins over 3300 kB.

Is 3 MiB bigger than 3300 KiB?

3 MiB = 3072 KiB, so no.

5 Now solve it have a go on paper first, then open the worked solution
  1. (a) 3300 KiB = 3 379 200 B; 0.3 MB = 300 000 B; 3 MiB = 3 145 728 B; 3300 kB = 3 300 000 B
  2. Largest: 3300 kibibytes B1
  3. (c) \(C0F=12\times16^2+0\times16+15\) M1
  4. \(=3072+15=\)3087 A1

Also accepted for the working mark: 1100 0000 1111 // 2048 + 1024 + 8 + 4 + 2 + 1.

6 Check it does the answer make sense?

3087 is less than 4096 = 16³, as a 3-digit hex number must be ✓.

Example 3 · Five conversions in one table (Paper 1, 5 marks) ★★ Medium
9618/13/M/J/22 Q1Paper 1 · Theory fundamentalsPart (b)5 marksFull size
(b) Complete the table: the hexadecimal value 11 represented in denary; the smallest denary number that can be represented by an unsigned 8-bit binary integer; the denary number 87 represented in BCD; the denary number 240 represented in hexadecimal; the denary number −20 represented in 8-bit two's complement binary. [5]
1 Read it with me what is actually happening?

Five separate 1-mark conversions. Read each row's target carefully: two of the reported errors were answering in the wrong form.

  • represented in denaryanswer in base 10
  • unsignedno negatives: starts at 0
  • BCDdigit by digit, not plain binary
  • two's complementnegative numbers: see the next page
2 What is it asking for? the target, part by part
  • Row 111 hex → denary1
  • Row 2smallest unsigned 8-bit1
  • Row 387 → BCD1
  • Row 4240 → hex1
  • Row 5−20 → 8-bit two's complement1
3 What do we know? everything the question gives us
  • hex 11
  • unsigned 8-bit
  • 87
  • 240
  • −20
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • Row 117?
    • Place values1 × 16 + 1
  • Row 3BCD
    • Trap0101 0111 is plain binary
  • Row 5−20
    • +200001 0100, flip, add 1
Smallest unsigned 8-bit: write it as?

The question says “denary number”: write 0, not 00000000.

240 as hex?

240 = 15 × 16 + 0 → F0.

5 Now solve it have a go on paper first, then open the worked solution
  1. Hex 11 = 1 × 16 + 1 = 17 B1
  2. Smallest unsigned 8-bit integer = 0 (in denary, as asked) B1
  3. 87 in BCD = 8 → 1000, 7 → 0111 = 1000 0111 B1
  4. 240 = 15 × 16 → F0 B1
  5. −20: +20 = 0001 0100 → flip 1110 1011 → add 1 = 1110 1100 B1 (how this works is on the next page)
6 Check it does the answer make sense?

Row 3 starts with 1000 because the first digit is 8 - in plain binary 87 would start 0101. Row 5 is negative, so its first bit is 1 ✓.

Example 4 · Hex, then the BCD trap (Paper 1, 3 marks) ★★★ Hard
9618/12/O/N/22 Q2Paper 1 · Theory fundamentalsParts (a)(ii) and (iii)3 marksFull size
(ii) Convert the unsigned binary integer 10010110 into hexadecimal. [1] (iii) Convert the unsigned binary integer 10010101 into Binary Coded Decimal (BCD). Show your working. [2]

Why it is hard: the input looks like BCD. Only reading the stem (“unsigned binary integer”) stops you converting it the wrong way.

1 Read it with me what is actually happening?

Both inputs are unsigned binary. (ii) is pure grouping. (iii) looks like BCD already (1001 0101 reads as “9 5”) but it isn't: it is a binary number.

  • unsigned binary integera normal positive binary number
  • into BCDdenary digits first, then 4 bits each
  • show your workingthe denary value is the working mark
2 What is it asking for? the target, part by part
  • (a)(ii)hex1
  • (a)(iii)BCD2
3 What do we know? everything the question gives us
  • 1001 0110(ii)
  • 1001 0101(iii)
4 Plan the route work backwards from what we want
FindKey ideaAlready have itWork out firstTrap
  • (iii)BCD
    • Denary128 + 16 + 4 + 1
    • Theneach digit to 4 bits
    • Trapanswering 95
What does 1001 0101 mean as BCD?

95 - but the question told you it is binary, not BCD.

How many nibbles will 149 need?

Three: one per digit.

5 Now solve it have a go on paper first, then open the worked solution
  1. (ii) 1001 | 0110 → 9 | 6 → 96 B1
  2. (iii) 1001 0101 = 128 + 16 + 4 + 1 = 149, the working mark B1
  3. 1 → 0001, 4 → 0100, 9 → 1001: 0001 0100 1001 B1

In (ii), converting to denary first and then to hex is allowed, but the report says it introduced errors: group the bits directly.

6 Check it does the answer make sense?

BCD of a 3-digit number has 12 bits, and every nibble is ≤ 1001 ✓. The report: “a very common incorrect response was 95”.

Summary

  • Decimal prefixes (kilo, mega, giga, tera) go up in 1000s; binary prefixes (kibi, mebi, gibi, tebi) in 1024s.
  • n bits: \(2^n\) values, largest unsigned \(2^n-1\).
  • Hex digit = 4 bits: group binary in fours from the right; write every hex digit as four bits.
  • BCD: each denary digit as its own nibble (0000-1001). Plain binary → BCD goes through denary.
  • Hex: short, readable, maps to binary. BCD: exact decimal values, easy display.
If you see…do this
two different prefixes to compareconvert everything to bytes
“into hexadecimal” from binarynibbles from the right, pad the left group
“into hexadecimal” from denarygo through binary, then group
“into BCD” from denaryeach digit → 4 bits, keep zero digits
“into BCD” from binarybinary → denary first, then each digit → 4 bits
“how many values in n bits”\(2^n\) (not \(2^n-1\))
“show your working”write the place-value sum or the nibbles, then the labelled answer

Can I do this?

Anything unticked: revise that section first. All ticked: take the quiz.

Quiz

The multiple-choice and guided questions need JavaScript. The concept checks and exam practice below work without it.

Concept checks

Answer each one in your head first, then open it.

1Why do binary prefixes exist at all, when we already had kilo and mega?Show answer

Memory is addressed in powers of 2, so its sizes are naturally 1024, 1 048 576 … Using “kilo” for 1024 made “kilobyte” mean two different things. The binary prefixes give the power-of-2 sizes their own names.

2Why does one hex digit always match exactly four bits?Show answer

Because \(16=2^4\): four bits make exactly 16 patterns, 0000 to 1111, one for each hex digit 0 to F.

3Why does BCD need more bits than plain binary for the same number?Show answer

Each nibble only uses 10 of its 16 patterns. 99 needs 8 bits in BCD (1001 1001) but only 7 bits in binary (110 0011).

4Can 1000 0111 be both BCD and a binary number? What is it worth each way?Show answer

Yes, the bit pattern means whatever we say it means: as BCD it is 87, as unsigned binary it is 128 + 7 = 135. That is why questions always say which representation they mean.

Exam-style practice

New questions, not used above. Do them on paper, then mark your work against the official mark scheme.

Q19618/13/M/J/24 Q1Paper 1 · Theory fundamentals5 marksFull size
(a) Complete the description: A kibibyte has a … prefix. Three kibibytes is the same as … bytes. A megabyte has a … prefix. Two terabytes is the same as … gigabytes. [4] (b) Convert the denary number 241 to hexadecimal. [1]
Show the mark scheme
PartAnswer / workingMarksGuidance
(a)binaryB1
3072B13 × 1024
denary // decimalB1
2000B12 × 1000
(b)F1B1241 = 1111 0001
Total: 5 marks

Examiner tip Write the prefix family by name (“binary”, “decimal / denary”), not “big” or “small”.

Q29618/11/O/N/25 Q1Paper 1 · Theory fundamentals2 marksFull size
(a)(i) Convert the binary number 101100111010 into hexadecimal. [1] (ii) Convert the denary number 108 into Binary Coded Decimal (BCD). [1]
Show the mark scheme
PartAnswer / workingMarksGuidance
(a)(i)B3AB11011 | 0011 | 1010
(a)(ii)0001 0000 1000B1the 0 digit keeps its nibble
Total: 2 marks
Q39618/13/O/N/22 Q9Paper 1 · Theory fundamentals4 marksFull size
(a)(i) Convert the unsigned binary value 10010011 into hexadecimal. [1] (ii) Convert the unsigned binary value 10010011 into denary. [1] (b) State two benefits of using Binary Coded Decimal (BCD) to represent values. [2]
Show the mark scheme
PartAnswer / workingMarksGuidance
(a)(i)93B1
(a)(ii)147B1128 + 16 + 2 + 1
(b)Straightforward to convert to / from BCD and denary … so less complex to encode and decode for programmersB1
Easier for digital equipment to display output // can represent monetary values exactlyB1max 2
Total: 4 marks

Examiner tip The report: most candidates gave one benefit (easy conversion); a second, different benefit was harder. Learn two.

Q49618/12/O/N/23 Q3Paper 1 · Theory fundamentals5 marksFull size
(a) State one difference between a kibibyte and a megabyte. [1] (b)(ii) Convert the BCD 100001100101 into denary. [1] (iii) Convert the unsigned binary integer 000111010110 into denary. [1] (c) Identify one practical application of BCD and justify why BCD is used in this application. [2]
Show the mark scheme
PartAnswer / workingMarksGuidance
(a)kibibyte = 1024 bytes and megabyte = 1 000 000 bytes // kibi is a binary prefix and mega is a denary prefixB1
(b)(ii)865B11000 | 0110 | 0101
(b)(iii)470B1256 + 128 + 64 + 16 + 4 + 2
(c)e.g. financial / banking calculationsB1
… because decimal values must be exact with no accumulating rounding errors (hard to represent exactly in normal binary)B1must match the application
Total: 5 marks

Your progress on this note is saved when JavaScript is on.