Binary addition and subtraction

From bibbleWiki
Jump to navigation Jump to search

Introduction

Placeholder for if there is anything to learn about this

Addition

Just line them up and do the work

 1111 
  101101
+ 111101
  ------
 1101010


I guess the only thing which is a trick, is that three 1's is 1 carry 1.

Subtraction

So this is something I perhaps did not notice that borrowing is done in 2's as each column has 2 values. So

  2 
 100
- 10
 ---
  10

This perhaps is shown more clear when we borrow over two columns

   1 
   2
  100 
-   1
  ---
   11

Hopefully the picture paints a thousand words

When we borrow we always borrow two.