Introduction
Recently, I read “Manga Guide to Digital Electronics.” Here are some quick notes.
I’m not covering everything from the book here.
Preliminaries
Digital circuits are split into Combinational Circuits and Sequential Circuits.
Combinational Circuits: Their output is determined solely by the current combination of inputs.
Sequential Circuits: These circuits have “memory.”
MIL Symbols
Logic gate symbols like AND and OR are extended to represent multiple inputs and a single output.
Symbol Meanings
AND Gate (ALL): Output is 1 only if all inputs are 1.
OR Gate (EXIST): Output is 1 if at least one input is 1.
Wire Connections
A circle indicates a low logic level (0, L).
No circle indicates a high logic level (1, H).
Building Combinational Circuits
Majority Voting Circuit
Multiple people vote to choose one of two outcomes.
Create a truth table listing all possible input combinations.
Underline entries in the truth table where the output is H (High).
Set up the framework with “input lines” and “NOTed input lines.” This means two columns of downward lines; the second column uses NOT gates connected from the first.
Connect to AND gates.
- If an input is L (Low), connect from its NOTed line (second column).
- If an input is H (High), connect from its original line (first column).
- Then, connect these to an AND gate.
Repeat this for all underlined entries from step 2.
Connect all AND gate outputs to an OR gate.
Circuit Simplification
Digital circuit design flow: Problem definition -> Truth table -> Simplification -> Circuit diagram.
Simplify using Karnaugh Maps (K-maps).
Convert the truth table into a K-map. When building the truth table, columns usually start with the most significant bit, e.g., [C, B, A], with the result Z. A K-map is a 2D truth table, typically using 0s and 1s for logic levels. For three inputs, you might use B, A for rows/columns and C for the other axis, then fill the 2D table with the results.
K-map Basics for Simplification K-maps wrap around horizontally and vertically because adjacent cells (including wrap-around) differ by only one bit.
Simplification Process
- Group adjacent 1s together.
- Find commonalities among the variables within each group (rows and columns).
- If a common variable’s value is 0, use its complement (e.g., A becomes !A).
Example
C\BA 00 01 11 10 0 1 1 1 In the table above, the commonalities are C=0 and A=1, so the expression is !C * A.
Simplification Rules
- Groups must be rectangular (or square) with sides of length 1, 2, or 4.
- Groups can overlap.
- Aim for the fewest, largest possible groups.
Note: Groups can span across the edges (left-right, top-bottom wrap-around). If no further groups can be formed, the circuit is as simplified as possible.
After simplification, draw the circuit diagram. Just follow the circuit drawing steps (starting from step 3 in the previous section) for all derived expressions.
Don’t Cares in Circuits
When defining inputs, due to the nature of binary numbers, there might be “don’t care” inputs that don’t need consideration.
For instance, if inputs represent months (1-12) using four binary bits, there are 16 possible inputs. Numbers like 0, 13, 14, and 15 are “don’t cares” because they’re invalid month values.
These “don’t care” inputs can be represented by ‘-’ in a K-map and can be included in groups to further simplify the expression.
Building Sequential Circuits
Sequential circuits require both combinational logic and flip-flops.
Regarding the “memory” in sequential circuits: Think of a vending machine. It remembers the total amount inserted. Without memory, it would only recognize the last coin’s value.
A flip-flop, like a clock (CLK), is introduced. Inputs only affect outputs when the CLK is triggered; otherwise, the output remains unchanged.
Let’s take drawing an electronic die as an example.
Draw the state transition diagram. How does the electronic die change over time? If “stop” is low, it cycles from 1 to 6, then back to 1. If “stop” is high, it stays at a specific point.
Represent states using binary numbers. Represent each situation or state using binary, then create a state transition table. Design the circuit from the state transition table, using D flip-flops to store states.
Design the combinational circuit. Determining the next state from the current state is, essentially, a combinational circuit.