Multiply the digit to the left of the "decimal" point by 2^0 = 1.
Multiply the digit to the left of it by 2^1 = 2
Multiply the digit to the left of that by 2^2 = 4 and so on.
Also
Multiply the digit to the right of the "decimal" point by 2^(-1) = 1/2.
Multiply the digit to the right of that by 2^(-2) = 1/4 and so on.
Add all these together.
Example:
Binary 1101.1011
1*2^3 = 1*8 = 8
1*2^2 = 1*4 = 4
0*2^1 = 0*2 =0
1*2^0 = 1*1 = 1
1*2^-1 = 1*1/2 = 0.5
0*2^-2 = 0*1/4 = 0
1*2^-3 = 1*1/8 = 0.125
1*2^-4 = 1*1/16 = 0.0625
Sum = 13.6875
(83)base10 to octal
The binary equivalent of the decimal number 63 is 111111.
Binary 110111 is equivalent to decimal 55.
The binary number 11.1 in decimal would be 3.5
Convert 189 to binary number
13 in decimal = 1101 in binary.
110010000
It is 100011.
It is 155.
You can easily convert decimal to binary in the scientific calculator - for example, the scientific calculator found in Windows. In this case, type the number in decimal, then click on "binary" to convert to binary.
The decimal equivalent of the binary number 11101 is 29.
write a c++ program to convert binary number to decimal number by using while statement