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.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
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. to .
Q2. Represent in 8-bit two's complement. [2 marks]
- Cue. , invert to , add to get .
Q3. Convert the 8-bit two's complement number to denary. [2 marks]
- Cue. .
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
- Number systems: binary, denary and hexadecimal, and how to convert between all three, including why hexadecimal is used as a shorthand for binary.
An Eduqas GCSE Computer Science answer on the binary, denary and hexadecimal number systems and how to convert between all three, with worked place-value methods and the reason hexadecimal is a useful shorthand for binary.
- Binary addition of two 8-bit numbers including carrying and overflow, and binary shifts (left and right) and their effect of multiplying or dividing by powers of two.
An Eduqas GCSE Computer Science answer on adding two 8-bit binary numbers (with carrying and overflow) and performing left and right binary shifts, including how a shift multiplies or divides by powers of two.
- How text is represented using character sets, the ASCII character set, the need for and nature of Unicode, and how a character maps to a binary code.
An Eduqas GCSE Computer Science answer on how text is stored in binary using character sets, the 7-bit ASCII set, why Unicode was needed to support many languages, and how a character maps to a binary code.
- The units of data (bit, nibble, byte, kilobyte, megabyte, gigabyte, terabyte), how images are stored as pixels (resolution and colour depth), how sound is sampled (sample rate and bit depth), and calculating file sizes.
An Eduqas GCSE Computer Science answer on the units of data, how images (resolution and colour depth) and sound (sample rate and bit depth) are represented in binary, and full worked calculations of image and sound file sizes.
- Variables and constants, the common data types (integer, real, Boolean, character, string), and the arithmetic, relational and logical operators used in programs.
An Eduqas GCSE Computer Science answer on variables and constants, the common data types (integer, real, Boolean, character, string), and the arithmetic, relational and logical operators, including integer division and modulus.
Sources & how we know this
- WJEC Eduqas GCSE Computer Science specification (from 2016) β Eduqas (2020)