Skip to main content
EnglandComputer ScienceSyllabus dot point

How does a computer store a negative whole number in binary?

Signed and unsigned binary, and the use of two's complement to represent negative integers, including converting between two's complement and denary for 8-bit numbers.

An Eduqas GCSE Computer Science answer on signed versus unsigned binary and how two's complement represents negative integers, with worked conversions between 8-bit two's complement and denary in both directions.

Generated by Claude Opus 4.810 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. Signed versus unsigned binary
  3. Two's complement
  4. Making a negative number: invert and add one
  5. Reading a two's complement number
  6. Why two's complement is used: subtraction by addition
  7. Try this

What this dot point is asking

Eduqas wants you to explain the difference between signed and unsigned binary and to use two's complement to store negative whole numbers, converting between 8-bit two's complement and denary in both directions. The method (invert and add one) and the negative place value of the leftmost bit are the marks here.

Signed versus unsigned binary

Two's complement

Making a negative number: invert and add one

Reading a two's complement number

Why two's complement is used: subtraction by addition

Try this

Q1. State the range of values an 8-bit two's complement number can represent. [1 mark]

  • Cue. βˆ’128-128 to +127+127.

Q2. Represent βˆ’5-5 in 8-bit two's complement. [2 marks]

  • Cue. 5=000001015 = 00000101, invert to 1111101011111010, add 11 to get 1111101111111011.

Q3. Convert the 8-bit two's complement number 1000000110000001 to denary. [2 marks]

  • Cue. βˆ’128+1=βˆ’127-128 + 1 = -127.

Exam-style practice questions

Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Eduqas Component 1, 20223 marksUsing 8-bit two's complement, represent the denary number minus 20 in binary. Show your method.
Show worked answer β†’

Start with positive 20 in 8-bit binary: 00010100.

Apply two's complement: invert all the bits (flip 0s and 1s) to get 11101011, then add 1 to get 11101100.

Answer: 11101100. One mark for positive 20, one for inverting, one for adding 1. The leading 1 confirms it is negative.

Eduqas Component 1, 20233 marksAn 8-bit two's complement number is 11110011. Convert it to denary, showing your working.
Show worked answer β†’

The most significant bit is 1, so the number is negative. The 8-bit two's complement place values are minus 128, 64, 32, 16, 8, 4, 2, 1.

Add the place values where there is a 1: minus 128 + 64 + 32 + 16 + 2 + 1 = minus 13.

Answer: minus 13. Alternatively, invert and add 1 to get 00001101 = 13, then make it negative. One mark for recognising it is negative, one for the method, one for minus 13.

Related dot points

Sources & how we know this