Back to the topic

The mark scheme starts on a new page, so you can print pages one and two for a student and keep the last page yourself. Everything prints in black on white whichever theme you are using.

Edexcel GCSE CS · 2.1

Binary and Hexadecimal

Section A: 10 multiple choice questions, 10 marks. Section B: 5 written questions, 16 marks. Total 26 marks.

Name

Class

Date

Mark  / 26

Section A

Circle the letter of the correct answer. One mark each.

  1. 1What is 11001010 in denary?1
    1. A198
    2. B202
    3. C212
    4. D234
  2. 2What is 181 in 8 bit binary?1
    1. A10011101
    2. B10110011
    3. C10110101
    4. D11010101
  3. 3Why do computers use binary rather than denary?1
    1. ABinary numbers take up less storage than denary numbers
    2. BBinary is easier for people to read
    3. CTheir components have two stable states, which map directly onto 0 and 1
    4. DDenary cannot represent negative numbers
  4. 4How many bits are represented by a single hexadecimal digit?1
    1. A2
    2. B4
    3. C8
    4. D16
  5. 5What is the hexadecimal equivalent of the binary number 10110101?1
    1. AB5
    2. B5B
    3. CA5
    4. DB6
  6. 6What is 2F in denary?1
    1. A31
    2. B35
    3. C47
    4. D215
  7. 7How many different values can be represented by one byte?1
    1. A64
    2. B128
    3. C255
    4. D256
  8. 8Which statement about hexadecimal is correct?1
    1. AIt is the number system processors work in
    2. BIt allows a computer to store more data in the same space
    3. CIt can represent values that binary cannot
    4. DIt is used because people read and write it more reliably than long binary strings
  9. 9What is the largest value that can be stored in a nibble?1
    1. A8
    2. B15
    3. C16
    4. D255
  10. 10Which of these is a genuine use of hexadecimal?1
    1. AWriting colour values in web pages, such as FF8000
    2. BCompressing images without losing quality
    3. CStoring text more efficiently than ASCII
    4. DEncrypting data so it cannot be read

Section B

Answer in the space provided. The number of marks tells you how many separate points to make.

  1. 1CalculateConvert the denary number 156 into an 8 bit binary number. Show your working.2
  2. 2ExplainExplain why computers represent all data in binary.3
  3. 3CalculateConvert the binary number 11100101 into hexadecimal and into denary.4
  4. 4ExplainExplain why hexadecimal is used by programmers when working with binary data.4
  5. 5ExplainA student claims that storing a value in hexadecimal saves memory compared with storing it in binary. Explain why this claim is incorrect.3

Mark scheme

Section A

1B2C3C4B5A6C7D8D9B10A

Section B

1 Convert the denary number 156 into an 8 bit binary number. Show your working. 2

One mark for each of the following, to a maximum of 2.

  • Correct binary answer 10011100
  • Working shown using place values, subtracting 128, 16, 8 and 4

Model answer. Starting from the highest place value, 128 fits into 156 and leaves 28, so the first bit is 1. 64 does not fit into 28 and 32 does not fit into 28, so the next two bits are 0. 16 fits into 28 and leaves 12, 8 fits into 12 and leaves 4, and 4 fits into 4 and leaves 0, so those three bits are 1. The final two place values, 2 and 1, do not fit into 0, so both are 0. The answer is 10011100.

2 Explain why computers represent all data in binary. 3

One mark for each of the following, to a maximum of 3.

  • Computer components such as transistors have two states, on and off
  • These two states map directly onto the digits 0 and 1
  • Two states can be distinguished reliably even with electrical noise, so circuits are simpler and less error prone

Model answer. The components a computer is built from, such as transistors and memory cells, are two state devices: they are either conducting or not conducting, charged or discharged. Those two states map directly onto the two digits of binary, 0 and 1, so no translation is needed between the data and the hardware holding it. Two states are used rather than ten because a circuit only has to distinguish between a voltage above a threshold and one below it, which remains reliable even when the signal is affected by electrical noise or by voltage drifting slightly, and circuits that only have to make that one distinction are simpler and cheaper to manufacture.

3 Convert the binary number 11100101 into hexadecimal and into denary. 4

One mark for each of the following, to a maximum of 4.

  • Splits the binary number into the nibbles 1110 and 0101
  • Correctly gives the hexadecimal answer E5
  • Adds the place values 128, 64, 32, 4 and 1
  • Correctly gives the denary answer 229

Model answer. To convert to hexadecimal the byte is split into two nibbles from the right, giving 1110 and 0101. The nibble 1110 is 8 plus 4 plus 2, which is 14, and 14 is written as E in hexadecimal. The nibble 0101 is 4 plus 1, which is 5. The hexadecimal value is therefore E5. To convert to denary the place values where a 1 appears are added together: 128 plus 64 plus 32 plus 4 plus 1, which gives 229. This can be checked against the hexadecimal answer, since E is 14 and 14 multiplied by 16 is 224, and 224 plus 5 is 229.

4 Explain why hexadecimal is used by programmers when working with binary data. 4

One mark for each of the following, to a maximum of 4.

  • One hexadecimal digit represents exactly four bits
  • So binary values can be written far more briefly, two digits instead of eight
  • Shorter values are easier for people to read, write, remember and compare, so fewer mistakes are made
  • Conversion between hexadecimal and binary is direct and requires no calculation

Model answer. Hexadecimal is base 16, and because 16 is 2 to the power 4, one hexadecimal digit represents exactly four bits. That relationship means a byte can always be written as two hexadecimal digits, so a value such as 11001010 becomes simply CA. Programmers work with binary values constantly, in memory addresses, colour codes and MAC addresses, and long strings of ones and zeros are extremely easy to misread, mistype or lose your place in. Writing the same value in a quarter of the characters makes it far easier to read aloud, note down and compare with another value. The conversion is also completely mechanical: each group of four bits translates straight into one hexadecimal digit with no arithmetic at all, so nothing is lost or risked in moving between the two.

5 A student claims that storing a value in hexadecimal saves memory compared with storing it in binary. Explain why this claim is incorrect. 3

One mark for each of the following, to a maximum of 3.

  • All data is stored in the computer as binary regardless of how it is written down
  • Hexadecimal is a way of writing or displaying a value for people, not a way of storing it
  • The value CA and the value 11001010 occupy the same eight bits in memory

Model answer. The claim is incorrect because every value inside a computer is held as binary, whatever notation a person uses when writing it down. Hexadecimal is a human readable shorthand for binary, not a separate storage format, so writing a byte as CA rather than as 11001010 changes nothing about the memory the value occupies. Both notations describe the same eight bits, and those eight bits take up one byte of memory in either case. What hexadecimal saves is not space in the machine but effort and errors for the person reading and writing the value.