References: EE380 Arithmetic (Chapter 3, 2nd Ed. Chapter 4)

The book does a nice job on this, especially for integer arithmetic; read it. You should be aware of 1's complement, 2's complement, and sign + magnitude integer formats; integer addition, negation, and subtraction algorithms and hardware (ripple, lookahead, and select carry processing); and the integer multiply and divide discussed in class and the text. You should also have a basic understanding of floating point.

In discussing integers, we also briefly discussed BCD (Binary Coded Decimal) and Gray codes (efficient conversion between 2's complement and Gray codes is given here). We also mentioned saturation arithmetic (as opposed to the modular integer arithmetic most commonly used). However, the primary addition to the book material on integer arithmetic was our discussion of speculative addition. Our in-class discussion was actually a slightly simplified version of what Intel used. Here is a little article discussing what (they thought) Intel implemented in the Pentium 4; an Intel patent related to this is Carry-skip adder having merged carry-skip cells with sum cells, but it isn't exactly the mechanism used either.

It also is worth noting that floating point arithmetic differs from real number arithmetic in many important ways, which the book doesn't really cover very well. I don't expect you to understand the subtle nuances of floating point, but you should be aware that it is a very strange beast. Toward that goal, you might browse through What Every Computer Scientist Should Know About Floating-Point Arithmetic, which details many of the stranger quirks of floating point arithmetic. Don't read this reference too carefully; it is overkill for the purposes of this course. A lighter, but similar, document is The Perils of Floating Point, which is quite readable despite talking about Fortran. Most fundamentally, you should be aware of the accuraccy loss issues involving addition and subtraction and the IEEE base 2 floating point format.

Just as a cute little reminder of how log-based arithmetic works, here is the PDF for the slide rules I handed-out in class. You'll see more about floating point, and even log number systems (LNS), if you take EE480. In fact, my EE480 overview of floating point is here, and my overview of LNS is here if you'd like a sneak preview. Of course, THE standard for floating point is IEEE 754 and, like most IEEE standards, it isn't free to get a copy of the standard itself. The good news is that on the UK campus, you can get IEEE Std 754-2008 for free from this IEEE Xplore site.


EE380 Computer Organization and Design.