Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Digital Circuit Simulation Using Excel
Digital Circuit Simulation Using Excel
Digital Circuit Simulation Using Excel
Ebook243 pages1 hour

Digital Circuit Simulation Using Excel

Rating: 0 out of 5 stars

()

Read preview

About this ebook

This book develops techniques for simulating digital logic circuits in Microsoft’s Excel that provide a useful tool to both the student and the practicing engineer. It introduces the subject by showing how logic devices, taken from the standard 7400 family, can be modeled and stored in a library. These functions can then be combined by the user as building blocks to design more complex circuits, both combinatorial and sequential. The simulations not only allow the designs to be verified to ensure they provide expected outputs and states, but can also perform detailed timing analysis. Worst case timing conditions can be imposed to stress the circuits so that the resultant behavior can be observed. Methods showing how the user can add additional devices to the simulation library are also covered.
LanguageEnglish
Release dateSep 30, 2020
ISBN9781662902505
Digital Circuit Simulation Using Excel

Related to Digital Circuit Simulation Using Excel

Related ebooks

Electrical Engineering & Electronics For You

View More

Related articles

Reviews for Digital Circuit Simulation Using Excel

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Digital Circuit Simulation Using Excel - Anthony Mazzurco

    bibliography.

    CHAPTER

    The Representation of

    Logical Operators

    Basic Circuit Functions

    Digital circuitry design is based on implementing logical statements comprised of variables associated by logical operators or logical connectives. The variables are binary and therefore take on a value of either 0 or 1. The operators define a function performed on independent binary variables to produce a result which is also binary.

    The following is a review of some of the basic operators. We will show their common circuit representations, logic equation symbols, and truth tables.

    The Inverter

    This is a single variable operator which converts a 1 to a 0 and a 0 to a 1. That is, it provides an output whose state is the logical inversion of its input’s state. Below, the circuit symbol for the device is shown where the logical signal flow is left to right.

    In logical equations, the inversion operation is shown either with a tilde in front of or a bar above the independent variable (i.e. the input). So if the independent variable were X and the dependent (output) variable were Y, the inversion of X would be shown as either

    The truth table defining the input/output relationship is straightforward and is given as:

    Since a single independent variable only has two states, there are only two lines in the truth table.

    The Two Input AND Gate

    This basic two-input AND gate operation says that when both inputs are 1, the output is a 1. Otherwise, the output is a 0. Its circuit symbol is:

    The AND operation is usually represented with a dot between the variables being AND-ed together. So if the input variables are X and Y and the output is Z, the AND operation is represented as:

    X · Y = Z

    Sometimes the dot is omitted and the input variables of the AND operation are just concatenated as:

    XY = Z

    Its truth table is:

    Since there are two independent, two state input variables, there are now a total of four combinations in the truth table. In general, the total number of combinations that can be realized for n number of two state variables is 2n. So here 2² = 4.

    If the AND gate has more than two inputs there will be additional rows in the truth table but the output will only be a 1 at the single instance where all of the inputs are simultaneously 1.

    The Two Input OR Gate

    The two input OR gate produces an output of 1 whenever either (or both) of its two inputs is a 1.

    The OR operation is represented with a plus sign. With input variables X and Y and output Z, the OR function is expressed as:

    X + Y = Z

    The truth table for the OR operation is:

    If there were more than two inputs, the number of lines in the table would increase to a total number of 2n as described above, where n is the number of inputs. But regardless of how many inputs it has, the only place where there would be a 0 at the output of the OR gate would be where all of the input variables are zero.

    The Two Input NAND Gate

    This is a very common operator found in practice. This is simply the AND function with an inverted output. The symbol is the same as the AND gate, but with a bubble at the output which is a shorthand representation to show that there is an inversion at this point in the gate. The bubble is not used as a standalone symbol.

    Its formula representation is an inversion over the AND-ing of the two inputs. For inputs X and Y and output Z we have

    ~(X · Y) = Z

    The truth table is

    Clearly, if there are more inputs, the only time that the output would be zero is when all of the inputs are one.

    This is a very versatile function. It can be used to simulate any of the other logical operations we have already mentioned. For example, if inputs X and Y are connected together so that they can only have the same value, the gate would operate as an inverter. This is verified by looking at the first and last rows of the preceding NAND truth table. Specifically, the table reduces to:

    In addition, by putting an inverter after the NAND function, we have implemented an AND.

    For implementing the OR function, DeMorgan’s theorem is used. This theorem states that the inversion of an AND-ing operation between two input signals is logically equivalent to the OR-ing of each input signal’s inversion. Represented as an equation, it states:

    ~(A · B) = ~A + ~B

    This can be verified by a truth table showing all four input combinations:

    The last two columns have the same values in all rows, demonstrating the validity of the theorem.

    Functionally, this says that the NAND function is equivalent to the Invert-OR function where an Invert-OR is an OR gate with its inputs inverted before the OR is applied. The circuit representation is:

    So, in order to implement an OR function with a NAND (or equivalently an Invert-OR) we need to invert the inputs to the gate as shown:

    The Two Input EXCLUSIVE-OR Gate

    This function is similar to the OR gate with the exception that it excludes the case of a 1 at the output when both outputs are 1.

    The schematic representation for the gate is:

    The logical operation is represented with the OR plus sign enclosed in a circle. For inputs X and Y with output Z it is:

    Its truth table is:

    There are other ways looking at this function. One way, when there are just two inputs, is as a two bit comparator. It compares the logical state of its two inputs. When they are different, it outputs a 1. When they are the same, it outputs a 0. Another more general interpretation is that the Exclusive-Or function acts as a parity check over the number of 1s it sees on its inputs. If there are an odd number of 1s, it outputs a 1. An even number of 1s gives a zero. We will come back to this in the next chapter where we will discuss the Exclusive-Or function with more than two inputs. (How can the Exclusive-Or function be implemented with only NAND gates?)

    Remaining Operators

    All of the previously described functions comprise the common operators that are most often used in practice. Two more should be mentioned. They are the NOR and EXCLUSIVE-NOR gates. Their logic symbols, formula representation, and truth tables should be clear from the previous discussion.

    The Two Input NOR Gate

    Symbol

    Formula Representation

    ~(X +Y) = Z

    Truth Table

    (Can the NOR gate be used the same way as the NAND gate to simulate the other basic logical functions?)

    The Two Input EXCLUSIVE-NOR Gate

    Symbol

    Formula Representation

    Truth Table

    There are many excellent sources of information covering gates and their basic logical operations. Further descriptions for the gates discussed in this chapter along with their symbols and truth tables can be found in References [1], [2], [3], [4], [6], [8], and [9].

    The use of the NAND and NOR as universal gates is discussed in References [5], [6], [8], and [9].

    Axioms and theorems governing logical operations are covered in References [3], [4], and [5]. These include association, commutation, and distribution along with DeMorgan’s Theorem.

    CHAPTER

    Simulation of the Basic

    Logical Operators

    The binary logical operations that were reviewed in the previous chapter are simulated in Excel.

    INVERTER

    First consider the INVERTER. Recall that the INVERTER takes a 0 or 1 as its input and inverts it to a 1 or 0, respectively, at its output.

    Consider the following formula view of a spreadsheet (Figure 2-1).

    Two columns of the spreadsheet are used. In Row 2, each column’s function is labeled. Column B contains the input to the INVERTER. Column C gives the resulting output which we label as INVERT.

    There are only two states possible for the input. Naturally they are 0 and 1 and entered in Rows 4 and 5.

    The inversion operation is entered manually in Row 4. The operation is implemented by using the IF function in Cell C4. The operation takes its input from Column B. In Row 4, the IF statement says that if the input in B4 is 0 (the first field in the IF statement), then the output is a 1 (the second field in the IF statement), otherwise it is a 0 (the third field in the IF statement).

    This takes care of Row 4. For Row 5, we don’t need to type in the IF statement again, we just need to copy down C4 into Cell C5.

    The data view of the spreadsheet is shown in Figure 2-2.

    We see the familiar truth table for an Inverter.

    Note that you can switch between the formula and data views of

    Enjoying the preview?
    Page 1 of 1