Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
Computers are binary, yeah? So we have to represent fractional numbers with binary, too.
In decimal, numbers past the decimal point are 10^-1, 10^-2, … etc. In binary, they’re 2^-1, 2^-2, …
2^-1 is one half, so 0.1 in binary is 0.5 in decimal. 2^-2 is one quarter. 0.11 in binary is 0.75 in decimal. And of course you’ve got 0.01 = 0.25
The problem comes when representing decimal numbers that don’t have neat binary representations. For instance, 0.1 in decimal is actually a repeating binary number: 0.0001100110011…
Computers are binary, yeah? So we have to represent fractional numbers with binary, too.
In decimal, numbers past the decimal point are 10^-1, 10^-2, … etc. In binary, they’re 2^-1, 2^-2, …
2^-1 is one half, so 0.1 in binary is 0.5 in decimal. 2^-2 is one quarter. 0.11 in binary is 0.75 in decimal. And of course you’ve got 0.01 = 0.25
The problem comes when representing decimal numbers that don’t have neat binary representations. For instance, 0.1 in decimal is actually a repeating binary number: 0.0001100110011…