does anyone here know floating point???
A floating point is a number with a decimal point like 0.0 or 5.67899, integers are without like 0, 9, or 4568 Integers are precise, but floating point are binary proximations. Since computer store numbers based on the binary system, they cannot store floating point numbers with 100% procession: for example: 0.1 base 10 -> 0.00011001100110011... base 2 see http://www.exploringbinary.com/why-0-point-1-does-not-exist-in-floating-point/ integers don't suffer from this: 1 -> 1 2 -> 10 3 -> 101 etc
yeeey..wait i have a problem i just need you to help me understand it...can you do that?
depends what problem, but I can try
okay so i have this 1 1001010 00000000100000000100000
and i need to transfer that into a decimal number
after the space is meant to represent the part after the decimal point I presume?
yes first 1 is a sign
11001010 is an exponent
and the other digits are mantissa
after the space extends on this idea 00000000100000000100000= \[0 \times 2^{-1} )+...+1 \times 2{−9}+1 \times 2^{-18}+...+0 \times 2^{-23}\] Are these regular binaries or is it the representation in the memory? The zeroos indicate the binary presision. I don't know how that translates to the decimal presision, to be honest, but I guess 7 or 8 decimal poins since 2^23 = 8388608, which is 7 positions
\[0 \times 2^{-1} + ,,, + 1 \times 2^{-9} + 2^{-18} + ... + 0 \times 2^{-23}\]
my calculator gives it back in 8 decimal places
oops, matissa is wrong: that part equals 11001010= \[1×2^7+1×2^6+0×2*5+0×2^4+1×2^3+0×2^2+1×2^1+0×2^0\]
\[1 \times 2^7 + 1 \times 2^6 + 0 \times 2^5 + 0 \times 2^4 + 1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 0 \times 2^0 \]
ok, if the first is the sign is that at the right or at the left? if left drop the 2*7 and replace with a plus if at the right, a zero, then it is minus, and replace 0*2^{-2} with 0*2^{-22}
okay
t's basically the same as with decimal numbers: 100.11 is \[1\times10^2+0\times10^1+0\times10^0+1\times10^{-1}+1\times10^{-2}\]
sorry for the mess entering these equations is cumbersome
my calculator gives 74.00195694
Join our real-time social learning platform and learn together with your friends!