Sunday, 18 December 2011

decimal to binary

Number systems:
There are a number of number systems being used in this world these days.
·         Decimal number system
·         Binary system
Decimal number system:
Decimal number system is the number system which consists of 10 numbers. That is why it is named as decimal number system. This number system consists of 0 to 9. Now the question arises that why 10 were used for calculations in the initial days. Everybody knows that a normal human being has 10 fingers. Therefore these 10 digits were used for calculations. Basically the word digit is a Greek word having the meaning of fingers. One thing must be remembered that in any number system the increment of 1 in the highest value converts it to 0 having a carry 1. For example
 9+1=10. This is clear that 9 is the highest number in the decimal number system. The increment of 1 in the 9 converts it to 0 having a carry 1 and it becomes 10. After the 9 which is the highest number it becomes zero and the repetition starts. Decimal number system is the basic number system being in use in every bank, in every business, in short everywhere.
Binary number system:
Now the binary number system comes which is basically used in the digital electronic devices. It is named as binary number system because it consists of only 2 digits i.e. 0 and 1. Every number of the decimal number system in fact any value if any number system can be expressed in the binary system using these two values. We know that all the digital electronic devices have the inputs and outputs high or low. High is expressed as 1 and low is expressed as 0. For example we have to get the output which is equal to 5 volts. Then the output voltage from 2 to 5 will be expressed as high and it will be represented as 1. If we are getting the output equals 0.8 volts then it will be expressed as 0. This is basically the drawback of digital circuits that it cannot differentiate between the output of 4.7 volts and 5.9 volts. It will express both the outputs as 5 volts which can be represented by a single binary digit 1.
Decimal to Binary conversion:
Suppose we have to convert the decimal number 37 into the binary number system.
37/2= 18… remainder is 1
18/2= 9     remainder is 0
9/2= 4         remainder is 1
4/2= 2        remainder is 0
2/2= 1       remainder is 0
1/ 2= 0 remainder is 1
Now (37)10 of decimal number system is converted to binary number system and can be expressed as (100101)2. Similarly any number of decimal number system can be converted to binary number system. Take another example of (15)10 can be converted to binary number system
15/2= 7 remainder is 1
7/2= 3 remainder is 1
3/2= 1 remainder is 1
1/ 2= 0 remainder is 1.
(15)10 can be expressed as (1111)2. The subscripts are showing the number system. Now the question arises how to convert binary system into decimal system which I will tell you in the next blog. If you have any questions in your mind please ask I will try to answer them. 

No comments:

Post a Comment