Boolean Algebra and Digital Logic

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 120

CHAPTER 3

BOOLEAN ALGEBRA
AND DIGITAL LOGIC
CHAPTER 3 OBJECTIVES

• Understand the relationship between Boolean logic and


digital computer circuits.
• Learn how to design simple logic circuits.
• Understand how digital circuits work together to form
complex computer systems.

2
3.1 INTRODUCTION

• In the middle of the twentieth century, computers were


commonly known as “thinking machines” and “electronic
brains.”
• Nowadays, we rarely consider the relationship between
electronic digital computers and human logic. Computers
are accepted as part of our lives.
• In this chapter, you will learn the simplicity that
constitutes the essence of the machine.

3
3.2 BOOLEAN ALGEBRA
• The relationship between Boolean logic and the actual physical
components of any computer system is very strong.
• The digital circuitry in digital computers and other digital systems is
designed, and its behavior is analyzed, with the use of a
mathematical discipline known as Boolean algebra.

• Boolean algebra is a mathematical system for the manipulation of


variables that can have one of two values.

• Variable, complement, and literal are terms used in Boolean


algebra. 4
3.2 BOOLEAN ALGEBRA
• A variable is a symbol used to represent an action, a condition, or
data.
• In formal logic, these values are “true” and “false.”
• In digital systems, these values are “on” and “off,” 1 and 0, or
“high” and “low.”
• The complement is the inverse of a variable and is indicated by a
bar over the variable (overbar).
For example,
• The complement of the variable
• The complement of the variable A is read as “not A” or “A bar.”
5
3.2 BOOLEAN ALGEBRA
• Boolean expressions are created by performing operations
on Boolean variables.
• Common Boolean operators include AND, OR, and
NOT.
• The operation AND yields true (binary value 1) if and
only if both of its operands are true .

• The operation OR yields true if either or both of its


operands are true.
• The unary operation NOT inverts the value of its
operand. 6
3.2 BOOLEAN ALGEBRA

• A Boolean operator can be completely


described using a truth table.
• The truth table for the Boolean
operators AND and OR are shown at
the right.
• The AND operator is also known as a
Boolean product. The OR operator is
the Boolean sum.

7
3.2 BOOLEAN ALGEBRA

• The truth table for the Boolean


NOT operator is shown at the
right.
• The NOT operation is most
often designated by an
overbar. It is sometimes
indicated by a prime mark ( ‘ )
or an “elbow” ().
8
3.2 BOOLEAN ALGEBRA

• A Boolean function has:


• At least one Boolean variable,
• At least one Boolean operator, and
• At least one input from the set {0,1}.
• It produces an output that is also a member of the set
{0,1}.

9
3.2 BOOLEAN ALGEBRA
• The truth table for the Boolean
function:

is shown at the right.


• To make evaluation of the
Boolean function easier, the truth
table contains extra (shaded)
columns to hold evaluations of
subparts of the function.

10
3.2 BOOLEAN ALGEBRA

• As with common arithmetic,


Boolean operations have rules
of precedence.
• The NOT operator has
highest priority, followed by
AND and then OR.
• This is how we chose the
(shaded) function subparts in
our table.

11
3.2 BOOLEAN ALGEBRA

• Digital computers contain circuits that implement


Boolean functions.
• The simpler that we can make a Boolean function, the
smaller the circuit that will result.
• Simpler circuits are cheaper to build, consume less
power, and run faster than complex circuits.
• With this in mind, we always want to reduce our
Boolean functions to their simplest form.
• There are a number of Boolean identities/ rules that 12
help us to do this.
3.2 BOOLEAN ALGEBRA
• As in other areas of mathematics, there are certain well-
developed rules and laws that must be followed in order
to properly apply Boolean algebra.
• Most Boolean identities have an AND (product) form as
well as an OR (sum) form. We give our identities using
both forms. Our first group is rather intuitive:

13
3.2 BOOLEAN ALGEBRA
1. Identity Law (2):
Rule 1: x . 1 = x A variable ANDed with 1 is always equal to the
variable itself.

