- Why a fixed number of bits can only represent a fixed number of values.
- The limits of 8-bit unsigned integers and 8-bit two’s-complement signed integers.
- How overflow and lost bits can make results incorrect.
- Why using more bits gives more range or detail, but uses more storage.
Computers store all data using binary, meaning patterns of 0s and 1s. In real computer systems, a value is often stored using a fixed number of bits, such as 8 bits, 16 bits, or 32 bits.
For GCSE Edexcel, you mainly work with 8-bit binary. That is enough to understand the main limitation: if you only have 8 spaces, you cannot store every possible value.
Bit, nibble and byte
A bit is one binary digit: either 0 or 1. A nibble is 4 bits. A byte is 8 bits.
Fixed-width representation
A fixed-width representation uses a set number of bits to store a value, such as exactly 8 bits. If the value needs more bits than are available, it cannot be stored correctly in that space.

Finite bits means finite patterns
With nnn bits, there are only 2n2^n2n different bit patterns. If there are more possible data values than bit patterns, some values cannot be represented exactly.
Each bit has 2 possible states: 0 or 1. Every extra bit doubles the number of possible patterns.
So:
- 1 bit gives 2 patterns: 0, 1
- 2 bits give 4 patterns: 00, 01, 10, 11
- 4 bits give 16 patterns
- 8 bits give 256 patterns
Counting values with a fixed number of bits
- A bit has 2 possible states, so 5 bits gives a multiplication of 2 by itself 5 times.
- Use the pattern formula: 25=322^5 = 3225=32.
- Therefore, 5 bits can encode 32 distinct things. They might be numbers, characters, colours, or other data values depending on the representation chosen.
Adding one bit is powerful
Adding one extra bit does not add one extra value. It doubles the number of possible bit patterns.
An integer is a whole number. An unsigned integer has no sign bit, so all the bits are used to represent zero or positive values.
Unsigned integer
An unsigned integer is a whole number representation that stores values from 0 upwards, with no negative numbers.
For nnn unsigned bits, the range is:
0 to 2n−10 \text{ to } 2^n - 10 to 2n−1
For 8-bit unsigned binary:
- Smallest value: 0000 0000 = 0
- Largest value: 1111 1111 = 255, which is FF in hexadecimal
- Range: 0 to 255
The largest value is 255, not 256, because one of the 256 patterns is used for zero.
Finding the largest unsigned 8-bit value
- 8 bits give 28=2562^8 = 25628=256 different bit patterns.
- Unsigned counting starts at 0, so the final value is one less than the number of patterns.
- The largest value is 255, stored as 1111 1111.
Forgetting zero
If 8 bits give 256 patterns, the unsigned range is 0 to 255, not 1 to 256.
Sometimes a computer needs to store negative integers. Edexcel GCSE uses two’s-complement for signed binary integers.
Two’s-complement signed integer
A two’s-complement signed integer is a binary representation that can store positive and negative whole numbers. In 8 bits, its range is −128 to +127.
In 8-bit two’s complement:
- 0000 0000 represents 0
- 0111 1111 represents +127
- 1000 0000 represents −128
- 1111 1111 represents −1
The leftmost bit is the most significant bit. In 8-bit two’s complement, it also acts as the sign bit:
- Leftmost bit 0 means the number is zero or positive.
- Leftmost bit 1 means the number is negative.
Same bits, different meaning
A bit pattern has no meaning by itself. The same 8 bits can mean different values depending on whether they are interpreted as unsigned or two’s-complement signed.
Comparing unsigned and signed meanings
Consider the bit pattern 1111 1111.
- As an unsigned 8-bit integer, all the place values are positive, so 1111 1111 represents 255.
- As an 8-bit two’s-complement signed integer, the leftmost 1 represents a negative value, and this pattern represents −1.
- The bit pattern has not changed. Only the chosen representation has changed.
Signed range shortcut
For GCSE, remember the 8-bit two’s-complement range directly: −128 to +127. There is one more negative value than positive value because zero takes one of the non-negative patterns.
A major limitation of binary representation is overflow.
Overflow
Overflow occurs when the result of a calculation is outside the range that can be represented using the available number of bits.
Overflow is not just “a big number”. It means the value is too large or too small for the chosen representation.
For example:
- 8-bit unsigned can store 0 to 255.
- 8-bit two’s complement can store −128 to +127.
If a calculation produces a result outside the relevant range, the computer cannot store the correct answer in 8 bits.
Adding past the unsigned 8-bit maximum
Add 1111 1111 and 0000 0001 as unsigned 8-bit integers.
- Interpret the operands as unsigned values: 1111 1111 is 255 and 0000 0001 is 1.
- The correct denary result should be 256, which needs 9 bits: 1 0000 0000.
- In an 8-bit storage location, only the lower 8 bits fit, so the stored result becomes 0000 0000 and the extra carry is lost unless the system detects it.
For signed two’s-complement numbers, overflow is about whether the result fits the signed range.
Spotting signed overflow
Add +100 and +60 using 8-bit two’s-complement signed integers.
- Both values fit individually: +100 is 0110 0100 and +60 is 0011 1100.
- The correct denary result is +160, but 8-bit two’s complement can only go up to +127.
- The 8-bit binary result is 1010 0000, which has a leftmost bit of 1, so it would be interpreted as negative. A positive plus positive calculation giving a negative result shows signed overflow.
Using carry out for every overflow
For unsigned addition, a carry out of the leftmost bit shows overflow. For signed two’s-complement addition, you must think about the signed range and the signs of the operands and result.
A binary shift moves every bit left or right by a set number of places.
Binary shift
A binary shift moves bits left or right. In a logical shift, empty spaces are filled with 0s. In an arithmetic right shift, the sign bit is preserved for signed two’s-complement numbers.
Shifts are useful because they can act like quick multiplication or division by powers of 2:
- A left shift by 1 place often multiplies by 2.
- A right shift by 1 place often divides by 2 using integer division.
However, this only works safely if important bits are not shifted out and the result still fits in the available bits.
Losing information in a right shift
Shift the unsigned 8-bit value 0000 1101 right by 1 place.
- 0000 1101 represents denary 13.
- A logical right shift gives 0000 0110, because the rightmost 1 is shifted out and lost.
- 0000 0110 represents denary 6, so the exact result of 13 divided by 2 has not been stored. The lost bit represented the remainder.
Assuming shifts are always exact
A shift only behaves like exact multiplication or division if no useful bit is lost and the new value is still within the available range.
This topic is not only about integers. Any data stored in binary is limited by how many bits are available.
For example:
- If a character set uses too few bits, it cannot represent enough different characters.
- If an image uses too few bits per pixel, it cannot represent enough colours.
- If sound uses too few bits per sample, it cannot represent the wave’s amplitude accurately.
- If an integer field uses too few bits, large values may overflow.
Using more bits gives more possible values, but it also uses more storage. So computer systems often balance range, accuracy, and storage capacity.
Checking whether enough bits are available
A device needs to store readings from 0 to 100 inclusive.
- The readings 0 to 100 inclusive make 101 different possible values.
- 6 bits gives 26=642^6 = 6426=64 patterns, so 6 bits is not enough.
- 7 bits gives 27=1282^7 = 12827=128 patterns, so 7 bits is enough, with some unused patterns.
In the exam
- State the number of bits and the representation being used, such as 8-bit unsigned or 8-bit two’s complement.
- Use the range: unsigned 8-bit is 0 to 255; signed 8-bit two’s complement is −128 to +127.
- If a calculation or shift goes outside the range, explain that overflow or lost bits mean the stored result may be incorrect.
- Group binary in nibbles, such as 1111 1111, to reduce mistakes when reading or writing 8-bit values.
Check yourself
- Why can 8 bits represent 256 patterns, but the unsigned range only goes up to 255?
- What is the 8-bit two’s-complement signed range, and why is +128 not available?
- What happens when 1111 1111 and 0000 0001 are added in an 8-bit unsigned store?