Docsity

EECS 203 Homework 6: Logic and Computer Design Fundamentals, Assignments of Discrete Mathematics

Toggle sidebar
bg1
Homework six
EECS 203
Due 23 May
Prepared by Robert Dick. Some zero-point problems prepared by previous teaching
assistants.
“Mano” is M. M. Mano and C. R. Kime, Logic and Computer Design Fundamentals. Prentice-Hall, NJ,
fourth ed., 2008.
Please note that the assigned homework may not be enough for some people. If the concepts are still a
little fuzzy after doing the homework, please take advantage of the other problems in Mano and/or see me
for more problems.
When you can verify an answer, do so.
Show your work.
1. (0 pts.) Review Mano Section 6.6 and do problem 6.31.
2. (0 pts.) Mano 7.4, 7.17, and 7.23.
3. (10 pts.) For the RSE architecture we started discussing in class, show reasonable encodings for each
of the eight instructions. For example, the add instruction might have the following encoding:
instruction 0–2 3–5 6–8 9–11 12–15
add 000 RDRS1RS2XXXX
4. (5 pts.) Write RSE assembly code to multiply the contents of register A by three.
5. (10 pts.) Write RSE assembly code to write a value K· · · K+n, into a given memory range, M· · · M+
n. For example, if K= 5, M= 24, and n= 2, then [24] = 5,[25] = 6,and [26] = 7. Kis initially in
register A,Mis initially in register B, and nis initially in register C. Assume your first instruction sits
at memory location 2. For each instruction, supply a short comment (perhaps something as simple as
“K=K+1”) explaining the purpose of the instruction. Remember that you have five general-purpose
registers.
6. (5 pts.) How many bits must RSE’s P C register have? Justify your answer in two or fewer sentences.
7. (5 pts.) If you were permitted to make one or two simple changes to the RSE architecture, what
would they be?
8. (0 pts.) A state machine is implemented with 3 flip-flops, and has a clock input, 4 data input wires
and five output wires. The FSM could be implemented as either a Moore or a Mealy machine. Note:
each question below, the answer is one of the set 0, 1, 8, 32
(a) The maximum possible number of states in the machine is:
(b) The minimum number of transition arrows starting at a given state is:
(c) The minimum number of transition arrows terminating at a given state:
(d) The number of unique patterns displayed at the output wires for a Moore machine is:
(e) The number of unique patterns displayed at the output wires for a Mealy machine is:
9. (0 pts.) Consider the state diagram in Figure 1.
This state machine has one input, J, and two outputs Kand L.
(a) Is this a Mealy or a Moore machine?
(b) How many flip-flops are needed to implement this state machine?
1
pf3

Partial preview of the text

Download EECS 203 Homework 6: Logic and Computer Design Fundamentals and more Assignments Discrete Mathematics in PDF only on Docsity!

Homework six

EECS 203

Due 23 May

Prepared by Robert Dick. Some zero-point problems prepared by previous teaching

assistants.

“Mano” is M. M. Mano and C. R. Kime, Logic and Computer Design Fundamentals. Prentice-Hall, NJ, fourth ed., 2008. Please note that the assigned homework may not be enough for some people. If the concepts are still a little fuzzy after doing the homework, please take advantage of the other problems in Mano and/or see me for more problems. When you can verify an answer, do so. Show your work.

  1. (0 pts.) Review Mano Section 6.6 and do problem 6.31.
  2. (0 pts.) Mano 7.4, 7.17, and 7.23.
  3. (10 pts.) For the RSE architecture we started discussing in class, show reasonable encodings for each of the eight instructions. For example, the add instruction might have the following encoding:

instruction 0–2 3–5 6–8 9–11 12– add 000 RD RS 1 RS 2 XXXX

  1. (5 pts.) Write RSE assembly code to multiply the contents of register A by three.
  2. (10 pts.) Write RSE assembly code to write a value K · · · K +n, into a given memory range, M · · · M + n. For example, if K = 5, M = 24, and n = 2, then [24] = 5, [25] = 6, and [26] = 7. K is initially in register A, M is initially in register B, and n is initially in register C. Assume your first instruction sits at memory location 2. For each instruction, supply a short comment (perhaps something as simple as “K = K + 1”) explaining the purpose of the instruction. Remember that you have five general-purpose registers.
  3. (5 pts.) How many bits must RSE’s P C register have? Justify your answer in two or fewer sentences.
  4. (5 pts.) If you were permitted to make one or two simple changes to the RSE architecture, what would they be?
  5. (0 pts.) A state machine is implemented with 3 flip-flops, and has a clock input, 4 data input wires and five output wires. The FSM could be implemented as either a Moore or a Mealy machine. Note: each question below, the answer is one of the set 0, 1, 8, 32

(a) The maximum possible number of states in the machine is: (b) The minimum number of transition arrows starting at a given state is: (c) The minimum number of transition arrows terminating at a given state: (d) The number of unique patterns displayed at the output wires for a Moore machine is: (e) The number of unique patterns displayed at the output wires for a Mealy machine is:

  1. (0 pts.) Consider the state diagram in Figure 1. This state machine has one input, J, and two outputs K and L.

(a) Is this a Mealy or a Moore machine? (b) How many flip-flops are needed to implement this state machine?

A

C

1/10 B

0/

1/10 1/

0/

0/

Figure 1: State diagram

(c) Draw the state table

(d) Complete the waveforms in Figure 2, for this state machine, assuming the the state assignments are A (00), B (01), C (10).