Introduction to Binary Numbers
In the decimal number system we use the digits 0, 1, … 9 to write any number. In binary (bi means two) number system we use the first two digits only: 1 and 0. In exactly the same way that you operate on decimal numbers, you can add, subtract, multiply, divide… binary numbers as well. Why do we want to operate on numbers written in binary form rather than in decimal form?
At first it might seem that using only two digits will not have any practical use. However knowing that one of the most fundamental components in electronics is the switch which, at any time, can be in one of two states that may be called “1” for “ON” and “0” for “OFF”, we start to see the advantage of using binary numbers in electronic calculators and computers.
In expanded form, the decimal number 253 is written as follows:
253 = 2*102 + 5*101 + 3*100
The decimal system is also called the base-10 system.
We can use a base-2 system (use only 0 and 1) to write 253 as follows:
253 = 1* 27 + 1* 26 + 1* 25 + 1*24 + 1* 23 + 1*22 + 0*21 + 1*20
We can say that 253 in binary form is written as follows: 1 1 1 1 1 1 0 1
A Decimal to Binary Converter that may be used to convert decimal numbers to binary form.
Addition of Binary Numbers
The rules for adding binary numbers are similar to those used to add decimal numbers:
0 + 0 = 0
1 + 0 = 1
0 + 1 = 1
1 + 1 = 10 This is 2 written in binary
Let us now add larger binary numbers: 1101 + 1111
1) When you do 1 + 1 it gives 2 which in binary is written as 10, put 0 below and carry 1 (in red) exactly as it is done with decimal numbers.
2) When you do 1 + 1 + 1 it gives 3 which in binary is written as 11, so you put 1 below and carry 1 (in red).
Fig. 1 - Addition of two binary numbers
We can easily check the corresponding addition in decimal system. The binary 1101 converted to decimal gives 13 and 1111 converted to decimal gives 15 and 13 + 15 = 28 which in binary form is written as 11100 which exactly the result given above when done using binary from.
The most important thing to retain is that we can add binary numbers in the same way we add decimal numbers. It is also true for the subtraction, multiplication and division of numbers. The main advantage of using binary numbers is that you need only two digits 0 and 1 to add, subtract, multiply and divide numbers which leads to easier design of digital calculators such as computers.