By Chandrahas M. Halai
One of the most significant things that ancient India has given to the world of mathematics is the place value number system. In this system we can use any number as our base. Ten is the preferred base for the obvious reason that we have ten fingers in our two hands.
A quantity in place value number system can be represented as a polynomial in the chosen base number. This is as given below:
Refer my earlier articles:
https://chandrahasblogs.wordpress.com/2020/04/22/how-pingala-created-the-binary-number-system/
https://chandrahasblogs.wordpress.com/2020/05/18/pingalas-algorithm-for-binary-conversion/
As an example, let us convert the decimal number 235 into binary.
Since, we want to convert a decimal number 235 into binary we will divide it by 2.
Step 1) 235/2
Quotient = 117, remainder = 1
Thus, 1 will be the digit in the lowest value place.
Step 2) 117/2
Quotient = 58, remainder = 1
Step 3) 58/2
Quotient = 29, remainder = 0
Step 4) 29/2
Quotient = 14, remainder = 1
Step 5) 14/2
Quotient = 7, remainder = 0
Step 6) 7/2
Quotient = 3, remainder = 1
Step 7) 3/2
Quotient = 1, remainder = 1
Step 8) 1/2
Quotient = 0, remainder = 1
Since here, the quotient is 0, the division process comes to an end.
Thus, the binary representation of the decimal number 235 is 1110 1011.
Now, how can we convert the base of fractional quantities?
To get the digits in the lower value places go on repeating the above procedure. The process stops when the multiplicand becomes zero.
As an example, let us convert the fractional part of the decimal number 235.671875 into binary.
Since, we want to convert the fractional part of the decimal number into binary we will multiply it by 2.
Step 1) 0.671875 * 2 = 1.34375
Hence, the first digit after binary point = 1
Step 2) 0.34375 * 2 = 0.6875
Hence, the second digit after binary point = 0
Step 3) 0.6875 * 2 = 1.375
Hence, the third digit after binary point = 1
Step 4) 0.375 * 2 = 0.75
Hence, the fourth digit after binary point = 0
Step 5) 0.75 * 2 = 1.5
Hence, the fifth digit after binary point = 1
Step 6) 0. 5 * 2 = 1.0
Hence, the sixth digit after binary point = 1
Since here, the multiplicand is 0, the division process comes to an end.
Thus, the binary representation of the decimal number 235.671875 is 11101011.101011.