Home > Compting > Basic Arithmatic in Binary

Basic Arithmatic in Binary

This is a simple guide in using binary and performing simple arithmetic like addition and subtraction

What is Binary

Binary is an alternative number system that uses base 2, opposed to our normal system that uses base 1. Binary is used extensively in computers as it allows numbers to be represented by a current being on or off and therefore allowing them to do calculations.

Counting in binary

In base 10, our usual number system, we have 10 characters (0,1,2,…,9), and when we want to add 1 to our last character, 9, we have to move across to the next colloum, ie 9 + 1 = 0 carry 1. In binary we have 2 characters (0 and 1) and when we want to add one to one we move to the next colloum, so 1+1=0 carry 1.

so how do we read the binary number. Well on the far right we have our units (1′s) the same as in bas 10, however the next colloum across we have our 2′s instead of tens. Then we have 4′s instead of 100′s. So each collum is the next power of 2 across.

here are some numbers in binary and decimal(base 10):

decimal:binary
1 = 1
2 = 10 * 21
3 = 11
4 =100 * 22
5 = 101
6=110
7 = 111
8=1000 * 23
9=1001
10=1010 *101
15=1111
16=10000 * 24
20=10100
100=1100100 * 102

Adding in binary

In binary each number is either a 1 or 0, so if we have a 1 and we want to add 1 we have to put 0 and carry 1 to the next colloum.

eg 1+ 1 = 0 carry 1 = 10
eg 11011+10010 = 101101

In binary there are four combinations of digits that can be added

0+0 = 0
1+0=1
0+1=1
1+1=0 carry 1

You can add binary numbers in collums like you do with decimals, only it so much easier cos its only 1 and 0.

Subtraction

Subtraction is just the reverse of addtion so:

1-0=1
1-1=0
0-1= 0 carry 1 (to the left this time)
0-0=0 (obviously)



Get Involved: Ask a question or make a comment

Use Existing Account

Password

Without Registering

Question Comment

Comments Left

  1. March 22nd, 2008 at 10:38 | #1

    Thank you

  1. No trackbacks yet.