Chapter 3
Chapter 3
Chapter 3
. '. " .
. ... -: ... .
'; , "
. ! :.
"
This chapter explores Boolean Algebra and the logic gateS used 3.0 INTRODUCTION
to implement Boolean equations. Boolean Algebra is an area of
mathematiciinvolVing ' opetations' ontwo-state «true-false)
variAbles. "'thls 'type' df 'algebra .'was first formulated by the
Eng~h Mathefnafidah 'G eorgeBoolein 1854. '
Boolean" Algebra is based· on the assUII\ptionthat any
proposition can be proven with correct answers' to a specific
ntlmber Of ·, tnie-false "" qu~t16ns. " Further~ Boolean algebra
" provides a means ;whereby true-faIselogic can be 'handled in the
form ' ofAlgJbralC"eQuationS With the' qUeStioriSas independent
variables and the conciu51on Yexpressed as a ' dependent variable
(recall that in'" the' equationl" y ' :; A+Bthat A and B are
independent vimables and 'Y ' is ' a dependent' variable). This
'chapter ~ irltr&i'uctf YOll' to'the use of Boblean Cilgebra"and the
use of electroruc logic gateS (citcuits) to implement Boolean
.~ ~
equations. '
21
.,
Truth tables are useful in describing rt?I~~()nshiPs ' of 3.2.1 Truth Tables
Boolean variables. A truth table lists all dependent ' and .
independent variables and all possible ,combinations of their
states. The states are listed in mneIil()rii~ form~
The independent variables - areUsted "at the top of the
truth table to the left. At the top :right of the truth table is the
dependent variable. Columns ' of the truth table show all
possible states of the associat~d Boolean variable. Figure 3-1
shows Several 'examples . of implementing the truth table for the
logical OR function.
f. A + B FIGURE 3-1. Truth Tables.
A B f A B f A B f '
0
0 ,
0 0
1
F
-F
F F
T ', T
L
L
L
H
L
H
1 0 "
" ,r F T H 1 H
'1 :1 T T T H H H
"
In Figure 3-1, notice that the state of the ,i ndependent
variables reads right to :left for the corresponding state 6f the
dependent variable. Also note that all truth tables will have
only one dependent variable. .
, The truth table will lUiv~ the number of lines necessary
to represent all possible combinations of the independent logic
variables.
For .Boolean algebra, the ' nUmber of lines in a truth table
will be,.equal .to2h .whe~e n is the number ofindepeI)dent
variables. for example, " a tntthtable for... two indePendent
variables require four lines, 22" to ; completely. cdefineall the
possible combinations of the two variables.
With your knowledge of binary states you should be able
to construct:' the independent part of any truth table at this point.
' The following 'sectiQns . of this t~xt Will ' provide the
information necessary to <:oIXlplete the deperident portion of the
truth table. '
23
3.2.2 The OR The fiJ:st
Boolean 6petatio~ ,to ' be discussed is the logical
Operation OR operatiC?~.1h~ ,'. hR ' operator ' -operates on two or ' lriore
Boolean variCiples. ."The reSUlt 'or dependent vatiabl~, of the OR
operation will be true'
i{ 'e ftherbne m: both efth~inde~ri~ent '
variables is true. The result will be false only if both ot the
inde~dent , y~bI.es ar.e false. The truth table for the OR
operatioJ,1 is' sh'o~ in" Figure'~2:
. . " •• ;"S; ;". ; .i,. ". ,
3.2.3 The AND , The logical ' AND operation operates on two or more
Operation Boolean variables. ' The AND operatioD will ~ have a true
result if both independent variables are true. In all , o~her cases
the ~esult will be false. Figure 3-3 is the truth table for the logical
AND oPeration.
,FIGURE 3·3. Logical f =Ae B " (f =A and B)
AND Truth Table.
A B f
, 0 0 0
0 \1 0
,1 0 0
1 1 1
TIle
·v .~ . <
3.2.4 The NOT 1Jl~, NOT o~tion_ is the simplest Boolean,] operation. It
Operation is the only Ull¥Y operation allowed in Bool~analg~bra. This
means , that the operati6n ' is" 'per'formed on only on~ Boolean
independent vanable or on one Boolean logic expr~~sion" 1]1e '-
NOT function returns the complement of the state of , the
24
Boolean variable. A truth table for the NOT operation iss~own
in Figure 3-4.
f=A
~
t±:f::tj
FIGURE 3-4. Truth Table
for the NOT Operation.
The AND,OR, and NOT operators are all of the basic 3.2.5 Logic
operations in Boolean algebra. All other operations are made Equations
from these three basic operations:
Boolean equations involve combinations of these three
basic functions according to the rules · of Boolean algebra.
Boolean algebra has its own set of rules and laws. Boolean
equations are written in the sam~ fonn as other mathematical
equations and may involve variables and constants (1 or 0).
Many of the rules of algebra thitt you already are familiar
with ·will ,not <:hangein Boolean algebra. Operations in Boolean
equations are perfonned from left to right with logic
multiplication first then logic addition after products are
completed. logiC equations are frequently written in the fonn f=
A 'op B op c... where op signifies a logical operation (AND or
OR). '; ' .'
Some 'books will ·use the symbol · Yinstead of f ' for the
resUlt. This is "not rea.llY new to most . of you as you have seen
th~ exptessiol'\S y ; ahd f(x) USed interChangeably ,in other -algebra
SOme
courses. ' cODUnon la.ws of Boolean algebra. ' are listed in
Table 3-1. "
" ..
Laws of Tautology:
A-A=A
A+A=A
when constants are involved:
. ,
-,.
..._---
C ----I
27
The electrical output of IQgic circuits will be one of tw,
voltages. When the more "P9sitive of these voltages isus~ to
represent a logic 1 ,HI Qr 'I"RlJE , state, ·the 'device is 't.ermedto il$e
1
3.2.7 NOR and NOR and NAND gates are two of . the ·· siinpler
NAND Gates combinational logic' circuits that arerommonly available. 'These
combinational logic cirCUits are .used to combine l()gic functions
for decision making. The logic equation for a NAND gate is f=
A.B. The logic equation for a NOR gate is f = A+B. The
schematic symbols for the NAND and NOR gates are shown in
Figure 3-7.
----~~ ~~AND
IGURE 3-7. Schematic Symbols
for NAND and NOR Gates.
____
3.3 SUMMARY In this chapter the concepts for the use and understanding . of
Boolean algebra .were introduced. The three basic operations
used in Boolean algebra were defined and explained. The use of
logic equations and some basic rules of Boolean algebra were
presented.
Implementing logical equations With . electronic digital
circuits was explained and the .schematic symbols for some
common logic circuits were identified. The NOR and NAND
combinational logic circuits were introduced and the flexibility
of these circuits .explained. The concepts learned in this chapter
will be used throughout the remainder of this book and yeur
association With digital electronics.
28
1. Who first formulated Boolean algebra '? 3.4 REVIEW,
QUESTIONS
2. ________________________________________
3. ________________________________________
Jumper Wires
Procedure This section will begin 'y our experiments with logic gates.
You will learn some general characteristics of logic circuits then
study the 74L$04 TTL hex inverter.
All logic circuits will have connections- for
.
power and '-....
ground. Logic circuits are usually seen as Dual Inline Package
30
integrated CircuitS known as DIP ICs. The term dual inline
package describes the pin arrangement for the integrated circuit
inputs and outputs.
All DIP ICs have one end or corner marked in a special
way. This marking is used to show integrated circuit pin
orientation. With the marked end of the IC facing away from
you the pins are numbered counterclockwise from the upper left
comer. Figure 3-8 shows how ICs are marked and how the pins
are numbered.
1 14
2 13
3 12
4 11
5 10
6 9
7 8
1A 1Y 2A 2Y 3A3Y' GND
74LS04 Positive Logic:
Hex Inverters y.A '
04
In this laboratory you will learn the use of the 74LS08 quad"two LAB EXERCISE 3.2
input AND gate. You will observe and .record the AND gate's The AND Gate
logic characteristics. Objectives
33
Materials LD-2 Logic Designer
.. ; :
2. Wire pin 7 to ground and pin 14 toVcc. .'
•
setting and observing the state of pin 2.
" . ' ¥
, ',
10. ' N()w ,use,SJ , ~d S2 to determine the truth table for the
74LS08.Recortl your~Wts.; ()})serye . theciJprit?utput
onJ.3.
: . ' ..
11. Remove power from the LD-2 ,and remove ''the circuit
used for this experiment.
,. , ,t. t
.', Materlals""
74IS32 Quad Two-input OR Gate
Jumper Wires
11. Remove power from the LD-2 and remove the circUits
used for this laboratory.
Jumper Wires
Jumper Wires
LAB EXERCISE3~6
Using NAND and
NOR Gates In this experiment you will confirm that NOR and NAND gates
Objectives can be used to perform any logic function. ' '-
Jumper Wires
2
52 - - - \ FIGURE 3-10. Circuit
1
.3 Schematic .
53
5
4
6 l4
12. Turn off power. . You W;ill now wire inverters onto the
inputs....of the existing cir9lit.
' ,' ; " . "' " .
l4
18. Use 52, 53 and L6 to make a truth table for the circuit
consisting of gates 4, 3 and 1. Record your .observations
here. Which logic function is implemented by this
circuit?
40