Rule 2: x + 0 = x A variable ORed with 0 is always equal to the


variable.

14
3.2 BOOLEAN ALGEBRA
2. Null Law (2):
Rule 3: x . 0 = 0 A variable ANDed with 0 is always
equal to 0.

Rule 4: x + 1 = 1 A variable ORed with 1 is always


equal to 1.

15
3.2 BOOLEAN ALGEBRA
3. Idempotent law (2):
Rule 5: x . x = x A variable ANDed with itself is always
equal to the variable.

Rule 6: x + x = x A variable ORed with itself is always


equal to the variable.

16
3.2 BOOLEAN ALGEBRA
4. Inverse Law (2):
Rule 7: x . x’ = 0 A variable ANDed with its
complement is always equal to 0.

Rule 8: x + x’ = 1 A variable ORed with its complement


is always equal to 1.

17
3.2 BOOLEAN ALGEBRA

• Our second group of Boolean identities should be


familiar to you from your study of algebra:

18
3.2 BOOLEAN ALGEBRA
5. Commutative Law (2):
Rule 9: AB = BA This law states that the order in which
the variables are ANDed makes no difference.

Rule 10: A + B = B + A This law states that the order in


which the variables are ORed makes no difference

19
3.2 BOOLEAN ALGEBRA
6. Associative Law (2):
Rule 11: A(BC) = (AB)C This law states that it makes no
difference in what order the variables are grouped when
ANDing more than two variables.

Rule 12: A + (B+C) = (A+B) + C This law states that


when ORing more than two variables, the result is the
same regardless of the grouping of the variables.

20
3.2 BOOLEAN ALGEBRA
7. Distributive Law (2):
Rule 13: 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.

21
3.2 BOOLEAN ALGEBRA
• Our last group of Boolean identities are perhaps the
most useful.

Note that each relationship (with the exception of the last one) has both an
AND (or product) form and an OR (or sum) form. This is known as the 22
duality principle.
3.2 BOOLEAN ALGEBRA
8. Absorption Law (2)
Rule 14: A(A + B) = A
Rule 15: A + AB = A
9. DeMorgan’s Law (2)
Rule 16: AB’ = A’ + B’ The complement of two or
more ANDed variables is equivalent to the OR of
the complements of the individual variables.

23
3.2 BOOLEAN ALGEBRA
9. DeMorgan’s Law (2)
Rule 17: (A + B)’ = A’B’ The complement of two or
more ORed variables is equivalent to the AND of
the complements of the individual variables.

24
if so solve this

• We can use Boolean identities to simplify the


function:
as follows:

25
3.2 BOOLEAN ALGEBRA

• Sometimes it is more economical to build a circuit


using the complement of a function (and
complementing its result) than it is to implement the
function directly.
• DeMorgan’s law provides an easy way of finding the
complement of a Boolean function.
• Recall DeMorgan’s law states:

26
3.2
• BOOLEAN
DeMorgan’s law can
ALGEBRA
be extended to any number of variables.
• Replace each variable by its complement and change all
ANDs to ORs and all ORs to ANDs.
1.

27
•3.2 BOOLEAN
Replace each variable by itsALGEBRA
complement and change all ANDs to ORs and all
ORs to ANDs.
Activity

28
3.2 BOOLEAN ALGEBRA

29
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
• A logic expression can be reduced to its simplest form
or changed to a more convenient form to implement
the expression most efficiently using Boolean algebra.
• A simplified Boolean expression uses the fewest gates
possible to implement a given expression.
• Simpler circuits are cheaper to build, consume less
power, and run faster than complex circuits.

30
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
Using Boolean algebra techniques, simplify this expression:
AB + A(B + C) + B(B + C)
Solution
1. Apply the distributive law AB + AB + AC + BB + BC
2. Apply the Idempotent law AB + AB + AC + B + BC
3. Apply the Idempotent law AB + AC + B + BC
4. Apply the Absorption law AB + AC + B
5. Apply the Absorption law AB + B + AC
B + AC

31
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
 The simplification process has significantly reduced the number
