###
V22.0436 - Prof. Grishman

###
Lecture 8 - MIPS instruction set; MIPS ALU

[hand out review sheet for mid-term]

#### Using the MIPS Core Instruction Set (sections 2.1 to 2.6 + 2.9)

- Dealing with constants ...small constants and large constants
- LUI (load upper immediate) operation

- Dealing with large addresses using LUI operation
- Branch: unconditional; branch on equal/unequal;
testing for less than/greater than
- Array addressing

#### MIPS ALU (text, Appendix B.5)

An ALU (arithmetic-logical unit) is a combinational circuit capable of
computing a variety of arithmetic and logical functions.
- operations needed for MIPS core instruction set: add, subtract,
and, or, zero test, comparison

[MIPS core instruction set also has nor]
- general strategy: different circuits combined by multiplexer;
multiplexer
select becomes function select for ALU
- inverting B input for subtraction
- feed output of high-order bit of adder to low-order bit for "set
on
less"
operation
- use OR gate on ALU output for "equal" test

####
Carry look-ahead: introduction (text, Appendix B.6)

- simplest adder is "ripple carry": slow (delay time linear in size
of
operands)
- add time is usually critical in determining overall cycle time of
a
machine
- can speed up addition by introducing notion of "carry generate"
and
"carry
propagate"