1. For the written questions show all of your work and submit either a PDF or text file.
2. When drawing circuits in a text file you do not have to draw the shapes of the
gates. Instead, simply use the word NAND, NOR, AND, OR, or NOT.
stands for C = A NAND B
3. For programming questions hand in your source program (.asm file).
4. Name you programs LastnameFirstnameAxQy.asm, replace x with the assignment
number and y with the question number.
5. Please comment appropriately for programming question. Please read the
“programming standards” for COMP 2280. Marks are allocated for good
6. Hand in your assignment through the UMLearn
Question 1 [12 marks]
1. [12 points] The MAR, MDR, and ALU are structures written (and read) in various
phases of the instruction processing cycle, depending on the instruction being executed.
In each table cell, below, enter the instructions that result in writes/loads to the
esponding structure (row) during the co
esponding phase (column) of the
instruction processing cycle.
In the case of the ALU, also indicate the phases where it performs a calculation, on
top of writes/loads to it.
Ignore the reads or loads onto the bus from the MAR/MDR/ALU.
For example, place STR in the MAR row of the FETCH column if STR causes the
MAR to be written during the FETCH phase.
To make this simpler, let’s only consider the following instructions:
AND LD STR
FETCH DECODE EVAL ADDR FETCH OPR EXECUTE STORE
a) Using 3 D flip-flops, design a finite state machine that will count out the sequence
0,6,3.7,2,1,4,5,0 … on each rising clock edge.
) Your FSM will have a clock input and 3 output bits Q2Q1Q0 which is the
inary representation of the cu
ent number counted.
c) Your solution must include the truth tables for the next state given the cu
(state transition table)
d) Your solution must include the state equations (in sum-of-products form) for the state
variables Q2, Q1, and Q0 based on the state transition table (see the two examples from
the Module 9).
e) Simplify the expressions in the equations where possible. You may use K-maps for this.
f) Do NOT draw a circuit diagram or a state transition diagram.
Design a circuit for the following state machine.
It has a one-bit input X and a one-bit output Y.
Your solution must include the truth tables for the next state and the output given the
ent state and the cu
ent value of the input (state transition table)
Your solution must include the equations for the state variables and the output based
on the state transition table.
Simplify the expressions in the equations where possible.
Use the obvious assignment of the state variables, that is, the initial state A = 00, B =
01, etc., this will give the simplest equations.
In the state diagram the value under the line is the value of the output Y.