of logic gates required to implement the expression
 Five gates are required to implement the expression in its original
form (a); however, only two gates are needed for the simplified
expression (b).

32
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA

33
3.2 LOGIC SIMPLIFICATION USING
BOOLEAN ALGEBRA
• Through our exercises in simplifying Boolean expressions, we see
that there are numerous ways of stating the same Boolean expression.
• Simpler circuits are cheaper to build, consume less power, and
run faster than complex circuits.
.
• Logically equivalent expressions have identical truth tables.
• In order to eliminate as much confusion as possible, designers
express Boolean functions in standardized or canonical form.

34
3.2 STANDARD FORMS OF BOOLEAN
EXPRESSIONS
• All Boolean expressions, regardless of their form, can be
converted into either of two standard forms: the sum-of-
products form or the product-of-sums form.

• Standardization makes the evaluation, simplification, and


implementation of Boolean expressions much more
systematic and easier

35
3.2 STANDARD FORMS OF BOOLEAN
EXPRESSIONS
• There are two canonical forms for Boolean expressions:
sum-of-products and product-of-sums.
• In the sum-of-products form, ANDed variables are ORed
together.
• For example:

• In the product-of-sums form, ORed variables are ANDed


together:
• For example:
36
3.2 STANDARD FORMS OF BOOLEAN
EXPRESSIONS
Identify each of the following as SOP or POS

1..

2..

3..

4..
37
3.2 BOOLEAN ALGEBRA
• It is easy to convert a function to
sum-of-products form using its
truth table.
• We are interested in the values of
the variables that make the
function true (=1).
• Using the truth table, we list the
values of the variables that result
in a true function value.
• Each group of variables is then 38

ORed together.
3.2 BOOLEAN ALGEBRA
• In an SOP expression, a single overbar cannot extend
over more than one variable; however, more than one
variable in a term can have an overbar.

Domain of a Boolean Expression


• The domain of a general Boolean expression is the set of
variables contained in the expression in either
complemented or uncomplemented form.
• For example the domain for:
39
3.2 BOOLEAN ALGEBRA
The Standard SOP Form

40
3.2 BOOLEAN ALGEBRA

Binary Representation of a Standard Product Term

41
3.2 BOOLEAN ALGEBRA
The Product-of-Sums (POS) Form

42
3.2 BOOLEAN ALGEBRA
The Product-of-Sums (POS) Form

43
3.2 BOOLEAN ALGEBRA
Converting Standard SOP to Standard POS
•The binary values of the product terms in a given standard
SOP expression are not present in the equivalent standard POS
expression.
•Also, the binary values that are not represented in the SOP
expression are present in the equivalent POS expression.

44
3.2 BOOLEAN EXPRESSIONS AND
TRUTH TABLES
• All standard Boolean expressions can be easily converted into
truth table format using binary values for each term in the
expression.
• The truth table is a common way of presenting, in a concise
format, the logical operation of a circuit.
• Also, standard SOP or POS expressions can be determined
from a truth table

45
3.2 BOOLEAN EXPRESSIONS AND
TRUTH TABLES
Converting SOP Expressions to Truth Table Format
•A truth table is simply a list of the possible combinations of
input variable values and the corresponding output values (1 or
0).
• For an expression with a domain of two variables, there are
four different combinations of those variables (22 = 4).
•For an expression with a domain of three variables, there are
eight different combinations of those variables (23 = 8) and so on.

46
3.2 BOOLEAN EXPRESSIONS AND
TRUTH TABLES
Converting SOP Expressions to Truth Table Format
• The first step in constructing a truth table is to list all possible
combinations of binary values of the variables in the expression.
• Next, convert the SOP expression to standard form if it is not
already.
• Finally, place a 1 in the output column (X) for each binary
value that makes the standard SOP expression a 1 and place a 0
for all the remaining binary values.

47
3.2 BOOLEAN EXPRESSIONS AND
TRUTH TABLES
.
There are three variables in the domain, so there are eight
possible combinations of binary values of the variables.

48
KARNAUGH MAPS (k-map)

