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.

GCSE Computer Science · 1.2.4

Binary, Denary 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 the denary value of the binary number 10011010?1
    1. A146
    2. B150
    3. C154
    4. D158
  2. 2Convert the denary number 172 to 8 bit binary.1
    1. A10101010
    2. B10101100
    3. C10110100
    4. D11001100
  3. 3What is 11101001 in hexadecimal?1
    1. A9E
    2. BEA
    3. CD9
    4. DE9
  4. 4What is the denary value of hexadecimal 4C?1
    1. A68
    2. B76
    3. C196
    4. D412
  5. 5Why is hexadecimal used by programmers?1
    1. AHexadecimal uses less storage space
    2. BIt is the only base that can represent colours
    3. CComputers process hexadecimal faster than binary
    4. DIt is shorter than binary and easier for humans to read without error
  6. 600110101 shifted left by 2 places gives which result, and what has happened to the value?1
    1. A11010100, the value has been divided by 4
    2. B01101010, the value has been multiplied by 2
    3. C11010100, the value has been multiplied by 4
    4. D00001101, the value has been divided by 4
  7. 7An overflow error occurs when:1
    1. AThe result of a calculation requires more bits than are available
    2. BBinary is converted to hexadecimal incorrectly
    3. CTwo negative numbers are added
    4. DA number is divided by zero
  8. 8What is 01010110 + 00101101 in binary?1
    1. A01110011
    2. B01111011
    3. C10000011
    4. D10000111
  9. 9How many bits does one hexadecimal digit represent?1
    1. A2
    2. B4
    3. C8
    4. D16
  10. 1000011000 is shifted right by 3 places. What is the result in denary and what has happened?1
    1. A3, the value has been divided by 8
    2. B192, the value has been multiplied by 8
    3. C3, the value has been multiplied by 8
    4. D6, the value has been divided by 4

Section B

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

  1. 1ConvertConvert the denary number 217 into 8 bit binary. Show your working.2
  2. 2ExplainExplain why hexadecimal is often used by programmers instead of binary.3
  3. 3AddAdd the binary numbers 01101110 and 00110101. Show your working and state whether an overflow error occurs.4
  4. 4ExplainExplain what is meant by an overflow error, using an example.4
  5. 5StateThe binary number 00101100 is shifted left by 2 places. State the result and explain the effect this has on the value represented.3

Mark scheme

Section A

1C2B3D4B5D6C7A8C9B10A

Section B

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

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

  • Correct method shown, subtracting place values from 128 downwards
  • Correct answer 11011001

Model answer. Working from the largest place value: 128 fits into 217 leaving 89, 64 fits into 89 leaving 25, 32 does not fit, 16 fits leaving 9, 8 fits leaving 1, 4 does not fit, 2 does not fit, and 1 fits leaving 0. This gives 11011001. Checking: 128 + 64 + 16 + 8 + 1 = 217.

2 Explain why hexadecimal is often used by programmers instead of binary. 3

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

  • Hexadecimal is much shorter, one hex digit replaces four binary digits
  • It is easier for humans to read, write and remember, so fewer mistakes are made
  • It converts easily to and from binary because 16 is a power of 2

Model answer. Hexadecimal is used because it is far more compact than binary: each hexadecimal digit represents exactly four binary digits, so an eight bit value that takes eight characters in binary takes only two in hexadecimal. Shorter values are much easier for a person to read, write down and remember accurately, so programmers make fewer transcription errors and mistakes are easier to spot. Hexadecimal is also convenient because 16 is a power of 2, which means converting between hexadecimal and binary is a simple matter of expanding each digit into its own group of four bits, with no arithmetic required.

3 Add the binary numbers 01101110 and 00110101. Show your working and state whether an overflow error occurs. 4

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

  • Correct addition performed column by column from the right
  • Correct answer 10100011
  • States that no overflow error occurs
  • Justifies this because the result fits within 8 bits

Model answer. Adding column by column from the right and carrying where two or three ones meet gives 10100011. Checking in denary, 01101110 is 110 and 00110101 is 53, and 110 + 53 = 163, which is 10100011 in binary. No overflow error occurs, because the result 163 is still within the range 0 to 255 that eight bits can represent, so there is no carry out of the most significant bit and no data is lost.

4 Explain what is meant by an overflow error, using an example. 4

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

  • Occurs when the result of a calculation needs more bits than are available
  • The carry out of the most significant bit is lost
  • The stored result is therefore incorrect
  • Gives a valid example with 8 bit numbers exceeding 255

Model answer. An overflow error occurs when the result of a calculation requires more bits than the system has available to store it. When this happens the carry generated out of the most significant bit has nowhere to be stored, so it is lost, and the value that ends up being stored is therefore incorrect. For example, using eight bits the largest value that can be represented is 255. Adding 11010110, which is 214, to 01001010, which is 74, produces 288, and in binary this is 100100000, a nine bit number. Since only eight bits are available, the leading 1 is discarded and the stored result becomes 00100000, which is 32 rather than 288.

5 The binary number 00101100 is shifted left by 2 places. State the result and explain the effect this has on the value represented. 3

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

  • Correct result 10110000
  • The value has been multiplied by 4
  • Because a left shift of n places multiplies by 2 to the power n

Model answer. Shifting 00101100 left by two places gives 10110000, with zeros filling the two vacated positions on the right. The original value was 44 and the new value is 176, so the number has been multiplied by 4. This is because a logical left shift of n places multiplies the value by 2 to the power n, and here n is 2, so the multiplier is 4. No bits were shifted beyond the most significant bit in this case, so no data was lost.