|
![]() |
![]() |
![]() |
![]() |
![]() |
|
![]() |
Arithmetic ComponentsThe center of the computer is the Arithmetic and Logic Unit, but we also provide a simple adder component for use in computing branches and offsets. Module: AdderSimple unsigned adder of arbitrary size. No overflow checking
Module: MIPSALUThis is an ALU that supports the full complement of arithmetic and logical operations of both signed and unsigned varieties. In general, the only difference between signed and unsigned operations is the overflow checking. Signed operations perform overflow checking, while unsigned operations do not. The lone exception is the Set on Less Than (SLT) operation. Consider the following case:
This happens because the unsigned version compares the numbers as unsigned numbers, while the signed version treats them as 2's complements numbers. It's worth noting that SLTIU still performs sign extension on its immediate. Note: Does not implement any shift operations.
|
![]() |
Computer Science & Engineering University of Washington Box 352350 Seattle, WA 98195-2350 (206) 543-1695 voice, (206) 543-2969 FAX [comments to Course Staff] |