• In 1953, Maurice Karnaugh was a telecommunications


engineer at Bell Labs.

• While exploring the new field of digital logic and its


application to the design of telephone circuits, he
invented a graphical way of visualizing and then
simplifying Boolean expressions.

• This graphical representation, now known as a


Karnaugh map, or Kmap, is named in his honor.

49
KARNAUGH MAPS (k-map)

• A K-map provides a systematic method for simplifying


Boolean expressions and, if properly used, will produce
the simplest SOP or POS expression possible, known as
the minimum expression.

• As you have seen, the effectiveness of algebraic


simplification depends on your familiarity with all the
laws, rules, and theorems of Boolean algebra and on
your ability to apply them 50
3A.2 DESCRIPTION OF KMAPS AND
TERMINOLOGY

• A K-map is a matrix consisting of rows and columns that


represent the output values of a Boolean function.

• The output values placed in each cell are derived from the
minterms of a Boolean function.

• A minterm is a product term that contains all of the


function’s variables exactly once, either complemented or
not complemented. 51
3A.2 DESCRIPTION OF KMAPS AND
TERMINOLOGY
For example, the minterms for a function having the
inputs x and y are:

Consider the Boolean function,


•Its minterms are:

52
3A.2 DESCRIPTION OF KMAPS AND
TERMINOLOGY

• A Kmap has a cell for each minterm.


• This means that it has a cell for each
line for the truth table of a function.

• The truth table for the function


F(x,y) = xy is shown at the right
along with its corresponding Kmap.

What will be its POS equivalent ? 53


3A.3 DESCRIPTION OF KMAPS AND
TERMINOLOGY
• As another example, we give the
truth table and KMap for the
function, F(x,y) = x + y at the right.

• This function is equivalent to the OR


of all of the minterms that have a
value of 1.

So what will be its SOP equivalent ?

Of course, the minterm function that we derived from our Kmap was not in simplest 54

terms.
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• A Kmap for three variables is constructed as shown in
the diagram below.
• We have placed each minterm in the cell that will hold
its value.
• Notice that the values for the yz combination at the
top of the matrix form a pattern that is not a normal
binary sequence.

55
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• Thus, the first row of the Kmap contains all minterms
where x has a value of zero and the first column contains
all minterms where y and z both have a value of zero.

• Cell Adjacency: The cells in a K-map are arranged so that


there is only a single-variable change between adjacent
cells. Adjacency is defined by a single-variable change

56
3A.4 STANDARD SOP EXPRESSION
• For SOP expression in standard form, a 1 is placed on
the K-map for each product term in the expression.
• Each 1 is placed in a cell corresponding to the value of a
product term.
• For example, for the product term , a 1 goes in the 101
cell on a 3-variable map

• When a SOP expression is completely mapped, there will


be a number of 1s on the K-map equal to the number of
product terms in the standard SOP expression 57
3A.4 STANDARD SOP EXPRESSION
Mapping process
Step 1: Determine the binary value of each product term in
the standard SOP expression.
Step 2: As each product term is evaluated, place a 1 on the K-
map in the cell having the same value as the product term.
Map the following standard SOP expression on a K-map:

58
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• We can, however, reduce our complicated expression to its
simplest terms by finding adjacent 1s in the Kmap that can be
collected into groups that are powers of two.
Consider the function:

Activity
1.Is the function is SOP or POS
2.Simplify the function using
Boolean algebra rules
3.Find its truth table and K-map 59

4.What is the largest group of 1s that is a power of 2?


3A.4 STANDARD SOP EXPRESSION
Mapping process Activity
1.Map the following standard SOP expression on a K-map:

A. .

B. .

C. .

60
3A.4 STANDARD SOP EXPRESSION
Mapping process Activity
A. B.

61
3A.4 NON-STANDARD SOP EXPRESSION
• A Boolean expression must first be in standard form before
you use a K-map.
• If an expression is not in standard form, then it must be
converted to standard form.
• Assume that one of the product terms in a 3-variable
expression is B.
• Write the binary value of the variable; then attach all
possible values for the missing variables A and C as
follows:
62
3A.4 NON-STANDARD SOP EXPRESSION
• Map the following SOP expression on a K-map:

