Docsity

Practice Assignment 5 - Discrete Mathematics | EECS 203, Assignments of Discrete Mathematics

Toggle sidebar
bg1
Homework five
EECS 203
Due 16 May 2008
Prepared by Robert Dick.
Some optional (zero-point) problems prepared by a previous TA.
“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. Also note that there are a few zero point questions. These are optional. You can use
them if you need additional practice.
When you can verify an answer, do so.
Show your work.
Mano and Kime have some nice problems in Chapter 6. I’ll be using a few of them. Problem eight will
take a while.
1. (0 pts.) Mano 6.5.
2. Design a fancy turn signal controller for an automobile. The driver can generate three binary signals:
•L: turn left
•R: turn right
•E: emergency lighting
Zero or one of these signals may be active at a time.
(a) (10 pts.) (encoder review) Design an encoder to get the necessary information from the driver
to the back of the car. Equations are sufficient; you need not draw circuit diagrams. Use these
codes:
Signals (LRE) Encoded signal (AB)
000 00
100 10
010 01
001 11
(b) (10 pts.) (decoder review) Design the corresponding decoder from standard 1-input decoders
and AND gates. Show a schematic for the decoder on which all inputs and outputs are carefully
labeled.
(c) The decoder was for use in debugging. From now on, you’ll be using the encoded signal. Your
turn indicator is a horizontal linear array of three (amazingly bright) LEDs controlled by the I, J ,
and Ksignals. If the left turn signal is on, you should cycle repeatedly though the following
values for I, J , and K:
001,010,100.
If the right turn signal is on, cycle through these values:
100,010,001.
If the emergency lighting signal is on, cycle through these values:
000,010.
1
pf3

Partial preview of the text

Download Practice Assignment 5 - Discrete Mathematics | EECS 203 and more Assignments Discrete Mathematics in PDF only on Docsity!

Homework five

EECS 203

Due 16 May 2008

Prepared by Robert Dick.

Some optional (zero-point) problems prepared by a previous TA.

“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. Also note that there are a few zero point questions. These are optional. You can use them if you need additional practice. When you can verify an answer, do so. Show your work. Mano and Kime have some nice problems in Chapter 6. I’ll be using a few of them. Problem eight will take a while.

  1. (0 pts.) Mano 6.5.
  2. Design a fancy turn signal controller for an automobile. The driver can generate three binary signals:
    • L: turn left
    • R: turn right
    • E: emergency lighting

Zero or one of these signals may be active at a time.

(a) (10 pts.) (encoder review) Design an encoder to get the necessary information from the driver to the back of the car. Equations are sufficient; you need not draw circuit diagrams. Use these codes: Signals (LRE) Encoded signal (AB) 000 00 100 10 010 01 001 11 (b) (10 pts.) (decoder review) Design the corresponding decoder from standard 1-input decoders and AND gates. Show a schematic for the decoder on which all inputs and outputs are carefully labeled. (c) The decoder was for use in debugging. From now on, you’ll be using the encoded signal. Your turn indicator is a horizontal linear array of three (amazingly bright) LEDs controlled by the I, J, and K signals. If the left turn signal is on, you should cycle repeatedly though the following values for I, J, and K: 001 , 010 , 100.

If the right turn signal is on, cycle through these values:

100 , 010 , 001.

If the emergency lighting signal is on, cycle through these values:

000 , 010.

If no signal is on, the LEDs should all be off. When the input signal (no action, left turn, right turn, emergency lighting) changes, it is fine for there to be a slight delay before the new pattern is initiated. For example, if the current output is 100 and the left turn signal is on, a change to emergency lighting may go through 001 before starting the normal emergency lighting cycle. i. (10 pts.) Draw the state diagram for a synchronous Moore FSM implementing these re- quirements. ii. (5 pts.) Show the state table for the FSM. iii. (5 pts.) Assign states, and redo the state table. iv. (10 pts.) Assuming access to D flip-flops, use Karnaugh maps to derive the state variable equations and output variable equations. There are multiple ways to implement this machine. Some have simpler output variable functions at the cost of more state variables. Others reduce the number of state variables but require more complicated output variable functions.

  1. (0 pts.) Design of a special ALU

Mr. Sinha needs a special arithmetic unit for his work. He has to perform one of several operations on two 3-bit 2’s complement numbers and he needs a circuit which can do this for him depending on his choice of actions. For the 2 numbers A and B (3 bit each), he would like to perform the following operations:

(a) A + B (b) A - B (c) 2A (d) A + 2B

Design a circuit using MUXs, AND gates, inverters and only one 4-bit ripple-carry adder assuming that the four choice above are used as Control Inputs (2 bits) with encodings 00, 01, 10, and 11 in that order respectively. You may ignore overflow. The output should be a 4-bit number.

  1. (10 pts.) Sequence recognizer

Design a sequential circuit using D flip-flops and logic gates that can recognize the sequence “00110”. If this sequence has just occurred, the output, Q, should be set to 1. Otherwise, Q should be 0.

  1. Consider the state diagram in Figure 1.

(a) (1 pts.) Is this a Moore or Mealy machine? (b) (4 pts.) Write the state table for this machine. (c) (5 pts.) Do state assignment and rewrite the state table. (d) (10 pts.) Use Karnaugh maps or Quine-McCluskey’s algorithm to derive minimal SOP equations for the state variables and output.

  1. Consider the following state table

Current Next state/Q state i=0 i= A A/0 C/X B D/0 D/ C A/1 B/ D D/0 C/