Rounding in binary

550 Views Asked by At

If I have the number $x$ in binary:

$x=.1101001$

Would the following be correct, when rounding to...

Three decimal places: $x=.111$

Four decimal places: $x=.1101$

Five decimal places: $x=.11010$

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, it would be correct. Because each position in binary is half the previous you can just chop off the unwanted bits and increment by $1$ if the first bit you discarded is a $1$. That works perfectly if you round up on exactly half. Otherwise you have to figure out what to do if you are chopping off a $1$ with nothing at all behind it.