Binary to Decimal ConversionAjay Di sharma
How to Convert Binary to Decimal
But as well as having 10 digits ( 0 through 9 ), the decimal numbering system also has the operations of addition ( + ), subtraction ( – ), multiplication ( × ) and division ( ÷ ).
In a decimal system each digit has a value ten times greater than its previous number and this decimal numbering system uses a set of symbols, b, together with a base, q, to determine the weight of each digit within a number. For example, the six in sixty has a lower weighting than the six in six hundred. Then in a binary numbering system we need some way of converting Decimal to Binary as well as back from Binary to Decimal.
Any numbering system can be summarised by the following relationship:
|N = bi qi|
|where:||N is a real positive number
b is the digit
q is the base value
and integer (i) can be positive, negative or zero
N = bn qn… b3 q3 + b2 q2 + b1 q1 + b0 q0 + b-1 q-1 + b-2 q-2… etc.
The Decimal Numbering System
In the decimal, base-10 (den) or denary numbering system, each integer number column has values of units, tens, hundreds, thousands, etc as we move along the number from right to left. Mathematically these values are written as 100, 101, 102, 103 etc. Then each position to the left of the decimal point indicates an increased positive power of 10. Likewise, for fractional numbers the weight of the number becomes more negative as we move from left to right, 10-1, 10-2, 10-3 etc.
So we can see that the “decimal numbering system” has a base of 10 or modulo-10 (sometimes called MOD-10) with the position of each digit in the decimal system indicating the magnitude or weight of that digit as q is equal to “10” (0 through 9). For example, 20 (twenty) is the same as saying 2 x 101 and therefore 400 (four hundred) is the same as saying 4 x 102.
The value of any decimal number will be equal to the sum of its digits multiplied by their respective weights. For example: N = 616310 (Six Thousand One Hundred and Sixty Three) in a decimal format is equal to:
6000 + 100 + 60 + 3 = 6163
or it can be written reflecting the weight of each digit as:
( 6×1000 ) + ( 1×100 ) + ( 6×10 ) + ( 3×1 ) = 6163
or it can be written in polynomial form as:
( 6×103 ) + ( 1×102 ) + ( 6×101 ) + ( 3×100 ) = 6163
Where in this decimal numbering system example, the left most digit is the most significant digit, or MSD, and the right most digit is the least significant digit or LSD. In other words, the digit 6 is the MSD since its left most position carries the most weight, and the number 3 is the LSD as its right most position carries the least weight.
The Binary Numbering System
The Binary Numbering System is the most fundamental numbering system in all digital and computer based systems and binary numbers follow the same set of rules as the decimal numbering system. But unlike the decimal system which uses powers of ten, the binary numbering system works on powers of two giving a binary to decimal conversion from base-2 to base-10.
Digital logic and computer systems use just two values or states to represent a condition, a logic level “1” or a logic level “0”, and each “0” and “1” is considered to be a single digit in a Base-of-2 (bi) or “binary numbering system”.
In the binary numbering system, a binary number such as 101100101 is expressed with a string of “1’s” and “0’s” with each digit along the string from right to left having a value twice that of the previous digit. But as it is a binary digit it can only have a value of either “1” or “0” therefore, q is equal to “2” (0 or 1) with its position indicating its weight within the string.