Binary Arithmetic and Shifts

GCSE Computer Science · Data Representation

Adding binary

Work right to left, carrying when a column reaches 2:

 0  +  0  = 0
 0  +  1  = 1
 1  +  1  = 10   (write 0, carry 1)
 1 + 1 + 1 = 11  (write 1, carry 1)

Example: 0101 + 0011 = 1000 (5 + 3 = 8).

Overflow

If the result needs more bits than available (e.g. an 8-bit answer exceeds 255), the final carry is lost — an overflow error. The stored answer is wrong.

Binary shifts

  • Left shift by n = multiply by 2ⁿ.
  • Right shift by n = divide by 2ⁿ.
0000 0110 (6) left-shift 1 → 0000 1100 (12)   ×2
0000 0110 (6) right-shift 1 → 0000 0011 (3)   ÷2

Bits shifted off the end are lost, which can lose precision.

Exam tip

State clearly whether a shift multiplies or divides and by what factor (2ⁿ). Mention that data can be lost off the end.

Don't understand a part?

Sign in and ask our AI tutor to explain any passage in plain English.

Try AI explanations →

More on Data Representation

Binary and Denary Hexadecimal Characters, Images and Sound Compression

← All GCSE Computer Science notes