Lesson 4.5.4.3

4.5.4.3 Signed binary using two's complement Quiz: AQA Computer Science, Unit 5

20 questions

In partnership with Revision Ninja

Lesson 4.5.4.3, Signed binary using two's complement: 20 multiple choice questions for the AQA Computer Science (7517), Unit 5: Fundamentals of data representation, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. What does the leftmost bit indicate in an n-bit two's complement number?

    • The parity of the number
    • The most significant digit of an unsigned magnitude
    • The sign, where 1 means negative and 0 means non-negative
    • Always 0 for every integer
  2. What is the range of an n-bit two's complement integer?

    • 0 to 2^n - 1
    • -2^(n-1) to 2^(n-1) - 1
    • -2^n to 2^n - 1
    • -(2^(n-1) - 1) to 2^(n-1)
  3. Which 4-bit two's complement pattern represents -8?

    • 1111
    • 1000
    • 0111
    • 0000
  4. What is the 8-bit two's complement representation of -1?

    • 1000 0001
    • 1111 1111
    • 1000 0000
    • 0000 0001
  5. Which n-bit two's complement value is the most negative?

    • -(2^n - 1)
    • -2^(n-1)
    • 0
    • -1
  6. What is the method for finding the two's complement of a positive number?

    • Invert all the bits and then add 1
    • Add 1 to the number and then invert all the bits
    • Reverse the order of the bits
    • Shift the number one place to the left
  7. Which 8-bit two's complement pattern represents +5?

    • 0000 1010
    • 1111 1011
    • 0000 0101
    • 1000 0101
  8. Convert -5 to 8-bit two's complement.

    • 0000 0101
    • 1111 1011
    • 1111 1010
    • 1000 0101
  9. Convert the 8-bit two's complement pattern 1111 0110 to decimal.

    • 246
    • -10
    • -6
    • -9
  10. Convert -6 to 4-bit two's complement.

    • 0110
    • 1001
    • 0101
    • 1010
  11. Using 4-bit two's complement, calculate 7 - 3. What is the result?

    • 1010, which is -6
    • 1100, which is -4
    • 0100, which is 4
    • 0011, which is 3
  12. Calculate 20 - 7 in 8-bit two's complement. What pattern results?

    • 1111 0011
    • 0000 1110
    • 0000 1101
    • 0001 1101
  13. Add the 4-bit two's complement numbers 0011 and 0011. What is the result?

    • 0111, which is 7
    • 0010, which is 2
    • 0110, which is 6
    • 1000, which is -8
  14. Is 1001 + 1001 an overflow in 4-bit two's complement, and why?

    • Yes, because -14 is outside the 4-bit range of -8 to 7
    • Yes, because 1110 equals -2, which is out of range
    • No, because the sum is exactly -14 in 4 bits
    • No, because the result is 0010
  15. Convert the 8-bit two's complement pattern 1000 0000 to decimal.

    • 0
    • -128
    • 128
    • -127
  16. Why does negating -128 overflow in 8-bit two's complement?

    • The sign bit is ignored, so the result is 0000 0000
    • -128 is stored as zero, so its negation is zero
    • +128 is outside the 8-bit range, which ends at +127
    • Negation always keeps the same bit pattern in two's complement
  17. A 6-bit two's complement register holds 011111 (31) and increments by 1. What pattern and value result?

    • 000000, which is 0
    • 100000, which is +32 correctly
    • 100000, which is -32, an overflow
    • 011111 unchanged
  18. How many distinct negative integers can a 4-bit two's complement number represent?

    • 7
    • 15
    • 4
    • 8
  19. Explain why two's complement lets one adder circuit handle both addition and subtraction.

    • Two's complement stores negative numbers as positive magnitudes, so the adder ignores signs
    • Subtraction uses a separate circuit that only flips the sign bit
    • Subtracting B equals adding the two's complement of B, so the same adder can perform both operations
    • Adders only handle unsigned numbers, so subtraction is turned into shifting
  20. Calculate 5 - 3 in 4-bit two's complement. Which steps give the correct answer?

    • Add 0101 and 1101 to get 10010, then discard the carry to leave 0010, which is 2
    • Subtract 0011 from 0101 without carries to get 0010, which is -2
    • Add 0011 to 0101 to get 1000, which is -8
    • Invert 0101 and add 0011 to get 1010

All AQA Computer Science quizzes