Binary subtraction


basic decimal subtraction

Example

3 4 16
3 3 5 6 4
2 3 4 9 0
_ _ _ _ _ _
1 0 0 7 4

4 - 0 = 4
Borrow 1 to make 16 - 9 = 7
Borrow to make 4 - 4 = 0
Borrow to make 3 - 3 = 0
3 - 2 = 1

Answer
 10074

Onto binary subtraction

The four basic subtraction rules

0 - 0 = 0
1 - 0 = 1
1 - 1 = 0
10 - 1 = 1

   0 1 10 10
1 0 1 0 1
1 1 1 0
_ _ _ _ _ _
0 0 1 1 1

1 - 0 = 1
Borrow 1 to make 10 - 1 = 1
Borrow 1 to make 10 - 1 = 1
Borrow 1 to make 1 - 1 = 0
Borrow 0 to make 0

You can double check

10101 = 21
1110 = 14
21 - 14 = 7
Answer 111 = 7

Home

  • Home

Binary

  • Binary Basic
  • Binary addition
  • Binary Subtraction

Hex

  • Hexchart
  • Binary To Hex
  • Hex To Binary

Octal

  • Octal To Decimal
  • Decimal To Octal

Basics of a computer

  • Four stages of a computer
  • Dram VS. SRAM
  • programs and software