|
![]() |
Logic Circuits Designs
Introduction | Logic Circuit Design Process | Build and Test | Universal Gates | Programmable Logic Devices | Study Tools | Practice Quiz
Introduction |
![]() |
Last week, we discussed the process of using truth tables and SOP representations to describe the behavior of a desired digital circuit. This week, we continue on this topic and describe how to refine and implement designs. We will see how more efficient designs are possible, even after simplification, by using the concept of universal gates - in our case this refers to NAND gate logic. We also discuss the use of programmable logic in implementing logic circuits.
Logic Circuit Design Process |
![]() |
The process for designing a digital circuit was illustrated last week. The steps required to design a simple combinational logic circuit are:
As an illustration of using these steps (except the final step that requires a lab), consider the design of a simple majority tester. This is a circuit with three inputs that outputs a 1 whenever at least two of the inputs are 1. This circuit has practical applications where multiple instruments are used for redundancy in determining which inputs are correct (majority rules).
STEP 1 - CREATE TRUTH TABLE
A |
B |
C |
X |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
1 |
1 |
STEP 2 - CREATE SOP EXPRESSION
The SOP for this truth table is:
|
STEP 3 - SIMPLIFY THE SOP EXPRESSION
Using either Boolean rules or software, the SOP expression can be simplified to:
|
STEPS 4 AND 5 - DRAW PRODUCT TERMS AND SUM TOGETHER
Circuit for Steps 4 & 5: Draw Product Terms and Sum TogetherThis circuit is drawn in the Multisim application and shows three inputs, labeled A, B and C going into a circuit that consists of 5 two-input gates, in three stages, with an output labeled “X”. |
STEP 6 - SIMULATE THE CIRCUIT
Adding switches for the input and a logic probe for the output allows a full simulation. One of the conditions is shown below:
Circuit for Step 6: Simulate the CircuitThis circuit described above is drawn again in the Multisim application with several additions. In this version, the circuit has added switches to control the inputs, has been grounded, and has power added. The final output is now connected to an LED labeled “X” that is shown in RED to indicate that it is “ON” and it is marked at 2.5 V. |
In performing the simulation, ensure that the circuit operates correctly for all possible input combinations.
Build and Test |
![]() |
The final step in the digital design process that we laid out above requires us to build and test the circuit we have drawn. This means, again, that we have to learn several things before building the circuit and being able to test it to prove that it works. Once we have learned these few things and have built a working circuit, we will have learned and applied a lot of information!
Here is a list of some things we need to know before we build and test any circuit:
Universal Gates |
![]() |
An interesting property of both NAND and NOR gates is that they each can be used to produce all of the logic functions. For example, tying both inputs of a NAND gate together produces an inverter. Using the NAND inverter on the output of a regular NAND gate creates an AND gate equivalent; using the NAND inverter on each input to a NAND gate creates an OR gate equivalent. You can verify these operations with simple truth tables.
There are several reasons that the universal property of NAND gates is critical. Digital logic integrated circuits are created using transistor switches to determine whether the IC voltage input (Vcc) or IC ground input is output based on the state of the inputs. In designing these ICs, NAND gates require fewer transistors than any other type of gate. This means less power used by an individual gate and a higher density of more complex circuits.
A second reason to use a simple type of gate is to minimize the number of different types of ICs required for a design. Multiple different types of ICs require a large inventory of circuit maintenance. This second reason is not as important thanks to the rise of programmable logic.
The MultiSim Logic Converter is designed to allow conversion to a NAND-gate design. Returning to the majority tester design, note the final button on the Logic Converter:
MultiSim Logic ConverterThis picture shows a screenshot of the Logic Converter from within the MultiSim application. The information listed in the Logic Converter refers back to the Majority Tester that was mentioned prior in the lecture. |
Pressing this button converts the design to one using only NAND gates:
MultiSim Circuit SchematicThis picture shows a screenshot of a four-stage circuit schematic created from within the MultiSim application for the majority tester circuit shown in the logic converter screen above using ONLY two-input NAND gates. Inputs A, B and C are shown in the top left of the diagram denoted using white 1/16 inch circles. Input A delivery is marked with a red “1”, input B delivery is marked with a red “3” and input C delivery is marked with a red “2”. |
At first glance, this seems less efficient than the design using AND-OR gates, six gates instead of five. However, this uses only one type of IC instead of two. In more complicated designs, the use of NAND logic will usually require fewer total gates as well.
Programmable Logic Devices |
![]() |
Programmable logic devices (PLD) allow the user to define the logic function that the IC will perform and the pins that will be used as inputs and outputs. Most of these devices can be re-programmed to perform different logic functions. Some of these devices can be programmed only once, which stops them from being RE-programmable. Programmable devices are available in different sizes (number of gates) and technology (in-circuit programmable, not re-programmable, out of circuit programmable, CMOS, TTL-compatible outputs, and so on).
The most important aspect of these devices is that they can perform different logic functions using different input/output pin assignments during their lifespan. A 5-input OR gate can be re-programmed to become an 8-input NAND gate, using different (OR some of the same) input and output pin numbers. These devices perform the logic function for which they are programmed when they are in a circuit. If the digital circuit designer wants the device to perform a different logic function, it can be re-programmed.
These devices have titles such as PLDs (programmable logic devices), CPLDs (complex programmable logic devices), and FPGAs (field programmable gate arrays). These devices have different sizes and numbers of available input and output pins. The size of these devices, ranging from MOST GATES to FEWEST GATES, could be shown in the following order: 1) FPGAs, 2) CPLDs, and 3) PLDs.
Gate count is one of many variables we use to help us select the type of PLD we want to use in a digital circuit. A digital designer will be as, or more, concerned with PLD characteristics such as the total number of I/O (input/output) pins, switching speed (propagation delay), and the output's electrical characteristics (TTL, CMOS, and so on).
Digital circuit design, using programmable logic, uses various methods to generate the circuit. Designs can be entered in graphical form, meaning that you choose the type of gates that you would use and enter them in a logic diagram form. The typical way, however, to create a logic circuit for a programmable logic device is to use a programming language that allows you to enter the logic functions in a manner similar to Boolean algebra.
One thing to realize is that there is no fundamental difference in the design process when you are choosing between PLDs and fixed function logic devices. The difference is in the type of devices used to implement the design.
Various programming languages are used with programmable logic, but some of the more prevalent are VHDL, Verilog, and versions of the C programming language. The process for implementing a logic circuit design using HDL (hardware description language) may vary, but here are the steps that have to be followed:
Test and verify that the device works as expected; if not, return to Step 1. An example of a VHDL program written to duplicate the majority tester circuit is shown below. Do not spend too much time trying to understand the coding; just notice the use of Boolean expressions to describe the circuit. We will study the use of VHDL for describing digital circuits in a later course.
-- HDL Design Example |
Notice that the VHDL statement for Output X is an assignment statement (<=) with the relationships between INPUTS A, B, and C shown on the right-hand side of this statement in the form of a Boolean SOP expression. The only difference between this statement and its Boolean expression is that the words AND, OR, and NOT are used. This indicates the importance of understanding these terms and their logic functions, and shows us another way in which they are used. In this case, you are writing a program (software), in VHDL language that generates a hardware circuit when downloaded and implemented on a PLD.
Study Tools |
![]() |
Click on the link above to test your knowledge on this week's material. Note: These activities will open in a new pop-up window, so you may need to disable any pop-up blockers. Click here to see transcripts
Practice Quiz |
![]() |
1) How many NAND gates are required to create a two-input OR gate?
|
2) Determine the Boolean expression for the circuit shown below.
|
3) How many NAND gates are required to implement the Boolean expression
|
![]() |