How To Draw Waveform Of Logic Gates
EECS 31/CSE 31/ICS 151 Homework 5 Questions with Solutions
View Questions Only
View Questions with Strategies
Problem 1
Question
(SR latch) Draw the output and timing diagram of a (a) NOR and (b) NAND implementation of an SR latch for the input signals depicted in Figure P6.2.
Figure P6.2
Solution
Problem 2
Question
(SR latch) Derive an implementation of a clocked SR latch using only:
- NOR gates
- NAND gates
- AND, OR and INVERT gates
Solution
-
- Write Boolean equations for Q and Q' of clocked SR latch.
Q(next) = (RC + (Q'))' Q'(next) = (SC + Q)'
- Use NOR to express the above equations.
Q(next) = ((R' + C')' + (Q'))' Q'(next) = ((S' + C') + Q)'
- Draw the logic schematic.
- Write Boolean equations for Q and Q' of clocked SR latch.
-
- Write Boolean equations for Q and Q' of clocked SR latch.
Q(next) = (RC + (Q'))' Q'(next) = (SC + Q)'
- Use NAND to express the above equations.
Q(next) = ((RC)'(Q')')'' Q'(next) = ((SC)'Q')''
- Draw the logic schematic.
- Write Boolean equations for Q and Q' of clocked SR latch.
-
- Write Boolean equations for Q and Q' of clocked SR latch.
Q(next) = (RC + (Q'))' Q'(next) = (SC + Q)'
- Use AND, OR and NOT to express the above equations.
Q(next) = (RC + (Q'))' Q'(next) = (SC + Q)'
- Draw the logic schematic.
- Write Boolean equations for Q and Q' of clocked SR latch.
Problem 3
Question
(JK flip-flops) Derive the output waveforms of a master-slave JK flip-flop for the input waveforms depicted in Figure P6.6.
Figure P6.6
Solution
- Develop characteristic table for JK flip-flop.
J K Q(next) 0 0 Q 0 1 0 1 0 1 1 1 Q' - According to the characteristic table and the J, K and Clk waveform, draw the Q waveform
- Indicate delays on the timing diagram.
Problem 4
Question
(Sequential Analysis) Derive a (a) state table and (b) state diagram for the sequential circuit shown in Figure P6.9
Figure P6.9
Solution
- Write out next state equations for the sequential circuit.
Q0(next) = Q1 Q1(next) = Q2 Q2(next) = Q3 Q3(next) = Q0'
- Draw the state table according to the next state equations.
R Q3 Q2 Q1 Q0 Q3(next) Q2(next) Q1(next) Q0(next) 0 X X X X 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 0 0 1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 1 1 0 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 0 1 1 0 1 0 1 1 1 1 0 0 1 1 1 0 1 1 1 0 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 - Draw the state diagram according to the state table.
Problem 5
Question
(State minimization) Derive the minimal-state FSM from the state/output table shown in Figure P6.12.
PRESENT STATE | NEXT STATE | |
---|---|---|
x = 0 | x = 1 | |
S0 | S0/1 | S4/0 |
S1 | S0/0 | S4/0 |
S2 | S1/0 | S5/0 |
S3 | S1/0 | S5/0 |
S4 | S2/0 | S6/1 |
S5 | S2/0 | S6/1 |
S6 | S3/0 | S7/1 |
S7 | S3/0 | S7/1 |
Figure P6.12
Solution
(1), (2), (3) Using implication table, find equivalent states.
(4) Group all the equivalent states into equivalence classes, rewrite the state/output table.
G0 = {s0}, G1 = {s1}, G2 = {s2, s3}, G3{s4, s5, s6, s7}
PRESENT STATE | NEXT STATE | |
---|---|---|
x = 0 | x = 1 | |
G0 | G0/1 | G3/0 |
G1 | G0/0 | G3/0 |
G2 | G1/0 | G3/0 |
G3 | G2/0 | G3/1 |
Problem 6
Question
(Sequential Synthesis) Design a counter that counts in the sequence 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,..., using natural binary encoding and D-type flip-flops.
Solution
- In order to implement this modulo-10 counter, we will need four flip-flops labeled: Q3, Q2, Q1, Q0. Using natural binary encoding, we can derive a state trasitions table:
- From the transitions tabel, write transitions equations.
Q3(next) = Q2Q1Q0 + Q3Q1'Q0' Q2(next) = Q2'Q1Q0 + Q2Q1' + Q2Q0' Q1(next) = Q3'Q1'Q0 +Q1Q0' Q0(next) = Q0'
- Derive logic schematic.
Problem 7
Question
(Sequential Synthesis) Design a recognizer that recognizes an input sequence that has at least three 1's. The recognizer has a single input X, and a single output Y, in addition to an asynchronous Reset signal. The recognizer sets the output Y to 1 if the input signal X was equal to 1 in at least 3 clock cycles after the Reset was disasserted. For the above recognizer described above:
- Devise the state diagram.
- Minimize the number of states.
- Encode the states to minimize the combinatorial logic.
- Draw a schematic diagram using D flip-flops.
Solution
-
Define the states as the following:
- S0: 0 ones received,
- S1: 1 ones received,
- S2: 2 ones received,
- S3: 3 or more ones received.
The state diagram is:
- The state/output table is:
PRESENT STATE NEXT STATE Walk = 0 Walk = 1 S0 S0/0 S1/0 S1 S1/0 S2/0 S2 S2/0 S3/0 S3 S3/1 S3/1 From the state/output table, we can minimize the state number by using implication table.
- The equations defining the implimentation can be describe as:
D1 = Q1 + Q0X D0 = Q0X' + Q1'X Y = Q1Q0'
- Draw logic schematic from the eqations using D flip-flops:
Problem 8
Question
Sequential Synthesis) Design a simplified traffic-light controller that switches traffic lights on a crossing where a north-south (NS) street intersects an east-west (EW) street. The input to the controller is the WALK button pushed by pedestrians who want to cross the street. The outputs are two signals NS and EW that control the traffic lights in NS and EW directions. When NS or EW are 0, the red light is on and when they are 1, the green light is on. When there are no pedestrians, NS=0 and EW=1 for 1 minute, followed by NS=1 and EW=0 for 1 minute and so on. When a WALK button is pushed, NS and EW both come 1 for a minute when the present minute expires. After that the NS and EW signals continue alternating. For the traffic-light controller:
- Develop a state diagram and state/output table.
- Minimize the number of states.
- Encode the states.
- Draw a schematic diagram.
Solution
-
Define the states as the following:
S0: ( NS = 0, EW = 1) S1: ( NS = 1, EW = 0) S2: ( NS = 1, EW = 1)
The state diagram is:
-
The state/output table is:
PRESENT STATE NEXT STATE Walk = 0 Walk = 1 S0 S1/01 S2/01 S1 S0/10 S2/10 S2 S0/11 S2/11 As you can see below, the number of states is minimal.
- Using minimum-bit-change strategy, get the minimizing state encoding as following:
S0 = 00 S1 = 01 S2 = 10
- After state encoding, the state/output stable will be:
PRESENT STATE NEXT STATE Walk = 0 Walk = 1 00 01/01 10/01 01 00/10 10/10 11 XX/XX XX/XX 10 00/11 10/11 -
The equations defining the implimentation can be describe as:
D0 = Q1'Q0'Walk' D1 = Walk NS = Q0 + Q1 EW = Q0'
-
Draw logic schematic from the eqations using D flip-flops:
How To Draw Waveform Of Logic Gates
Source: http://www.cecs.uci.edu/~gajski/eecs31/homeworks/hw5_solutions.html
Posted by: boedingtorned1980.blogspot.com
0 Response to "How To Draw Waveform Of Logic Gates"
Post a Comment