Midterm 2 - Terms pg. 1 Flashcards
How to know when overflow?
(+) + (+) = 1
(-) + (-) = 0
OR
(-) - (+) = 0
(+) - (-) = 1
How to deal with overflow?
- ignore; let programmer handle it
* invoke exception handler
“subword parallelism”:
performing multiple operations with a single ALU operation.
SIMD:
Single Instruction, Multiple Data
saturation:
if number too large, set equal to max value. if number to small, set equal to min value.
“clipping” in audio, :
saturation in video!
Software emulation:
Add a bunch times!
Serial Multiplier hardware:
Add and Shift for each bit
Parallel Multiplier hardware:
Many adders working together
in MIPS, HI/LO regs. 32-bit multiply:
64-bit result!
* must move from HI/LO –> mfhi/mflo
Long division approach:
if ( divisor <= dividend) * 1 in quotient, subtract divisor from dividend. else. * bring down next dividend bit. Repeat.
Hardware doesn’t know if less than, so…
must restore division if overflow occurs (remainder < 0)
Signed division:
too hard. divide using absolute values, adjust sign as required
Serial divider:
subtract and shift
Parallel divider?
requires knowledge of previous bits, can’t fully parallelize