Binary to Decimal and Decimal to Binary ConversionPublished on 24/2/2012 and last updated on 5/9/2018
Binary number can be represented by putting 2 in the prefix which denotes the base. If the base is not given, then it is by default assumed to be a decimal number .We have to be very careful in writing a binary number, a slight mistake may result in a very serious error. For example, a binary number is written as follows- (00110)2. Now a question may arise, why do we need binary number? We have decimal number system which is familiar to all of us and most of the persons do not understand binary. The answer is that any programmable device or a processor can work in two modes either high or low. Here, high denotes the supply is connected to that point and low denotes that the point is grounded or is at a state of zero volts. This is called positive logic and in other logic system the reverse is taken which is known as negative logic system.
Also, we can say that a high means that it performs some function or work and low indicates that it has not performed any work. The reverse may also be true if we take negative logic system. So, from the above description we can say that it is much easier and convenient to use binary number system in the computer instead of decimal and also conversion will be required in order that the output result which is given in binary form should be converted to decimal for the sake of the user.
Conversion from Binary to Decimal
Conversion of Integer NumbersExpand the number given in binary form in the power of 2 and sum the values, the result which we will get will be in the decimal form. For example-
Convert Binary Number to Decimal Number
Conversion of Decimal Point Number to DecimalThis can also be done in the same way, however after the decimal point the number should be multiplied with 2-1, 2-2 etc. For example,
Conversion from Decimal to Binary
Integer NumbersDivide the number by 2 and take only the remainder, if division is completed than take only the remainder which gives the binary number.
Example So, the binary equivalent of (14)10 is (1110)2 After the dash (-) remainder is written. Suppose we are converting the decimal number (87)10. Now the conversion is shown below