Seneca

Binary Addition

Computer Science: OCR GCSE, topic 1.2.23

Binary Addition

We can add two binary numbers in exactly the same way as denary numbers.

Adding two digits

Adding two digits

  • If we add 0 + 0 we get 0.
  • If we add 1 + 0 (or 0 + 1) we get 1.
  • If we add 1 + 1, then we cannot use the symbol 2.
  • So we need to carry the 1 and put 0 in the current place.
Adding in a third bit

Adding in a third bit

  • We might have 1 + 1 and also a 1 carried over from the previous column.
  • If we have 1 + 1 and a carried 1, then we carry the 1 and have 1 left over.
  • So we carry 1 and put 1 in the current place.
Overflow errors

Overflow errors

  • Binary numbers are stored as a fixed length.
  • If a number is carried past the last place column, then this is called an overflow error.
  • Overflow errors can lead to inaccurate results and software crashes.

Test yourself on Binary Addition

  • What is an overflow error?

  • When does an overflow error occur?

  • Choose the true statement.

  • A device stores binary numbers using 8 bits. It adds the binary numbers 11111111 and 00000001. Does this cause an overflow error?

Practise this topic for free