CMSC311   Final exam study guide
                          ----------------------
 
Closed book and notes.
You may use calculators for simple arithmetic (+ - * / ^).
 
 
The questions may consist of short answers and definitions, short answer 
discussion, code to trace thru (such as a parameter passing exercise),
diagram to complete (such as datapath/control and pipeline), assembly code to trace thru or write.
 
Emphasis will be on material covered since the midterm, but you should review 
earlier material especially MIPS instructions. It will be roughly 30-70 split.
 
You should understand the homework assignments and be able to answer 
questions based on your experience gained by doing the homework. 
 
 
You should review the following topics:
               Understand call, ret, push, pop and function call implement
               Assembly programming.
               Relative simple cpu: all instructions, code translation.
               Boolean algebra, truth table—logic circuit
               Multiplexor, ALU implementation, 
               Modify hardware to support some new instructions
               all control signals in relative simple CPU
               understand and able to use terminology such as: 
                               AC <- DR
                               PC <- PC+1
                               …..
               state diagram for instructions ( F1, F2, …)
               able to reproduce the logical implementation of control unit, ALU units, PC units, …
 
Sample questions:
 

(a) What is the purpose of multiplexor? Draw a diagram that implement a 4-way

multiplexor using basic gates.

 

(b) How many input and output ports does a register file has? What are the

functionalities of these ports?

 

(c) What is the PC register? What information is saved in PC register?

 

 (e) show the truth table for a 2-bit Adder with the following input/output pins:

show an implementation using basic gates

 

(f) Based on figure 6.15, (1) show the content of relevant registers after executing instruction “LDAC 0x1111ffff, assume the instruction is located at memory address 0x00001ff0, the rest of memory locations all contain 0xaa. (2) explain the purpose of register TR . 
 
(g)Based on figure 6.16, show the control signals when executing (1) add, (2) movr, and (3) sub. justify your answers.
 
(h) based on figure 6.9, complete the table below to show the value of counter and LD, INC, CLR signals during “AND” instruction. 
 
LD
INC
CLR
Counter
Fetch1
 
 
 
 
Fetch2
 
 
 
 
Fetch3
 
 
 
 
AND1
 
 
 
 
AND2