GCSE Computer Science (OCR)

Topic Summaries

COMPUTER SYSTEMS: Number systems

Binary addition

  • Rules: 

0 + 0 = 0

0 + 1 = 1

1 + 1 = 1,0 (carry the 0)

1 + 1 + 1 = 1,1 (carry the 1)

  • Overflow error: happens when the result of a binary addition is too large to fit in the number of bits available (e.g. more than 255 in an 8-bit system). For example: 11111111 (255) + 00000001 (1)’ = 100000000 needs 9 bits → overflow! This can cause incorrect results or crashes. To handle it: 
    • Store extra bits (overflow) elsewhere in memory. 
    • Set a flag bit to signal that an overflow occurred.
    • Software or CPU can detect the flag and break the sum into smaller, manageable parts.
    • Avoid continuing with faulty results. 
  • Binary shifts 
    • Left shift: multiply by 2 each time (e.g. 0000101000010100)
    • Right shift: divide by 2 each time (e.g. 0001010000001010)
  • 8 bit + 8 bit: e.g. 1000 1101 + 0100 1000:

) 1 0 0 0 1 1 0 1

+ 0 1 0 0 1 0 0 0

______________

= 1 1 0 1 0 1 0 1

Unlock Binary addition

Sign up to unlock the rest of this topic — plus every other topic, video, flashcard set and eBook guide in your SnapRevise Digital subscription.

Cancel anytime — instant access the moment you sign up.