Track progress, take quizzes and save notes on this lesson.

Free forever · no card needed

Start free
Intermediate

Binary Number Representations

4.5.4.1 Unsigned binary·4.5.4.2 Unsigned binary arithmetic·4.5.4.3 Signed binary — two's complement

Aligned to the AQA 7517 specification

Level
Intermediate
Reading time
5 min
Published
13 June 2026
Updated
1 July 2026
On this page
  1. 1.Unsigned Binary
  2. 2.Binary Addition
  3. 3.Two's Complement: Representing Signed Integers
  4. 4.Negating in Two's Complement
  5. 5.Subtraction Using Two's Complement
  6. 6.Summary: Unsigned vs Signed
  7. 7.Common Exam Mistakes

Key takeaways

  • Unsigned binary represents non-negative integers, and with n bits the representable range is 0 to 2ⁿ - 1.
  • In two's complement with n bits the range is -2^(n-1) to 2^(n-1) - 1, and the most significant bit acts as a sign bit with negative place value -2^(n-1).
  • To negate a number in two's complement, invert all the bits and then add 1; inverting alone gives the one's complement, not the two's complement.
  • Subtraction is performed as A - B = A + (-B) by adding the two's complement of the subtrahend, and any carry-out of the MSB must be discarded.
  • In two's complement, overflow is detected when the carry into the MSB differs from the carry out of the MSB.

Unsigned Binary

Unsigned binary represents non-negative integers (zero and above). With bits, the representable range is to .

Bits ()RangeMax value
40 to 15
80 to 255
160 to 65 535
320 to

Converting unsigned binary to decimal:

: working right to left, bit has value .

Bit76543210
Value1286432168421
Digit10110101
Contribution128321641

Converting decimal to binary: see the number systems lesson (repeated division by 2).

Binary Addition

Binary addition follows the same rules as decimal addition but in base 2:

ABCarry inSum bitCarry out
00000
01010
10010
11001
11111

Worked example — add (122) + (53):

  0111 1010   (122)
+ 0011 0101   ( 53)
-----------
  1010 1111   (175)

Carry trace (right to left): 0+1=1; 1+0=1; 0+1=1; 1+0=1; 1+1=10 (0 carry 1); 1+1+1=11 (1 carry 1); 1+0+1=10 (0 carry 1); 0+0+1=1.

Result:

Multiplication by 2: shift all bits one place to the left and insert a 0 in the rightmost position. This is because each bit's place value doubles when shifted left.

Two's Complement: Representing Signed Integers

Two's complement is the standard way to represent positive and negative integers in binary. With bits:

  • Range: to
  • The most significant bit (MSB) acts as the sign bit: 0 = positive, 1 = negative

For 8 bits: range is to .

Interpreting a two's complement number:

The MSB has a negative place value: .

Negating in Two's Complement

To negate a number (flip its sign): invert all bits, then add 1.

Example — represent in 8-bit two's complement:

Step 1: write in binary:

Step 2: invert all bits:

Step 3: add 1:

So .

Verify using the sign-bit method:

Converting negative two's complement to decimal:

Given : apply the same process — invert and add 1: Invert: Add 1: Therefore .

Want more lessons like this one?

Generate lessons on anything you study. Free account, no card needed.

Start generating

Subtraction Using Two's Complement

Binary subtraction is performed by adding the two's complement of the subtrahend:

Worked example — compute in 8-bit two's complement:

: start with ; invert: ; add 1:

  0000 1010   (+10)
+ 1111 1010   ( -6)
-----------
1 0000 0100   (carry-out discarded)

Result: ✓ (carry out of the MSB is discarded for correct results)

Overflow occurs when the result exceeds the range of bits. In two's complement: overflow is detected when the carry into the MSB differs from the carry out of the MSB.

Summary: Unsigned vs Signed

Unsigned binaryTwo's complement
8-bit range0 to 255−128 to 127
Negative valuesNot representableRepresentable
MSB rolePlace value Negative place value
Addition same?YesYes
Overflow detectionCarry out of MSBCarry in ≠ carry out of MSB

The same 8-bit pattern has different meanings under unsigned vs two's complement:

  • unsigned =
  • two's complement =

Common Exam Mistakes

1. Using the wrong range formula

Unsigned -bit range: to . Two's complement -bit range: to . Note the asymmetry — there is one more negative value than positive.

2. Forgetting to add 1 when negating

Inverting the bits alone gives the one's complement, not the two's complement. The +1 step is essential. Omitting it gives the wrong result.

3. Not discarding the carry-out in subtraction

When subtracting with two's complement, a carry-out of the MSB is expected for a correct positive result. It must be discarded, not included in the answer.

4. Misreading the sign of a two's complement number

A leading 1 does not mean the number is a large positive. two's complement = , not .

Key terms

Unsigned binary
A representation of non-negative integers where, with n bits, the range is 0 to 2ⁿ - 1.
Two's complement
The standard way to represent positive and negative integers in binary, where the MSB has negative place value -2^(n-1).
Sign bit
The most significant bit in two's complement, where 0 indicates a positive value and 1 a negative value.
One's complement
The result of inverting all the bits of a number, which becomes two's complement only after adding 1.
Overflow
A condition where the result exceeds the range of n bits, detected in two's complement when the carry into the MSB differs from the carry out of the MSB.
Carry-out
A bit produced out of the most significant bit during addition, which is discarded in two's complement subtraction.

Frequently asked questions

Write the positive value in binary, invert all the bits, then add 1. For example, to get -37 in 8-bit two's complement: +37 is 0010 0101, inverting gives 1101 1010, and adding 1 gives 1101 1011. Inverting alone gives only the one's complement.

An 8-bit two's complement number has the range -128 to +127. The range is asymmetric because there is one more negative value than positive, following the general formula -2^(n-1) to 2^(n-1) - 1.

Binary subtraction is done by adding the two's complement of the subtrahend, since A - B = A + (-B). Any carry-out of the most significant bit is discarded to give the correct result; this carry-out is expected for a correct positive answer.

Generate revision on any topic you study

Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.

Lessons on anything

Structured, level-matched lessons on any topic you study

Practice quizzes

Find out what you actually know before the exam does

Flashcard sets

Lock in key concepts with instant revision cards

Ask Aica

Stuck on something? Get a clear explanation, any time

Prev

Number Systems and Bases

Next

Floating Point Numbers

Related lessons

6 min

6 min

5 min

Top students don’t revise more. They revise what counts.

Start revising free

Free to start. No card needed.