In science, technology, business, and, in fact, most other fields, we are constantly dealing with quantities. Quantities are measured, monitored, recorded, manipulated arithmetically, observed, or in some other way utilized in most physical systems. It is important when dealing with various quantities that we be able to represent their values efficiently and accurately. There are basically two ways of representing the numerical value of quantities:
Analog
Digital
In analog representation, a quantity is represented by a continuously variable, proportional indicator.
In digital representations, the quantities are represented not by continuously variable indicators but by symbols called digits.
The major difference between analog and digital quantities, then, can be simply stated as follows:
Concept to understand and memorize:
analog ~ continuous
digital ~ discrete (step by step)
Examples:- Find out which one is analog and which one is digital.
Ten-position switch
Current flowing from an electrical outlet
The temperature of a room
Sand grains on the beach
Automobile fuel gauge
A digital system is a combination of devices designed to manipulate logical information or physical quantities that are represented in digital form; that is, the quantities can take on only discrete values. These devices are most often electronic, but they can also be mechanical, magnetic, or pneumatic. Some of the more familiar digital systems include digital computers and calculators, digital audio and video equipment, and the telephone system—the world’s largest digital system.
An analog system contains devices that manipulate physical quantities that are represented in analog form. In an analog system, the quantities can vary over a continuous range of values. For example, the amplitude of the output signal to the speaker in a radio receiver can have any value between zero and its maximum limit. Other common analog systems are audio amplifiers, magnetic tape recording and playback equipment, and a simple light dimmer switch.
There are many advantages of using digital systems. Few are given below,
Digital systems are generally easier to design.
Information storage is easy.
Accuracy and precision are easier to maintain throughout the system.
The operation can be programmed.
Digital circuits are less affected by noise.
There are also a few limitations of digital systems, that are
Real world is analog.
Processing the digital signals are slow.
Concept and Motivation: "The present and future is digital"
Boolean algebra differs in a major way from ordinary algebra because Boolean constants and variables are allowed to have only two possible values, 0 or 1. A Boolean variable is a quantity that may, at different times, be equal to either 0 or 1. Boolean variables are often used to represent the voltage level present on a wire or at the input/output terminals of a circuit.
Boolean 0 and 1 do not represent actual numbers but instead represent the state of a voltage variable, or what is called its logic level. A voltage in a digital circuit is said to be at the logic 0 level or the logic 1 level, depending on its actual numerical value. In digital logic, several other terms are used synonymously with 0 and 1 as shown in the Table.
A truth table is a means for describing how a logic circuit’s output depends on the logic levels present at the circuit’s inputs. The table lists all possible combinations of logic levels present at inputs A and B, along with the corresponding output level x. The first entry in the table shows that when A and B are both at the 0 levels, the output x is at the 1 level or, equivalently, in the 1 state and so on. The number of input combinations will equal 2power(N) for an N-input truth table. Also note that the list of all possible input combinations follows the binary counting sequence, and so it is an easy matter to write down all of the combinations without missing any. Below figures show the various truth tables for 2, 3 and 4 inputs with their corresponding dummy output for the unknown logic circuit.
There are three fundamental operations used in Boolean Algebra to design digital logic circuits. These fundamental operations are enlist and described below,
OR operation
And Operation
Not Operation
The truth table in Figure (a) shows what happens when two logic inputs, A and B, are combined using the OR operation to produce the output x. The table shows that x is a logic 1 for every combination of input levels where one or more inputs are 1. The only case where x is a 0 is when both inputs are 0.
The Boolean expression for the OR operation is x= A + B which is read as "X equals A OR B". In this expression, the sign (+) does not stand for ordinary addition; it stands for the OR operation.
In digital circuitry, an OR gate* is a circuit that has two or more inputs and whose output is equal to the OR combination of the inputs. In above Figure (b) is the logic symbol for a two-input OR gate. The inputs A and B are logic voltage levels, and the output x is a logic voltage level whose value is the result of the OR operation on A and B. In other words, the OR gate operates so that its output is HIGH (logic 1) if either input A or B or both are at a logic 1 level. The OR gate output will be LOW (logic 0) only if all its inputs are at logic 0.
The truth table in Figure (a) shows what happens when two logic inputs, A and B, are combined using the AND operation to produce output x. The table shows that x is a logic 1 only when both A and B are at the logic 1 level. For any case where one of the inputs is 0, the output is 0.
The Boolean expression for the AND operation is x = A . B which is read as "X equals A AND B". In this expression, the sign (.) does not stand for ordinary multiplication; it stands for the AND operation. The sign ( . ) is usually omitted so that the expression simply becomes X = AB;
In digital circuitry, an AND gate* is a circuit that has two or more inputs and whose output is equal to the AND combination of the inputs. The logic symbol for a two-input AND gate is shown in above Figure (b). The AND gate output is equal to the AND product of the logic inputs; that is, X= AB. In other words, the AND gate is a circuit that operates so that its output is HIGH only when all its inputs are HIGH. For all other cases, the AND gate output is LOW.
The NOT operation is unlike the OR and AND operations because it can be performed on a single input variable. For example, if the variable A is subjected to the NOT operation, the result x can be expressed as x = A' or A(bar)
where the overbar represents the NOT operation. This expression is read as “x equals NOT A” or “x equals the inverse of A” or “x equals the complement of A.”
The NOT operation is also referred to as inversion or complementation, and these terms will be used interchangeably throughout on this website. Although we will always use the overbar indicator to represent inversion, it is important to mention that another indicator for inversion is the prime symbol ('). That is, Both should be recognized as indicating the inversion operation.
Two other types of logic gates, NOR gates and NAND gates, are widely used in digital circuits. These gates actually combine the basic AND, OR, and NOT operations, so it is a relatively simple matter to write their Boolean expressions.
NOR Gate:- The symbol for a two-input NOR gate is shown in Figure (a). It is the same as the OR gate symbol except that it has a small circle on the output. The small circle represents the inversion operation. Thus, the NOR gate operates like an OR gate followed by an INVERTER, so that the circuits in Figure (a) and (b) are equivalent, and the output expression for the NOR gate is x = (A + B)' or X=bar(A+B).
The truth table in Figure (c) shows that the NOR gate output is the exact inverse of the OR gate output for all possible input conditions. An OR gate output goes HIGH when any input is HIGH; the NOR gate output goes LOW when any input is HIGH. This same operation can be extended to NOR gates with more than two inputs.
NAND Gate:- The symbol for a two-input NAND gate is shown in Figure (a). It is the same as the AND gate symbol except for the small circle on its output. Once again, this small circle denotes the inversion operation. Thus, the NAND operates like an AND gate followed by an INVERTER, so that the circuits of Figure 3 (a) and (b) are equivalent, and the output expression for the NAND gate is x = (AB)'.
The truth table in Figure (c) shows that the NAND gate output is the exact inverse of the AND gate for all possible input conditions. The AND output goes HIGH only when all inputs are HIGH, while the NAND output goes LOW only when all inputs are HIGH. This same characteristic is true of NAND gates having more than two inputs.
Two special logic circuits that occur quite often in digital systems are the exclusive-OR and exclusive-NOR circuits.
eXclusive OR (XOR) Gate:- This particular combination of logic gates occurs quite often (Figure (a)) and is very useful in certain applications. In fact, the XOR circuit has been given a symbol of its own, shown in Figure (b). This symbol is assumed to contain all of the logic contained in the XOR circuit and therefore has the same logic expression and truth table. This XOR circuit is commonly referred to as an XOR gate, and we consider it as another type of logic gate. The IEEE/ANSI symbol for an XOR gate is shown in Figure (c).
This circuit produces a HIGH output whenever the two inputs are at opposite levels. This is the exclusive-OR circuit as shown in Figure (a), which will hereafter be abbreviated XOR. An XOR gate has only two inputs; there are no three-input or four-input XOR gates. The two inputs are combined so that A shorthand way that is sometimes used to indicate the XOR output expression is X= A'B + AB' or A ⊕ B. where the symbol ⊕ represents the XOR gate operation. The characteristics of an XOR gate are summarized as follows:
It has only two inputs and its output is X= A'B + AB' or A ⊕ B.
Its output is HIGH only when the two inputs are at different levels.
eXclusive-NOR Gate:- The exclusive-NOR circuit (abbreviated XNOR) operates completely opposite to the XOR circuit. Figure (a) shows an XNOR circuit and its accompanying truth table. The output expression is x= A'.B' + A.B, which indicates along with the truth table that x will be 1 for two cases: A = B = 1 (the AB term) and A=B= 0 (the term).In other words: The XNOR produces a HIGH output whenever the two inputs are at the same level.
It should be apparent that the output of the XNOR circuit is the exact inverse of the output of the XOR circuit. The traditional symbol for an XNOR gate is obtained by simply adding a small circle at the output of the XOR symbol [Figure (b)] above. The IEEE/ANSI symbol adds a small triangle to the output of the XOR symbol. Both symbols indicate an output that goes to its active-LOW state when only one input is HIGH.
The XNOR gate also has only two inputs, and it combines them so that its output is x= A'.B' + A.B. A shorthand way to indicate the output expression of the XNOR is x= (A ⊕ B). The XNOR gate is summarized as follows:
It has only two inputs and one output.
Its output is HIGH only when the two inputs are at the same level.
We have seen how Boolean algebra can be used to help analyze a logic circuit and express its operation mathematically. We will continue our study of Boolean algebra by investigating the various Boolean theorems (rules) that can help us to simplify logic expressions and logic circuits.
The first group of theorems is given in the Figure on the right side. In each theorem, x is a logic variable that can be either a 0 or a 1. Each theorem is accompanied by a logic-circuit diagram that demonstrates its validity.
The theorems presented below involve more than one variable:
(9) x + y = y + x
(10) x . y = y . x
(11) x + (y +z) = (x + y) + z = x + y + z
(12) x(yz) = (xy)z = xyz
(13a) x(y + z) = xy + xz
(13b) (w + x)(y + z) = wy + xy + wz + xz
(14) x + xy = x
(15a) x + x'y = x + y
(15b) x' + xy = x' + y
Theorems (9) and (10) are called the commutative laws. These laws indicate that the order in which we OR or AND two variables is unimportant; the result is the same. Theorems (11) and (12) are the associative laws, which state that we can group the variables in an AND expression or OR expression any way we want. Theorem (13) is the distributive law, which states that an expression can be expanded by multiplying term by term just the same as in ordinary algebra. This theorem also indicates that we can factor an expression. Theorems (14) and (15), on the other hand, do not have any counterparts in ordinary algebra. Each can be proved by trying all possible cases for x and y.
Two of the most important theorems of Boolean algebra were contributed by a great mathematician named DeMorgan. DeMorgan’s theorems are extremely useful in simplifying expressions in which a product or sum of variables is inverted. The two theorems are:
(16) (x + y)' = x' . y'
(17) (x . y)' = x' + y'
Theorem (16) says that when the OR sum of two variables is inverted, this is the same as inverting each variable individually and then ANDing these inverted variables. Theorem (17) says that when the AND product of two variables is inverted, this is the same as inverting each variable individually and then ORing them. Each of DeMorgan’s theorems can readily be proven by checking for all possible combinations of x and y.
Let us examine theorems (16) and (17) from the standpoint of logic circuits. First, consider theorem (16):
(16) (x + y)' = x' . y'
The left-hand side of the equation can be viewed as the output of a NOR gate whose inputs are x and y. The right-hand side of the equation, on the other hand, is the result of first inverting both x and y and then putting them through an AND gate. These two representations are equivalent and are illustrated in below Figure (a). What this means is that an AND gate with INVERTERs on each of its inputs is equivalent to a NOR gate. In fact, both representations are used to represent the NOR function. When the AND gate with inverted inputs is used to represent the NOR function, it is usually drawn as shown in Figure (b), where the small circles on the inputs represent the inversion operation.
Each of these sum-of-products expressions consists of two or more AND terms (products) that are ORed together. Each AND term consists of one or more variables individually appearing in either complemented or uncomplemented form.
Another general form for logic expressions is sometimes used in logic circuit design. Called the product-of-sums (POS) form, it consists of two or more OR terms (sums) that are ANDed together. Each OR term contains one or more variables in complemented or uncomplemented form.
When the desired output level of a logic circuit is given for all possible input conditions, the results can be conveniently displayed in a truth table. The Boolean expression for the required circuit can then be derived from the truth table. Any logic problem can be solved using the following step-by-step procedure.
Interpret the problem and set up a truth table to describe its operation.
Write the AND (product) term for each case where the output is 1.
Write the sum-of-products (SOP) expression for the output.
Simplify the output expression if possible.
Implement the circuit for the final, simplified expression.
The Karnaugh map (K map) is a graphical tool used to simplify a logic equation or to convert a truth table to its corresponding logic circuit in a simple, orderly process. Although a K map can be used for problems involving any number of input variables, its practical use is limited to five or six variables.
The K map, like a truth table, is a means for showing the relationship between logic inputs and the desired output. The above figure shows three examples of K maps for two, three, and four variables, together with the corresponding truth tables.
The expression for output X can be simplified by properly combining those squares in the K map that contain 1s. The process for combining these 1's is called looping.
Looping Groups of Two (Pairs):- This map contains a pair of 1s that are adjacent to each other. Looping a pair of adjacent 1s in a K map eliminates the variable that appears in the complemented and uncomplemented form.
Looping Groups of Four (Quads):- A K map may contain a group of four 1s that are adjacent to each other. This group is called a quad. Looping a quad of adjacent 1s eliminates the two variables that appear in both complemented and uncomplemented forms.
Looping Groups of Eight (Octets):- A group of eight 1s that are adjacent to one another is called an octet. Looping an octet of adjacent 1s eliminates the three variables that appear in both complemented and uncomplemented forms.
When a variable appears in both complemented and uncomplemented forms within a loop, that variable is eliminated from the expression. Variables that are the same for all squares of the loop must appear in the final expression. It should be clear that a larger loop of 1s eliminates more variables. To be exact, a loop of two eliminates one variable, a loop of four eliminates two variables, and a loop of eight eliminates three. This principle will now be used to obtain a simplified logic expression from a K map that contains any combination of 1s and 0s.
The procedure will first be outlined and then applied to several examples. The steps below are followed in using the K-map method for simplifying a Boolean expression:
Construct the K map and place 1s in those squares corresponding to the 1s in the truth table. Place 0s in the other squares.
Examine the map for adjacent 1s and loop those 1s that are not adjacent to any other 1s. These are called isolated 1s.
Next, look for those 1s that are adjacent to only one other 1. Loop any pair containing such a 1.
Loop any octet even if it contains some 1s that have already been looped.
Loop any quad that contains one or more 1s that have not already been looped, making sure to use the minimum number of loops.
Loop any pairs necessary to include any 1s that have not yet been looped, making sure to use the minimum number of loops.
Form the OR sum of all the terms generated by each loop.
When the desired output is presented as a Boolean expression instead of a truth table, the K map can be filled by using the following steps:
Get the expression into SOP form if it is not already in that form.
For each product term in the SOP expression, place a 1 in each K-map square whose label contains the same combination of input variables. Place a 0 in all other squares.
The K-map process has several advantages over the algebraic method. K mapping is a more orderly process with well-defined steps compared with the trial-and-error process sometimes used in algebraic simplification. K mapping usually requires fewer steps, especially for expressions containing many terms, and it always produces a minimum expression.
Some logic circuits can be designed so that there are certain input conditions for which there are no specified output levels, usually because these input conditions will never occur. In other words, there will be certain combinations of input levels where we “don’t care” whether the output is HIGH or LOW. A don’t-care condition can come about for several reasons, the most common being that in some situations certain input combinations can never occur, and so there is no specified output for these conditions. A circuit designer is free to make the output for any don’t-care condition either a 0 or a 1 to produce the simplest output expression. Whenever don’t-care conditions occur, we must decide which x to change to 0 and which to 1 to produce the best K-map looping (i.e., the simplest expression). This decision is not always an easy one.
A circuit is needed that will add only two input bits, to produce a sum and carry output. An example would be the addition of the LSB position of two binary numbers where there is no carry input to be added. A special logic circuit can be designed to take two input bits, A and B, and to produce sum (S) and carry (Cout) outputs. This circuit is called a half adder (HA).
The full-adder circuit used in each position has three inputs: an A bit, a B bit, and a C bit. It also produces two outputs: a sum bit and a carry bit. Now that we know the function of the full adder, we can design a logic circuit that will perform this function. First, we must construct a truth table showing the various input and output values for all possible cases. Figure (a) shows the truth table having three inputs, A, B, and C and two outputs, S and COUT. There are eight possible cases for the three inputs, and for each case, the desired output values are listed.
Definition
Difference between combinational or sequential circuits