Previous Module
Next Module

COMPUTER SYSTEMS: Encoding and compression

COMPUTER SYSTEMS: Network topologies

COMPUTER SYSTEMS: Wired and wireless networks, protocols, and layers

COMPUTER SYSTEMS: Threats to computer systems and networks

COMPUTER SYSTEMS: Operating systems and utility software

COMPUTER SYSTEMS: Impact of technology on society

ALGORITHMS AND PROGRAMMING: Types of data

ALGORITHMS AND PROGRAMMING: Producing robust programs

ALGORITHMS AND PROGRAMMING: Designing, creating, and refining algorithms

ALGORITHMS AND PROGRAMMING: Programming languages

  • 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

Subscribe to SnapRevise+ to get immediate access to the rest of this resource.

Premium accounts get immediate access to this resource.

Previous Module
Next Module