Rounding in Binary? Does such a thing exist?

SendTrash

Platinum Member
Apr 18, 2000
2,581
0
76
I am in EE103, Applied Numerical Computing


now here is my question, is there rounding in binary?

like if I am told to that a machine only has a 4 bit matissa, then when I do an addition in full precisionthen on the 5th bit if its a 1 I bump the 4th bit up one? and if the 5th bit is zero, I just truncate?

Hmmmm.....

Basically my question is "Is there rounding in binary? or do I just truncate?"
 

Vincent

Platinum Member
Oct 9, 1999
2,030
2
81
If there is rounding with decimal numbers, I would imagine that there's rounding with binary numbers as well.

Try to write a program that replicates the situation you're talking about and see if your computer rounds.
 

Shaka

Senior member
Oct 13, 1999
608
0
0
Haha, I took EE103. The worst EE class at UCLA. It's not even EE related! It's just BS!! Good luck.
 

joohang

Lifer
Oct 22, 2000
12,340
1
0
How does one get a "decimal" out of binary numbers? :)

And doesn't the term "decimal" refer to the number system based on 10?

FYI: Windows Calculator won't let me use decimal point on binary numbers.
 

BDawg

Lifer
Oct 31, 2000
11,631
2
0
Here's my take - If you have a 4 bit matissa, it's only going to recognise 4 bits. It won't even see the value of the 5th bit to know whether to round it.
 

SendTrash

Platinum Member
Apr 18, 2000
2,581
0
76


<< Here's my take - If you have a 4 bit matissa, it's only going to recognise 4 bits. It won't even see the value of the 5th bit to know whether to round it. >>

my professor said to do the addition in full precision and then "round".... so in the computer it does have more bits than the matissa during calculation then is stored in memory
 

samarth

Senior member
Apr 21, 2000
460
0
0


<< How does one get a "decimal" out of binary numbers? :) And doesn't the term "decimal" refer to the number system based on 10? FYI: Windows Calculator won't let me use decimal point on binary numbers. >>


decimal meaning if you have 10.11b
then its 2.75d