# Binary code

## This diagram show the difference in decimal and binary, Make sure you remember the difference! Works in the same way as decimal, except that only 0's and 1's can be used, instead of the whole spectrum of 0-9. When doing binary addition remember the diagram above.

As an example of binary addition we have,

101
+101

1010

a) To add these two numbers, we first consider the "1 bit" column and calculate 1 + 1, which (in binary) results in 10. We carry the 1 to the "2 bit" column, and the leave the 0.

b) Moving on to the "2 bit" column, we calculate 1 + (0 + 0), which gives 1. Nothing carries to the "3 bit" column, and we leave the 1 in the "2 bit" column.

c) Moving on to the "3 bit" column, we calculate 1 + 1, which gives 10. We carry 1 to the "4 bit" column, leaving the 0 in the "3 bit" column.

Another example of binary addition:

1011
+1011
10110

Most of the time when you add 2 of the same number length you will get the same answer but sometime like in these examples you will have to go one "bit" more which is not a problem but you need to release this if a question asks for a 4 bit answer and it is 5 you must explain why!