• First expand the terms numerically as follows:

• Map each of the resulting binary values by placing a 1 in


the appropriate cell of the 3-variable K-map 63
The rules of Kmap simplification are:
• Groupings can contain only 1s; no 0s.
• Groups can be formed only in the same row or in the
same column (diagonal groups are not allowed).
• The number of 1s in a group must be a power of 2 even
if it contains a single 1.
• Each cell in a group must be adjacent to one or more
cells in that same group, but all cells in the group do not
have to be adjacent to each other
• The groups must be made as large as possible.
• Groups can overlap and wrap around the sides of the 64

Kmap.
Grouping the 1s
•Group the 1s in each of the K-maps based on the rule:

65
3A.4 DETERMINING THE MINIMUM SOP
EXPRESSION FROM THE MAP
The following rules are applied to find the minimum
product terms and the minimum SOP expression.
1.Each group of cells containing 1s creates one product term
composed of all variables that occur in only one form (either
uncomplemented or complemented) within the group
2.Variables that occur both uncomplemented and complemented
within the group are eliminated. These are called contradictory
variables.
3.Determine the minimum product term for each group
4.When all the minimum product terms are derived from the K-
map, they are summed to form the minimum SOP expression. 66
Determine the product terms for each of the K-maps

Use a K-map to minimize the following standard SOP expression:

67
3A.4 K-MAP POS MINIMIZATION
• The approaches are much the same except that with POS
expressions, 0s representing the standard sum terms are
placed on the K-map instead of 1s.

68
3A.4 K-MAP POS MINIMIZATION
Map the following standard POS expression on a K- map:

69
3A.4 K-MAP POS MINIMIZATION
Use a K-map to minimize the following standard POS
expression and also, derive the equivalent SOP expression.

•The combinations of binary values of the expression are:


(0 + 0 + 0)(0 + 0 + 1)(0 + 1 + 0)(0 + 1 + 1)(1 + 1 + 0)
•Map the standard POS expression and group the cells

70
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• This grouping tells us that changes in the variables x and y have
no influence upon the value of the function: They are irrelevant.
• This means that the function,

reduces to F(x) = z.

You could verify


this reduction
with identities or
a truth table.
71
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES

• Now for a more complicated Kmap. Consider the function:

• Its Kmap is shown below. There are (only) two groupings


of 1s.
• Can you find them?

72
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• In this Kmap, we see an example of a group that wraps
around the sides of a Kmap.
• This group tells us that the values of x and y are not relevant
to the term of the function that is encompassed by the group.
• What does this tell us about this term of the function?

What about the


green group in
the top row?
73
3A.4 KMAP SIMPLIFICATION
FOR THREE VARIABLES
• The green group in the top row tells us that only the value of x is
significant in that group.
• We see that it is complemented in that row, so the other term of the
reduced function is .
• Our reduced function is:
F(x,y,z) =xl + zl

Recall that we had


six minterms in our
original function!
74
3A.5 KMAP SIMPLIFICATION
FOR FOUR VARIABLES

• Our model can be extended to accommodate the 16


minterms that are produced by a four-input function.
• This is the format for a 16-minterm Kmap.

75
3A.5 KMAP SIMPLIFICATION
FOR FOUR VARIABLES
• We have populated the Kmap shown below with the nonzero minterms from the
function:

• Can you identify (only) three groups in this Kmap?

Recall that
groups can
overlap.

76
3A.5 KMAP SIMPLIFICATION
FOR FOUR VARIABLES
• Our three groups consist of:
• A purple group entirely within the Kmap at the right.
• A pink group that wraps the top and bottom.
• A green group that spans the corners.
• Thus we have three terms in our final function:

77
3.3 LOGIC GATES

• We have looked at Boolean functions in abstract terms.


