Tom Kelliher, CS 220
Nov. 4, 2009
Read 3.5, 3.7.
Project discussion.
Floating point.
How can this be?
Would we have this result if we were working in 16 bits?
| Operation | A | B | Overflow Result |
if the signs of A and B are the same
if the signs of A and Sum are different
overflow has occured.
Subtraction is similar.
A compact way of writing this in C:
if (a ^ b >= 0 && a ^ sum < 0) overflow();
addu, etc.
add, etc.
How many bits in the datapath? Demonstrate on board.
Running time?
Demonstrate on board.