HW5 Solution Artifact // System Ready
SYSTEM MESSAGE: This document analyzes the timing diagrams and sequential logic problems from Chapter 6.
Click on any module below to reveal the solution logic.
Q updates only at rising clock edges.
Watch the CLR' line. When it dips to 0, Q flatlines to 0 instantly.
Toggles on clock if T=1. Resets if CLR'=0.
The 74112 is Negative-Edge Triggered (updates when clock goes High->Low) and has Active Low PRE/CLR.
Look for the falling edges of the clock.
| CLK ↓ | J | K | Action |
|---|---|---|---|
| 1 | 1 | 0 | Set (1) |
| 2 | 0 | 1 | Reset (0) |
| 3 | 1 | 1 | Toggle |
Async inputs win.
The diagram shows gates feeding the Flip-Flop input. Let's trace the wires:
$$ D = X \oplus Q $$
This means the Next State will be the XOR of Input X and Current State Q.
Result: It acts like a T Flip-Flop!
(If X=1, it toggles. If X=0, it holds).
$$ T = X \oplus Q $$
Next State = $$ Q \oplus T = Q \oplus (X \oplus Q) $$
$$ = X \oplus (Q \oplus Q) = X \oplus 0 = X $$
Result: It acts like a D Flip-Flop!
(Next state is just X).
Rule: If A=0, Q* = B. If A=1, Q* = B'.
We can write this as a Sum of Products:
| Current State | Inputs (AB) | Next State | Logic |
|---|---|---|---|
| 0 | 00 | 0 | A=0, copy B (0) |
| 0 | 01 | 1 | A=0, copy B (1) |
| 0 | 10 | 1 | A=1, inv B (1) |
| 0 | 11 | 0 | A=1, inv B (0) |
| Repeat logic for Current State = 1 | |||
Problems 7 and 8 require building a State Table. Since the exact wire connections are hard to read perfectly from the scan, here is the standard algorithm to solve them:
Look for the Flip-Flops. Label their outputs (e.g., Q1, Q2). These are your "Present State".
Trace the wires backwards from the D inputs of the Flip-Flops.
Example: D1 = (X AND Q2) OR Q1
Create a table with columns: Present State (Q1 Q2), Input (X), Next State (Q1* Q2*), Output (Z).
| Present | Input | Next State | Output | ||
|---|---|---|---|---|---|
| Q1 | Q2 | X | D1 -> Q1* | D2 -> Q2* | Z |
| 0 | 0 | 0 | ? | ? | ? |
| 0 | 0 | 1 | ? | ? | ? |
| 0 | 1 | 0 | ? | ? | ? |
| ...continue for all combinations (00, 01, 10, 11) | |||||