Binary to Decimal and Decimal to Binary Conversion
The number system that we are mostly familiar with is a decimal number system. The decimal number system has a base of ten which implies that there are ten numbers by the help of which we can represent any number of the decimal family. The numbers are from 0 to 9. Representation is such as (15)10 the base 10 is written as suffix or radix. If it is not written then by default we must understand that it is a decimal number by default.
On the other hand, binary number invented by Gottfried Leibniz in 1679 has a base of two. “Bi” means two so from there we can say that the base of the binary system is 2. That is, only two numbers are sufficient to represent a number in binary format. The numbers which are used in binary number system are 0 and 1. 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.