+ 1
Lets see how many can convert this binary code to a decimal one (10010001010110.111)
share your answers in the comment with explanation
6 Answers
+ 3
10 0100 0101 0110 .111(BIN)
= 2456(HEX) + 0.875(DEC)
= 2.25*4096 + 86.875
= 8192 + 1024 + 86.875
= 9302.875
+ 22
74423 ? explanation googled binary to decimal converter lol
+ 5
Sample 1101.011
The algorithm to convert the binary to the left of the decimal point is pretty well known.
Starting at the decimal point (which is usually omitted), every position n to the left (n starting at 0) is "the value * 2^n" summed over all positions.
1101.
n=0: 1 * 2^0 = 1
n=1: 0 * 2^1 = 0
n=2: 1 * 2^2 = 4
n=3: 1 * 2^3 = 8
The left-side sum is 1+0+4+8 = 13.
To the right of the decimal point, n=-1 starts at the decimal point and decrements going right:
.011
n=-1 : 0 * 2^-1 = 0/2 = 0
n=-2 : 1 * 2^-2 = 1/4 = 0.25
n=-3 : 1 * 2^-3 = 1/8 = 0.125
The sum of these is 3/8 = 0.375
Using an online calculator, you can verify that:
1101.011 = 13.375
(Anyone reading this far, now write a program)
edit: switched notation for right half to negative powers, to avoid extra confusing fractions.
+ 2
Kirk Schafer I've written one before ( à©à„âąÏâą)à©à„
oh... only dec2binđ€
+ 1
1 0 1 1
2^3 + 0 + 2^1 + 2^0 = 11
Basically to parse it to decimal you gotta sum for each bit 2 to the power of n, where n is the position of the digit. Zeroes sum zero though
+ 1
0.5+0.25+0.125=0.875
0+2+4+0+16+0+64+0+0+0+1024+0+0+8192=9302
9302.875 i hope i calculated well