• In this section, we see that Boolean functions are implemented in
digital computer circuits called gates.
• A gate is an electronic device that produces a result based on two
or more input values.
• In reality, gates consist of one to six transistors, but digital
designers think of them as a single unit.
• Integrated circuits contain collections of gates suited to a
particular purpose.

78
3.3 LOGIC GATES
• Each gate is defined in three ways: graphic symbol,
algebraic notation, and truth table.
• The three simplest gates are the AND, OR, and NOT gates.

• They correspond directly to their respective Boolean


operations, as you can see by their truth tables.
79
3.3 ACTIVITY ON LOGIC GATES
Design the Logic circuit for the following Boolean functions:
1. .

2.

80
3.3 ACTIVITY ON LOGIC GATES
Design a logic circuit to implement the operation specified
in the truth table.
1..

81
3.3 ACTIVITY ON LOGIC GATES
Design a logic circuit to implement the operation specified
in the truth table.
2..

82

Develop a logic circuit with four input variables that will only produce a 1 output when exactly three
3.3 LOGIC GATES

• Another very useful gate is the exclusive OR (XOR) gate.


• The output of the XOR operation is true only when the values
of the inputs differ.

Note the special symbol 


for the XOR operation.
83
3.3 LOGIC GATES

• NAND and NOR are


two very important
gates. Their symbols
and truth tables are
shown at the right.

84
3.3 LOGIC GATES

• NAND and NOR are


known as universal
gates because they are
inexpensive to
manufacture and any
Boolean function can
be constructed using
only NAND or only
NOR gates.
85
3.3 LOGIC GATES

• Gates can have multiple inputs and more than one output.
• A second output can be provided for the complement
of the operation.
• We’ll see more of this later.

86
3.4 DIGITAL COMPONENTS
• logic diagram represents the physical implementation of the given expression,
or the actual digital circuit.
• The main thing to remember is that combinations of gates implement Boolean
functions.
• The circuit below implements the Boolean function:

87
We simplify our Boolean expressions so
that we can create simpler circuits.
3.5 COMBINATIONAL CIRCUITS

• We have designed a circuit that implements the Boolean


function:

• This circuit is an example of a combinational logic


circuit.
• Combinational logic circuits produce a specified output
(almost) at the instant when input values are applied.

88
3.5 COMBINATIONAL CIRCUITS

• Combinational circuit is a circuit in which we combine


different gates in the circuit.

Characteristics
 Output depends only upon present input.
The combinational circuit do not use any memory.
 The previous state of input does not have any effect on the
present state of the circuit.
 A combinational circuit can have an n number of inputs and
m number of outputs.
 Easy to design, high speed, and is time independent. 89
3.5 COMBINATIONAL CIRCUITS

• Adders are important in computers and also in other types of


digital systems in which numerical data are processed.

• Combinational logic circuits give us


many useful devices.
• One of the simplest is the half
adder, which finds the sum of two
bits.
• We can gain some insight as to the
construction of a half adder by
looking at its truth table, shown at 90
the right.
3.5 COMBINATIONAL CIRCUITS
• As we see, the sum can be found
using the XOR operation and
the carry using the AND
operation.

• The half-adder accepts two binary digits on its inputs and produces two binary
digits on its outputs—a sum bit and a carry bit. 91
3.5 COMBINATIONAL CIRCUITS

• We can change our half


adder into to a full adder by
including gates for
processing the carry bit.
• The truth table for a full
adder is shown at the right.

92
3.5 COMBINATIONAL CIRCUITS

• Here’s our completed full adder.

93
3.5 COMBINATIONAL CIRCUITS

• Just as we combined half adders to make a full adder,


full adders can connected in series.
• The carry bit “ripples” from one adder to the next; hence,
this configuration is called a ripple-carry adder.

Today’s systems employ more efficient adders.


94
3.5 COMBINATIONAL CIRCUITS

• Decoders are another important type of combinational circuit.


• Among other things, they are useful in selecting a memory
location according a binary value placed on the address lines of
a memory bus.
• Address decoders with n inputs can select any of 2n locations.
• Decoders have a wide variety of applications in digital systems
such as data demultiplexing, digital display, digital to analog
converting, memory addressing.

