Designing circuits
The goal in circuit designis to build hardware that solves some problem.
The basic approach is to express the solution as a Boolean function, which can then be converted to a circuit.
1.Figureout how many inputs and outputs you need.
2.Describe the function as a truth table or a Boolean expression.
3.Find a simplified Boolean expression for the function.
4.Build the circuit based on your simplified expression.
Example: comparing 2-bit numbers
Let’s design a circuit that compares two 2-bit numbers, Aand B. There are three possible results: A > B, A = B or A < B.
We will represent the results using three separate outputs.
—G(“Greater”) should be 1 only when A > B.
—E(“Equal”) should be 1 only when A = B.
—L(“Lesser”) should be 1 only when A < B.
Make sure you understand the problem!
—Inputs A and B will be 00, 01, 10, or 11 (0, 1, 2 or 3 in decimal).
—For any inputs A and B, exactly one of the three outputs will be1.
Step 1: How many inputs and outputs?
How many inputs and outputs will this circuit have?
—Two 2-bit numbers means a total of fourinputs. Let’s say the first number consists of bits called A1and A0(from left to right), while second number has bits B1and B0.
—The problem specifies three outputs: G, Eand L.
Here is a block diagramthat shows the inputs and outputs explicitly.
This is like a function header or prototype in programs, which lists the inputs and outputs of a function.
Now the hard part is to design the circuitry that goes inside the box.
Step 2: Functional specification
For this problem, it’s probably easiest to start with a truth table. This way we can explicitly show the relationship (>, =, <) between the inputs.
A four-input function has a sixteen-row truth table. For convenience, the rows are in binary numeric order from 0000 to 1111 for A1, A0, B1 and B0.
For example, 01 < 10, so the sixth row of the truth table (corresponding to inputs A=01 and B=10) shows that output L=1, while Gand Eare both 0.


No comments:
Post a Comment