Wa0020.
Wa0020.
DIGITAL CIRCUITS
6.1. Laws of Boolean Algebra
Boolean Algebra is the mathematics we use to analyse digital gates and circuits. We can
use these “Laws of Boolean” to both reduce and simplify a complex Boolean expression in an
attempt to reduce the number of logic gates required. Boolean Algebra is therefore a system of
mathematics based on logic that has its own set of rules or laws which are used to define and
reduce Boolean expressions.
The variables used in Boolean Algebra only have one of two possible values, a logic “0”
and a logic “1” but an expression can have an infinite number of variables all labelled individually
to represent inputs to the expression, For example, variables A, B, C etc., giving us a logical
expression of A + B = C, but each variable can ONLY be a 0 or a 1.
Examples of these individual laws of Boolean, rules and theorems for Boolean Algebra are given
in the following table.
Boolean Equivalent Boolean Algebra
Description
Expression Switching Circuit Law or Rule
A in parallel with
A+1=1 Annulment
closed = "CLOSED"
A in parallel with
A+0=A Identity
open = "A"
A in series with
A.1=A Identity
closed = "A"
A in series with
A.0=0 Annulment
open = "OPEN"
A in parallel with
A+A=A Idempotent
A = "A"
A in series with
A.A=A Idempotent
A = "A"
NOT NOT A
NOT A = A Double Negation
(double negative) = "A"
A in parallel with
A+A=1 Complement
NOT A = "CLOSED"
A in series with
A.A=0 Complement
NOT A = "OPEN"
A in parallel with B =
A+B = B+A Commutative
B in parallel with A
A in series with B =
A.B = B.A Commutative
B in series with A
The basic Laws of Boolean Algebra that relate to the Commutative Law allowing a
change in position for addition and multiplication, the Associative Law allowing the removal of
brackets for addition and multiplication, as well as the Distributive Law allowing the factoring of
an expression, are the same as in ordinary algebra.
Each of the Boolean Laws above are given with just a single or two variables, but the
number of variables defined by a single law is not limited to this as there can be an infinite number
of variables as inputs to the expression. These Boolean laws detailed above can be used to prove
any given Boolean expression as well as for simplifying complicated digital circuits.
A brief description of the various Laws of Boolean are given below with A representing a variable
input.
(1) Two separate terms NOR together is the same as the two terms inverted (Complement) and
AND for example, A+B = A. B.
(2) Two separate terms NAND together is the same as the two terms inverted (Complement)
and OR for example, A.B = A +B.
Absorptive Law – This law enables a reduction in a complicated expression to a simpler one
by absorbing like terms.
Associative Law – This law allows the removal of brackets from an expression and regrouping
of the variables.
Example 1
Using the above laws, simplify the following expression: (A + B)(A + C)
Q= (A + B).(A + C)
A.A + A.C + A.B + B.C – Distributive law
A + A.C + A.B + B.C – Idempotent AND law (A.A = A)
A(1 + C) + A.B + B.C – Distributive law
A.1 + A.B + B.C – Identity OR law (1 + C = 1)
A(1 + B) + B.C – Distributive law
A.1 + B.C – Identity OR law (1 + B = 1)
Q= A + (B.C) – Identity AND law (A.1 = A)
Example 2
Using the above laws, simplify the following expression: C+(BC^)
C+(BC^) = C+(B^+C^)
= (C+C^)+B^
= 1=+B^
=1
Example 2
Using the above laws, simplify the following expression: (A^) (A+B) + (B+A) (A+B^)
(A^) (A+B) + (B+A) (A+B^) = (A^)A+(A^)B+(B+A)A+(B+A)(B^)
= (A^)B+(B+A)A+(B+A)(B^)
= (A^)B+BA+AA+B(B^)+A(B^)
= (A^)B+BA+A+A(B)
= (A^)B+A(B+1+B^)
= A^B+A
=A+B
6.4. Boolean Algebra Truth Tables
As well as a standard Boolean Expression, the input and output information of any Logic
Gate or circuit can be plotted into a standard table to give a visual representation of the switching
function of the system.
The table used to represent the Boolean expression of a logic gate function is commonly
called a Truth Table. A logic gate truth table shows each possible input combination to the gate
or circuit with the resultant output depending upon the combination of these input(s).
For example, consider a single 2-input logic circuit with input variables labelled as A and
B. There are “four” possible input combinations or 22 of “OFF” and “ON” for the two inputs.
However, when dealing with Boolean expressions and especially logic gate truth tables, we do not
general use “ON” or “OFF” but instead give them bit values which represent a logic level “1” or
a logic level “0” respectively.
Then the four possible combinations of A and B for a 2-input logic gate is given as:
Input Combination 1. – “OFF” – “OFF” or ( 0, 0 )
Input Combination 2. – “OFF” – “ON” or ( 0, 1 )
Input Combination 3. – “ON” – “OFF” or ( 1, 0 )
Input Combination 4. – “ON” – “ON” or ( 1, 1 )
LOGIC GATE:
A logic gate is an elementary building block of a digital circuit. Most logic gates have two
inputs and one output. At any given moment, every terminal is in one of the two binary
Example 1
Construct a Truth Table for the logical functions at points C, D and Q in the following
circuit and identify a single logic gate that can be used to replace the whole circuit.
First observations tell us that the circuit consists of a 2-input NAND gate, a 2-input EX-OR gate
and finally a 2-input EX-
NOR gate at the output.
As there are only 2
inputs to the circuit
labeled A and B, there
can only be 4 possible
combinations of the
input ( 22 ) and these are:
0-0, 0-1, 1-0 and finally
1-1. Plotting the logical
functions from each gate in Inputs Output
tabular form will give us the A B C D Q
following truth table for the
whole of th21e logic circuit 0 0 1 0 0
below. 0 1 1 1 1
1 0 1 1 1
From the truth table
1 1 0 0 1
above, column C represents the
output function +generated by the NAND gate, while column D represents the output function
from the Ex-OR gate. Both of these two output expressions then become the input condition for
the Ex-NOR gate at the output.
It can be seen from the truth table that an output at Q is present when any of the two inputs A or B
are at logic 1. The only truth table that satisfies this condition is that of an OR Gate. Therefore, the
whole of the above circuit can be replaced by just one single 2-input OR Gate.
The output of the system is given as Q = (A.B) + (A+B), but the notation A+B is the same
as the De Morgan´s notation A.B, Then substituting A.B
into the output expression gives us a final output notation
of Q = (A.B)+(A.B), which is the Boolean notation for
an Exclusive-NOR Gate as seen in the previous section.
Then we can see that the entire logic circuit above can be replaced by just one single input
labeled A thereby reducing a circuit of six individual logic gates to just one single piece of wire,
(or Buffer). This type of circuit analysis using Boolean Algebra can be very powerful and quickly
identify any unnecessary logic gates within a digital logic design thereby reducing the number of
gates required, the power consumption of the circuit and of course the cost.
0 1 1 0 1
1 0 0 0 0
1 0 1
1 0 1
0 0 0
0 1 1
0 0 0
0 0 0
0 0 0
0 1 1
Example 5
Consider the following problem.
A system use 3 switches A, B, C and a combination of switches determines whether an
alarm, X, sounds:
If switch A or B are in the ON position and if switch C is in the OFF position then a signal
to sound an alarm, X is produced. (Remember that ON = 1 and OFF = 0. Also remember that we
write 0 as NOT 1.)
It is possible to convert this problem into a logic statement
So we get:
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
CHAPTER SUMMARY
1. 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.
2. A logic gate is an elementary building block of a digital circuit.
3. There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.
4. The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are
high.
5. The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs
are high.
6. The NOT gate is an electronic circuit that produces an inverted version of the input at its
output.
7. NAND gate is equal to an AND gate followed by a NOT gate. The outputs of all NAND gates
are high if any of the inputs are low.
8. NOR gate is equal to an OR gate followed by a NOT gate. The outputs of all NOR gates are
low if any of the inputs are high.
9. EXOR gate is a circuit which will give a high output if either, but not both, of its two inputs
are high.
10.EXNOR gate does the opposite to the EOR gate. It will give a low output if either, but not
both, of its two inputs are high.
11. The NAND and NOR gates are called universal functions since with either one the AND and
OR functions and NOT can be generated.