This is a block
diagram for a 95
decoder.
3.5 COMBINATIONAL CIRCUITS

• This is what a 2-to-4 decoder looks like on the inside.

If x = 0 and y = 1,
which output line
is enabled? 96
3.5 COMBINATIONAL CIRCUITS

• A multiplexer(data selector) does


just the opposite of a decoder.
• It selects a single output from
several inputs.
• The particular input chosen for
output is determined by the value
of the multiplexer’s control lines.
• The term multiplex means “many
into one.

97
3.5 COMBINATIONAL CIRCUITS

This is what a 4 to 1 Multiplexer looks like on the inside.

98
3.6 SEQUENTIAL CIRCUITS

• As the name implies, sequential logic circuits require a means by


which events can be sequenced.

Characteristics
 In this output depends upon present as well as past input.
 There exists a feedback path between input and output.
 Elementary building blocks: Flip-flops, Mainly used for storing data.
 Sequential circuits have capability to store any state or to retain
earlier state.
 As sequential circuits are clock dependent they need triggering.
 Speed is slow, and its designed tough as compared to combinational
99
circuits.
3.6 SEQUENTIAL CIRCUITS

• This type of circuits uses previous input, output, clock and a


memory element.
• Sequential circuits are broadly classified into two main
categories, known as synchronous or clocked and asynchronous
or unclocked sequential circuits, depending on the timing of
their signals.

100
3.6 SEQUENTIAL CIRCUITS

In these systems, the memory elements are affected only at


discrete instants of time.
•The synchronization is achieved by a timing device known
as a system clock.
•State changes are controlled by clocks.
• A “clock” is a special circuit that sends electrical pulses
through a circuit.
•Clocks produce electrical waveforms such as the one shown
below

101
3.6 SEQUENTIAL CIRCUITS
Asynchronous sequential circuit
•Is a sequential circuit whose behavior depends upon the
sequence in which the input signals.
•The output will be affected whenever the input changes.
•There is no need to wait for a clock pulse.
•Asynchronous circuits are faster than synchronous sequential
circuits. However, in an asynchronous circuit, events are
allowed to occur without any synchronization. And in such a
case, the system becomes unstable.

•Since the designs of asynchronous circuits are more tedious


and difficult, their uses are rather limited.
102
3.6 SEQUENTIAL CIRCUITS

• State changes occur in sequential circuits only when the


clock ticks.
• Circuits can change state on the rising edge, falling
edge, or when the clock pulse reaches its highest voltage.

103
3.6 SEQUENTIAL CIRCUITS

• Circuits that change state on the rising edge, or


falling
edge of the clock pulse are called edge-triggered.
• Level-triggered circuits change state when the clock
voltage reaches its highest or lowest level.

104
3.6 SEQUENTIAL CIRCUITS
• To retain their state values, sequential circuits rely on
feedback.
• Feedback in digital circuits occurs when an output is looped
back to the input.
• A simple example of this concept is shown below.
• If Q is 0 it will always be 0, if it is 1, it will always be 1.
Why?

105
3.6 SEQUENTIAL CIRCUITS

Flip-flops
•The memory elements used in sequential circuits are flip-
flops which are capable of storing binary information.
•The basic 1-bit digital memory circuit is known as a flip-
flop. It can have only two states, either the 1 state or the 0
state.
•Flip-flops can be obtained by using NAND or NOR gates.

106
3.6 SEQUENTIAL CIRCUITS

• Flip-flop has one or more inputs and two outputs.


• The two outputs are complementary to each other. If Q is 1 i.e.,
Set, then Q' is 0; i.e., Reset, then Q' is 1. That means Q and Q'
cannot be at the same state simultaneously. If it happens by any
chance, it violates the definition of a flip-flop and hence is called
an undefined condition.
• Normally, the state of Q is called the state of the flip-flop, whereas
the state of Q' is called the complementary state of the flip-flop.

107
3.6 SEQUENTIAL CIRCUITS

• You can see how feedback works by examining the


