Unit-Ii Boolean Algebra and Logic Gates
Unit-Ii Boolean Algebra and Logic Gates
Boolean Addition
Recall from part 3 that Boolean addition is equivalent to the OR
operation. In Boolean algebra, a sum term is a sum of literals. In logic
circuits, a sum term is produced by an OR operation with no AND operations
involved. Some examples of sum terms are A + B, A + B, A +
B + C, and A + B + C + D.
A sum term is equal to 1 when one or more of the literals in the term are 1. A
sum term is equal to 0 only if each of the literals is 0.
Example
Determine the values of A, B, C, and D that make the sum term
A+B+C+D equal to 0.
Boolean Multiplication
Also recall from part 3 that Boolean multiplication is equivalent to the AND
operation. In Boolean algebra, a product term is the product of literals. In
This law states that it makes no difference in what order the variables are
grouped when ANDing more than two variables. Fig.(4-4) illustrates this law
as applied to 2-input AND gates.
Distributive Law:
►The distributive law is written for three variables as follows:
A(B + C) = AB + AC
This law states that ORing two or more variables and then ANDing the result
with a single variable is equivalent to ANDing the single variable with each
of the two or more variables and then ORing the products. The distributive
law also expresses the process of factoring in which the common variable A
is factored out of the product terms, for example,
AB + AC = A(B + C).
Fig.(4-5) illustrates the distributive law in terms of gate
implementation.
Rule 1. A+0=A
A variable ORed with 0 is always equal to the variable. If the input variable
A is 1, the output variable X is 1, which is equal to A. If A is 0, the output is
0, which is also equal to A. This rule is illustrated in Fig.(4-6), where the
lower input is fixed at 0.
Fig.(4-6)
Fig.(4-7)
Rule 3. A.0=0
A variable ANDed with 0 is always equal to 0. Any time one input to an
AND gate is 0, the output is 0, regardless of the value of the variable on the
other input. This rule is illustrated in Fig.(4-8), where the lower input is
fixed at 0.
Fig.(4-8)
Rule 4. A.1=A
A variable ANDed with 1 is always equal to the variable. If A is 0 the output
of the AND gate is 0. If A is 1, the output of the AND gate is 1 because both
inputs are now 1s. This rule is shown in Fig.(4-9), where the lower input is
fixed at 1.
Fig.(4-9)
Fig.(4-10)
Rule 6. A+A=1
A variable ORed with its complement is always equal to 1. If A is 0, then 0 +
0 = 0 + 1 = 1. If A is l, then 1 + 1 = 1+ 0 = 1. See Fig.(4-11), where one
input is the complement of the other.
Fig.(4-11)
Rule 7. A.A=A
A variable ANDed with itself is always equal to the variable. If A = 0,
then 0.0 = 0; and if A = 1. then 1.1 = 1. Fig.(4-12) illustrates this rule.
Fig.(4-12)
Fig.(4-13)
Rule 9 A=A
The double complement of a variable is always equal to the variable. If you
start with the variable A and complement (invert) it once, you get A. If you
then take A and complement (invert) it, you get A, which is the original
variable. This rule is shown in Fig.(4-14) using inverters.
Fig.(4-14)
Rule 10. A + AB = A
This rule can be proved by applying the distributive law, rule 2, and rule 4
as follows:
A + AB = A( 1 + B) Factoring (distributive law)
=A.l Rule 2: (1 + B) = 1
=A Rule 4: A . 1 = A
The proof is shown in Table 4-2, which shows the truth table and the
resulting logic circuit simplification.
DSD UNIT 2 NOTES
Table 4-2
Rule 11. A + AB = A + B
This rule can be proved as follows:
A + AB = (A + AB) + AB Rule 10: A = A + AB
= (AA + AB) + AB Rule 7: A = AA
=AA +AB +AA +AB Rule 8: adding AA = 0
= (A + A)(A + B) Factoring
= 1. (A + B) Rule 6: A + A = 1
=A + B Rule 4: drop the 1
The proof is shown in Table 4-3, which shows the truth table and the
resulting logic circuit simplification.
Table 4-3
The proof is shown in Table 4-4, which shows the truth table and the
resulting logic circuit
simplification.
Table 4-4
Example
Apply DeMorgan's theorems to the expressions XYZ and X + Y + z.
XYZ = X + Y + Z
X+y+Z=XYZ
Example
Apply DeMorgan's theorems to the expressions WXYZ and W + X + y + z.
WXYZ = W + X + y + Z
W+X+y+Z=WXYZ
Step l. Identify the terms to which you can apply DeMorgan's theorems, and
think of each term as a single variable. Let A + BC = X and D(E + F) = Y.
Step 2. Since X + Y = X Y,
Step 5. Use rule 9 (A = A) to cancel the double bars over the E + F part of
the term.
(A + BC)(D + E + F) = (A + BC)(D + E + F)
Example
Apply DeMorgan's theorems to each of the following expressions:
The expression for the left-most AND gate with inputs C and D is CD.
The output of the left-most AND gate is one of the inputs to the OR
gate and B is the other input. Therefore, the expression for the OR
gate is B + CD.
The output of the OR gate is one of the inputs to the right-most AND
gate and A is the other input. Therefore, the expression for this AND
gate is A(B + CD), which is the final output expression for the entire
circuit.
Example
Using Boolean algebra techniques, simplify this expression:
AB + A(B + C) + B(B + C)
Solution
Step 1: Apply the distributive law to the second and third terms in the
expression, as follows:
AB + AB + AC + BB + BC
Step 2: Apply rule 7 (BB = B) to the fourth term.
AB + AB + AC + B + BC
Step 3: Apply rule 5 (AB + AB = AB) to the first two terms.
AB + AC + B + BC
Step 4: Apply rule 10 (B + BC = B) to the last two terms.
DSD UNIT 2 NOTES
AB + AC + B
Step 5: Apply rule 10 (AB + B = B) to the first and third terms.
B+AC
At this point the expression is simplified as much as possible.
Example
Simplify the Boolean expressions:
1- AB + A(B + C) + B(B + C).
2- [AB( C + BD) + A B]C
3- ABC + ABC + A B C + ABC + ABC
Example
Convert each of the following Boolean expressions to SOP form:
(a) AB + B(CD + EF)
(b) (A + B)(B + C + D)
(c) (A + B) + C
Example
Convert the following Boolean expression into standard SOP
form: ABC + AB + ABCD
Solution
The domain of this SOP expression A, B, C, D. Take one term at a time. The
first term, ABC, is missing variable D or D, so multiply the first term by (D
+ D) as follows:
ABC = ABC(D + D) = ABCD + ABCD
In this case, two standard product terms are the result.
The second term, AB, is missing variables C or C and D or D, so first
multiply the second term by C + C as follows:
AB = AB(C + C) = ABC + ABC
Fig.(4-20)
Example
Convert the following Boolean expression into standard POS
form: (A + B + C)(B + C + D)(A + B + C + D)
Solution
The domain of this POS expression is A, B, C, D. Take one term at a time.
The first term, A + B + C, is missing variable D or D, so add DD and apply
rule 12 as follows:
A + B + C = A + B + C + DD = (A + B + C + D)(A + B + C + D)
The second term, B + C + D, is missing variable A or A, so add AA and
apply rule 12 as follows:
B + C + D = B + C + D + AA = (A + B + C + D)(A + B + C + D)
The third term, A + B + C + D, is already in standard form. The standard
POS form of the original expression is as follows:
n
n variables can be combined to form 2 minterms.
F=xy z+xyz+xyz
F = m1 + m4 + m7
The complement of F = F = F
F = (x + y + z) (x + y + z) (x + y + z) (x + y + z) (x + y +
z) F = M0 M2 M3 M5 M6
Example
Express the Boolean function F = A + BC in a sum of minterms (SOP).
Solution
The term A is missing two variables because the domain of F is (A, B, C)
A = A(B + B) = AB + AB because B + B = 1
In short notation
F(A, B, C) = ∑(1, 4, 5, 6, 7)
F(A, B, C) = ∑(0, 2, 3)
A B C B BC F
0 0 0 0 1 0 0
1 0 0 1 1 1 1
2 0 1 0 0 0 0
3 0 1 1 0 0 0
4 1 0 0 1 0 1
5 1 0 1 1 1 1
6 1 1 0 0 0 1
7 1 1 1 0 0 1
Example
Determine the truth table for the following standard POS expression:
(a) (b)
Fig.(5-2) A 4-variable Karnaugh map.
Cell Adjacency
The cells in a Karnaugh map are arranged so that there is only a single-
variable change between adjacent cells. Adjacency is defined by a single-
variable change. In the 3-variable map the 010 cell is adjacent to the 000 cell,
the 011 cell, and the 110 cell. The 010 cell is not adjacent to the 001 cell, the
111 cell, the 100 cell, or the 101 cell.
Fig.(5-3) Adjacent cells on a Karnaugh map are those that differ by only one
variable. Arrows point between adjacent cells.
Example
Map the following standard SOP expression on a Karnaugh map:
see Fig.(5-4).
Example
Map the following standard SOP expression on a Karnaugh map:
See Fig.(5-5).
Example
Map the following SOP expression on a Karnaugh map:
Solution
The SOP expression is obviously not in standard form because each product
term does not have four variables.
Example:
Group the 1s in each of the Karnaugh maps in Fig.(5-6).
Fig.(5-6)
Fig.(5-7)
Determine the minimum product term for each group.
a. For a 3-variable map:
(1) A l-cell group yields a 3-variable product term
(2) A 2-cell group yields a 2-variable product term
(3) A 4-cell group yields a 1-variable term
(4) An 8-cell group yields a value of 1 for the expression
Fig.(5-8)
Fig.(5-9)
Fig.(5-10)
Solution:
The process for minimizing a POS expression is basically the same as for an
SOP expression except that you group 0s to produce minimum sum terms
instead of grouping 1s to produce minimum product terms. The rules for
grouping the 0s are the same as those for grouping the 1s that you learned
before.
Example:
Use a Karnaugh map to minimize the following standard POS expression:
Also, derive the equivalent SOP expression.
Solution:
1- AND-OR Logic
Fig.(6-1)(a) shows an AND-OR circuit consisting of two 2-input AND gates
and one 2-input OR gate; Fig.(6-1)(b) is the ANSI standard rectangular outline
symbol. The Boolean expressions for the AND gate outputs and the resulting
SOP expression for the output X are shown in the diagram. In general, all AND-
OR circuit can have any number of AND gates each with any number of inputs.
The truth table for a 4-input AND-OR logic circuit is shown in Table 6-1. The
intermediate AND gate outputs ( AB and CD columns) are also shown in the
table.
For a 4-input AND-OR logic circuit, the output X is HIGH (1) if both input
A and input B are HIGH (1) or both input C and input D are HIGH (1).
2-AND-OR-Invert Logic
When the output of an AND-OR circuit is complemented (inverted), it results in
an AND-OR-Invert circuit. Recall that AND-OR logic directly implements SOP
expressions. POS expressions can be implemented with AND-OR-Invert logic.
This is illustrated as follows, starting with a POS expression and developing the
corresponding AND-OR-Invert expression.
Table 6-1
Fig.(6-2)
Fig.(6-3)
Can be written as
Table 6-2 Truth table for an exclusive-OR.
Notice that the output X is HIGH only when the two inputs, A and B, are at the
same level.
Fig.(6-4)
Example
Develop a logic circuit with four input variables that will only produce a 1
output when exactly three input variables are 1s. Fig.(6-5) shows the circuit.
Fig.(6-5)
Fig.(6-6)
Solution
Fig.(6-7)
Fig.(6-9)
X=A+B=AB
Fig.(6-10)(d) shows how NOR gates are used t0 form a NAND function.
Fig.(6-10)
Example
1- Write the output expression for each circuit as it appears in Fig.(6-
11) and then change each circuit to an equivalent AND-OR
configuration.
2- Develop the truth table for circuit in Fig.(6-11)(a-b).
3- Show that an exclusive-NOR circuit produces a POS output.
- It’s a small silicon semiconductor, called a chip, containing the electronic components for the
digital gates. The gates are interconnected inside the chip to form the required circuit.
Levels of Integration
- Small-scale Integration (SSI): contains several independent gates in a single package. The
number of gates is usually fewer than 10.
- Medium-scale Integration (MSI): have a complexity between 10 and 100 gates in a single
package. They perform specific digital operations such as decoders, adders, and multiplexers.
- Large-scale Integration (LSI): contains between 100 and 1000s gates in a single package.
The number of gates is usually fewer than 10. They include processors, memory chips, and
programmable logic devices.
- Very Large-scale Integration (VLSI): contains thousands of gates in a single package.
Examples are large memory arrays and complex microcomputer chips.
Basically, there are two types of semiconductor devices: bipolar and unipolar. Based on these
devices, digital integrated circuits have been made which are commercially available. Various
digital functions are being fabricated in a variety of forms using bipolar and unipolar technolo-
gies. A group of compatible ICs with the same logic levels and supply voltages for performing
various logic functions have been fabricated using a specific circuit configuration which is
referred to as a logic family.
MOS devices are unipolar devices and only MOSFETs are employed in MOS logic circuits. The
The various characteristics of digital ICs used to compare their performances are:
1. Speed of operation,
2. Power dissipation,
3. Figure of merit,
4. Fan-out,
5. Current and voltage parameters,
6. Noise immunity,
7. Operating temperature range,
8. Power supply requirements, and
9. Flexibilities available.
There are several different families of logic gates. Each family has its capabilities and
limitations, its advantages and disadvantages. The following list describes the main logic
families and their characteristics. You can follow the links to see the circuit construction of
gates of each family.
Diode logic gates use diodes to perform AND and OR logic functions. Diodes have the
property of easily passing an electrical current in one direction, but not the other. Thus,
diodes can act as a logical switch.
Diode logic gates are very simple and inexpensive, and can be used effectively in specific
situations. However, they cannot be used extensively, as they tend to degrade digital
signals rapidly. In addition, they cannot perform a NOT function, so their usefulness is
quite limited.
Resistor-transistor logic gates use Transistors to combine multiple input signals, which
also amplify and invert the resulting combined signal. Often an additional transistor is
included to re-invert the output signal. This combination provides clean output signals and
either inversion or non-inversion as needed.
RTL gates are almost as simple as DL gates, and remain inexpensive. They also are handy
because both normal and inverted signals are often available. However, they do draw a
significant amount of current from the power supply for each gate. Another limitation is
that RTL gates cannot switch at the high speeds used by today's computers, although they
are still useful in slower applications.
Although they are not designed for linear operation, RTL integrated circuits are sometimes
used as inexpensive small- signal amplifiers, or as interface devices between linear and
digital circuits.
By letting diodes perform the logical AND or OR function and then amplifying the result with
a transistor, we can avoid some of the limitations of RTL. DTL takes diode logic gates and
adds a transistor to the output, in order to provide logic inversion and to restore the signal to
full logic levels.
The physical construction of integrated circuits made it more effective to replace all the input
diodes in a DTL gate with a transistor, built with multiple emitters. The result is transistor-
transistor logic, which became the standard logic circuit in most applications for a number of
years.
As the state of the art improved, TTL integrated circuits were adapted slightly to handle a
wider range of requirements, but their basic functions remained the same. These devices
comprise the 7400 family of digital ICs.
Also known as Current Mode Logic (CML), ECL gates are specifically designed to operate at
extremely high speeds, by avoiding the "lag" inherent when transistors are allowed to
- CMOS Logic
One factor is common to all of the logic families we have listed above: they use significant
amounts of electrical power. Many applications, especially portable, battery-powered ones,
require that the use of power be absolutely minimized. To accomplish this, the CMOS
(Complementary Metal-Oxide-Semiconductor) logic family was developed. This family
uses enhancement-mode MOSFETs as its transistors, and is so designed that it requires almost
no current to operate.
CMOS gates are, however, severely limited in their speed of operation. Nevertheless,
they are highly useful and effective in a wide range of battery-powered applications.
Most logic families share a common characteristic: their inputs require a certain amount of
current in order to operate correctly. CMOS gates work a bit differently, but still represent a
capacitance that must be charged or discharged when the input changes state. The current
required to drive any input must come from the output supplying the logic signal.
Therefore, we need to know how much current an input requires, and how much current an
output can reliably supply, in order to determine how many inputs may be connected to a
single output.
However, making such calculations can be tedious, and can bog down logic circuit design.
Therefore, we use a different technique. Rather than working constantly with actual
currents, we determine the amount of current required to drive one standard input, and
designate that as a standard load on any output. Now we can define the number of
standard loads a given output can drive, and identify it that way. Unfortunately, some inputs
for specialized circuits require more than the usual input current, and some gates, known as
buffers, are deliberately designed to be able to drive more inputs than usual. For an easy way
to define input current requirements and output drive capabilities, we define two new terms:
fan-in and fan-out
Fan-in
Fan-in is a term that defines the maximum number of digital inputs that a single logic gate
can accept. Most transistor- transistor logic ( TTL ) gates have one or two inputs, although
some have more than two. A typical logic gate has a fan- in of 1 or 2.
In some digital systems, it is necessary for a single TTL logic gate to drive several devices
Fan-out
Fan-out is a term that defines the maximum number of digital inputs that the output of a single
logic gate can feed. Most transistor-transistor logic ( TTL ) gates can feed up to 10 other
digital gates or devices. Thus, a typical TTL gate has a fan-out of 10.
In some digital systems, it is necessary for a single TTL logic gate to drive more than 10
other gates or devices. When this is the case, a device called a buffer can be used between
the TTL gate and the multiple devices it must drive. A buffer of this type has a fan-out of
25 to 30. A logical inverter (also called a NOT gate) can serve this function in most digital
circuits.
Remember, fan-in and fan-out apply directly only within a given logic family. If for any
reason you need to interface between two different logic families, be careful to note and
meet the drive requirements and limitations of both families, within the interface circuitry