most basic sequential logic components, the SR flip-
flop.
• The “SR” stands for set/reset.

108
3.6 SEQUENTIAL CIRCUITS
• The behavior of an SR flip-flop is described by a characteristic table.
• Q(t) means the value of the output at time t. Q(t+1) is the value of Q
after the next clock pulse.
• We can describe any flip-flop by using a characteristic table, which
indicates what the next state should be based on the inputs and the
current state

109
3.6 SEQUENTIAL CIRCUITS`

• The SR flip-flop actually has


three inputs: S, R, and its
current output, Q.
• Thus, we can construct a truth
table for this circuit, as shown
at the right.
• Notice the two undefined
values. When both S and R
are 1, the SR flip-flop is
unstable.
110
3.6 SEQUENTIAL CIRCUITS
• If we can be sure that the inputs to an SR flip-flop will
never both be 1, we will never have an unstable circuit.
This may not always be the case.
• The SR flip-flop can be modified to provide a stable
state when both inputs are 1.

• This modified flip-flop is


called a JK flip-flop, shown at
the right.
- The “JK” is in honor of
Jack Kilby.

111
3.6 SEQUENTIAL CIRCUITS

• At the right, we see how


an SR flip-flop can be
modified to create a JK
flip-flop.
• The characteristic table
indicates that the flip-flop
is stable for all inputs.

112
3.6 SEQUENTIAL CIRCUITS

• Another modification of the SR flip-flop is the D flip-


flop, shown below with its characteristic table.
• You will notice that the output of the flip-flop remains
the same during subsequent clock pulses. The output
changes only when the value of D changes.

113
3.6 SEQUENTIAL CIRCUITS

• The D flip-flop is the fundamental circuit of computer


memory.
• D flip-flops are usually illustrated using the block diagram
shown below.
• The characteristic table for the D flip-flop is shown at the
right.

114
3.7 DESIGNING CIRCUITS

• We have seen digital circuits from two points of view:


digital analysis and digital synthesis.
• Digital analysis explores the relationship between a
circuits inputs and its outputs.
• Digital synthesis creates logic diagrams using the values
specified in a truth table.

115
3.7 DESIGNING CIRCUITS

• Digital designers rely on specialized software to


create efficient circuits.
• Thus, software is an enabler for the construction of
better hardware.
• Of course, software is in reality a collection of
algorithms that could just as well be implemented in
hardware.
 The Principle of Equivalence of Hardware and
Software.
116
3.7 DESIGNING CIRCUITS
• When we need to implement a simple, specialized algorithm
and its execution speed must be as fast as possible, a
hardware solution is often preferred.
• Typically, it is much easier to write a program than it is to
design the hardware necessary to implement the algorithm.
• However, there are situations in which the hardware
implementation is better (for example, in a real-time system,
the hardware implementation is faster, and faster is definitely
better.)

117
3.7 DESIGNING CIRCUITS
• However, there are also cases in which a software implementation is better. It
is often desirable to replace a large number of digital components with a
single programmed microcomputer chip, resulting in an embedded system,
which are small special-purpose computers that we find in many everyday
things.
• embedded system is a microcontroller or microprocessor based system which
is designed to perform a specific task.
• Embedded systems require special programming that demands an
understanding of the operation of digital circuits, the basics of which you
have learned in this chapter.

118
CHAPTER 3 CONCLUSION

• Computers are implementations of Boolean logic.


• Boolean functions are completely described by truth tables.
• Logic gates are small circuits that implement Boolean
operators.
• The basic gates are AND, OR, and NOT.
• The XOR gate is very useful in parity checkers and
adders.
• The “universal gates” are NOR, and NAND.
119
CHAPTER 3 CONCLUSION

• Computer circuits consist of combinational logic circuits


and sequential logic circuits.
• Combinational circuits produce outputs (almost)
immediately when their inputs change.
• Sequential circuits require clocks to control their changes
of state.
• The basic sequential circuit unit is the flip-flop: The
behaviors of the SR, JK, and D flip-flops are the most
important to know.
120

You might also like