0% found this document useful (0 votes)
52 views67 pages

Logic - Gates - Module 3

DDCA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views67 pages

Logic - Gates - Module 3

DDCA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 67

Logic Gates

A logic Gate is a device that act as a building


block for a digital circuits

1
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.

2
Logic Gates

• 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.
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.

4
Logic Gates

• NAND and NOR


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

5
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.

6
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.

7
Digital Components

• The main thing to remember is that combinations of


gates implement Boolean functions.
• The circuit below implements the Boolean function:

We simplify our Boolean expressions so


that we can create simpler circuits.
8
Boolean Algebra, Digital Logic

9
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.

10
Boolean Algebra

• Boolean algebra is a mathematical system for


the manipulation of variables that can have
one of two values.
– 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.”
• Boolean expressions are created by
performing operations on Boolean variables.
– Common Boolean operators include AND, OR,
and NOT.

11
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.

12
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.

13
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}.

Now you know why the binary numbering


system is so handy in digital systems.

14
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.
15
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.

16
Boolean Algebra

• Digital computers contain circuits that implement


Boolean functions.
• We can simplify the circuits using Boolean
function simplification.
– 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 that help
us to do this.

17
Boolean Algebra

• Most Boolean identities have an AND (product)


form as well as an OR (sum) form. Table shows
the first identity:

Identity Name AND Form OR Form

Identity Law 1X=X 0+X=X

Idempotent Law XX=X X+X =X

Inverse Law
X X’ = 0 X + X’ = 1

18
Boolean Algebra

• The second group of Boolean identities are:

Identity Name AND Form OR Form

Commutative Law XY=YX X+Y=Y+X

Associative Law (X Y) Z = X (Y Z) (X + Y) + Z = X + ( Y + Z)

Distributive Law X + Y Z = ( X + Y) (X + Z) X (Y + Z) = X Y + X Z

19
Boolean Algebra

• Our last group of Boolean identities are perhaps the


most useful.
• If you have studied set theory or formal logic, these
laws are also familiar to you.

20
Boolean Algebra

• We can use Boolean identities to simplify the


function:
as follows:

21
Boolean Algebra

• DeMorgan’s law can be extended to any number of


variables.
• Replace each variable by its complement and
change all ANDs to ORs and all ORs to ANDs.
• Thus, we find the the complement of:

is:

22
Boolean Algebra

• We can use Boolean identities to simplify the


function:
as follows:

23
Conclusion

• Computers uses implementations of Boolean logic.


• Boolean functions are completely described by truth
tables.
• Logic gates are small circuits that implement
Boolean operators.
• The proper implementation of Boolean function
reduced the cost, complexity and power
consumption.
• The operators use in Boolean algebra are AND, OR,
and NOT.
24
Lecture 3

Combinational Circuits

25
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.
– In a later section, we will explore circuits where this is
not the case.

26
Combinational Circuits

• 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 the right.

27
Combinational Circuits

• As we see, the sum can be


found using the XOR
operation and the carry
using the AND operation.

28
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.

29
Combinational Circuits

• How can we change the


half adder shown below
to make it a full adder?

30
Combinational Circuits

• Here’s our completed full adder.

31
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.

32
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.
This is a block
diagram for a
decoder.

33
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?

34
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.

35
Minterms and Maxtermas,
K- MAP
Lecture-4

36
Standard Forms related to

Boolean Function
We need to consider formal techniques for the
simplification of Boolean functions.
– Minterms and Maxterms
– Sum-of-Minterms and Product-of- Maxterms
– Sum-of-Products (SOP) and Product-of-Sums (POS)

2024.10.18 Boolean Algebra


Definitions
• Literal: A variable or its complement
• Product term: literals connected by •
• Sum term: literals connected by +
• Minterm: a product term in which all the variables
appear exactly once, either complemented or
uncomplemented
• Maxterm: a sum term in which all the variables
appear exactly once, either complemented or
uncomplemented

2024.10.18 Boolean Algebra


Minterm
• Represents exactly one combination in the truth table.
• Example: Assume 3 variables (A,B,C).
• Then one of the minterm corresponding to three
variable is = A’BC
for A =1 and A’ is =0, B is 1, B’=0 and C=1 and
c’=0.

2024.10.18 Boolean Algebra


Maxterm
• Represents exactly one combination in the truth table.
• Example: Assume 3 variables (A,B,C),

• maxterm is denoted by M = A+B’+C’


which is equal to 011

2024.10.18 Boolean Algebra


Truth Table notation for Minterms
and Maxterms
• Minterms and x y z Minterm Maxterm
Maxterms are easy 0 0 0 x’y’z’ = x+y+z = M0
m0
to denote using a
0 0 1 x’y’z = m1 x+y+z’ = M1
truth table.
0 1 0 x’yz’ = m2 x+y’+z = M2
• Example: 0 1 1 x’yz = m3 x+y’+z’= M3
Assume 3 variables1 0 0 xy’z’ = m4 x’+y+z = M4
x,y,z 1 0 1 xy’z = m5 x’+y+z’ =
(order is fixed) M5
1 1 0 xyz’ = m6 x’+y’+z =
M6
2024.10.18 Boolean Algebra
1 1 1 xyz = m7 x’+y’+z’ =
Canonical Forms (Unique)
• Any Boolean function F( ) can be expressed as
a unique sum of minterms and a unique
product of maxterms (under a fixed variable
ordering).
• In other words, every function F() has two
canonical forms:
– Canonical Sum-Of-Products (sum of minterms)
– Canonical Product-Of-Sums (product of
maxterms)

2024.10.18 Boolean Algebra


Example
• Truth table for f1(a,b,c) at right
a b c f1
• The canonical sum-of-products form for f1
is 0 0 0 0
f1(a,b,c) = m1 + m2 + m4 + m6 0 0 1 1
= a’b’c + a’bc’ + ab’c’ + abc’
0 1 0 1
• The canonical product-of-sums form for f1
is 0 1 1 0
f1(a,b,c) = M0 • M3 • M5 • M7 1 0 0 1
= (a+b+c)•(a+b’+c’)• 1 0 1 0
(a’+b+c’)•(a’+b’+c’).
• Observe that: mj = Mj’ 1 1 0 1
2024.10.18 Boolean Algebra
1 1 1 0
Design Truth table

• The canonical sum-of-products form for f1 is


f1(a,b,c) = m1 + m2 + m4 + m6
= a’b’c + a’bc’ + ab’c’ + abc’
• The canonical product-of-sums form for f1 is
f1(a,b,c) = M0 • M3 • M5 • M7
= (a+b+c)•(a+b’+c’)•
(a’+b+c’)•(a’+b’+c’).

44
Shorthand: ∑ and ∏
• f1(a,b,c) = ∑ m(1,2,4,6), where ∑ indicates that this is a
sum-of-products form, and m(1,2,4,6) indicates that the
minterms to be included are m1, m2, m4, and m6.
• f1(a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that this is a
product-of-sums form, and M(0,3,5,7) indicates that the
maxterms to be included are M0, M3, M5, and M7.
• Since mj = Mj’ for any j, (for 3 variable total number
of value is j (2 power 3=8) or J=0,1,2,3,4,5,6,7
∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f1(a,b,c)

2024.10.18 Boolean Algebra


Conversion Between Canonical Forms

• Replace ∑ with ∏ (or vice versa) and replace those j’s


that appeared in the original form with those that do not.
• Example:
f1(a,b,c) = a’b’c + a’bc’ + ab’c’ + abc’
= m1 + m2 + m4 + m6
= ∑(1,2,4,6)
= ∏(0,3,5,7)
= (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)

2024.10.18 Boolean Algebra


Problems
Q .1 Convert the following Boolean
expression from POS into SPOS.
F (A, B, C)=A(A+C)

2024.10.18 Boolean Algebra


Problem
Q .2 find out the minterms of following
(i). F (A, B)= AB+A’B
(ii). F(A,B,C)= AB+ABC

2024.10.18 Boolean Algebra


Problem
Q .3. Convert following SSOP into SPOS.
F(A,B,C,D)= ABC’D’+A’B’CD+ACBD’

2024.10.18 Boolean Algebra


Problem
Q 4. Convert SOP into SSOP
F(A,B)= A+(AB)

2024.10.18 Boolean Algebra


51
K – Map Simplification
It is the practical method used to minimize
Boolean expression without having the use of
Boolean Theorems and equations.

2024.10.18 Boolean Algebra


Rules for K-Map simplification
1. Group may not be containing zero.
2. We can group 1, 2, 4, 8.
3. Each groups should be as large as possible.
4. Cell containing 1 must be grouped.
5. Groups may overlap.
6. Opposite grouping and corner grouping is
allowed.
7. There should be as few groups as possible.
2024.10.18 Boolean Algebra
x
x
2
Two-Variable Map x
1 0 1
0 1 x
1 2
0 1 0 2

0 m
0
m
1 OR 0 m
0
m
2
2 3 1 3

1 m m 1 m m
2 3 1 3

NOTE: ordering of variables is IMPORTANT for f(x ,x ), x is the row, x


1 2 1 2
is the column.

2024.10.18 Boolean Algebra


Three-Variable Map
yz

x 00 01 11 10

0 1 3 2

0 m m m m
0 1 3 2
4 5 7 6

1 m m m m
4 5 7 6

-Note: variable ordering is (x,y,z); yz specifies column, x specifies row.

-Each cell is adjacent to three other cells (left or right or top or bottom or edge

wrap)

2024.10.18 Boolean Algebra


Three-Variable Map (cont.)
minterm

The types of structures that are either minterms or are


generated by repeated application of the minimization
theorem on a three variable map are shown at right.
Groups of 1, 2, 4, 8 are possible.

group of 2 terms

group of 4 terms

2024.10.18 Boolean Algebra


More Examples
yz
X 00 01 11 10

• f1(x, y, z) = ∑ m(2,3,5,7) 0 1 1
1 1 1
 f (x, y, z) = x’y + xz
1

• f2(x, y, z) = ∑ m (0,1,2,3,6)
1 1 1 1
f (x, y, z) = x’+yz’
2
1

2024.10.18 Boolean Algebra


Four-Variable Maps
CD
00 01 11 10
AB
m m m m
00 0 1 3 2

m m m m
01 4 5 7 6

m m m m
11 12 13 15 14

m m m m
10 8 9 11 10

• Top cells are adjacent to bottom cells. Left-edge cells


are adjacent to right-edge cells.
• Note variable ordering (ABCD).

2024.10.18 Boolean Algebra


Example
• Simplify the following Boolean function (A,B,C,D)
= ∑m(0,1,2,4,5,7,8,9,10,12,13).
• First put the function g( ) into the map, and then
group as many 1s as possible.
ab cd

1 1 1 1 1 1

1 1 1 1 1 1

1 1 1 1

1 1 1 1 1 1

g(A,B,C,D) = c’+b’d’+a’bd

2024.10.18 Boolean Algebra


Don't Care Conditions
The don’t cares are used to reduce the Boolean
expression in much minimize form. The don’t cares
are not effects the results. These are denoted by
using one of the following in thought table:
d or X or 2
We used as 1 in case of minterm (i.e. sop) to
represent it to make a group.
We used as 0 in case of minterm (i.e. pos) to
represent it to make a group.
2024.10.18 Boolean Algebra
cd
ab

Example
00 01 11 10

00 0 1 0 1
01 1 1 0 1
• Simplify the function f(a,b,c,d) 11 0 0 x x
10
1 1 x x
whose K-map is shown at the
right. 0 1 0 1

• f = a’c’d+ab’+cd’+a’bc’ 1 1 0 1

0 0 x x

or 1 1 x x

• f = a’c’d+ab’+cd’+a’bd’ 0 1 0 1

1 1 0 1

0 0 x x

1 1 x x

2024.10.18 Boolean Algebra


cd

Another Example ab

x 1 0 0
1 x 0 x
• Simplify the function 1 x x 1

f(a,b,c,d) whose K-map is 0 x x 0

shown at right. x 1 0 0
• f = a’c’+ ab 1 x 0 x
1 x x 1
or 0 x x 0
• f = a’c’+b’d
x 1 0 0
1 x 0 x
1 x x 1
0 x x 0
2024.10.18 Boolean Algebra
Problem
Q 1. Minimize form of logic expression.
A’B’C’+A’BC’+A’BC+ABC’ is
(1). A’C’ +BC’+A’B
(2). AC’+B’C+A’B
(3). A’C+B’C+A’B
(4). AC’+B’C+AB’

2024.10.18 Boolean Algebra PJF - 63


Problem
Q.2 The Boolean expression
F= A’B’C’D+A’BCD’+AB’C’D+ABC’D’
can be minimized to
(a). A’BCD’+B’C’D+ABC’D’
(B). A’B’CD’+B’C’D+ABC’D’

2024.10.18 Boolean Algebra PJF - 64


Problem
Q.2 The Boolean expression
F= A’B’C’D+A’BCD’+AB’C’D+ABC’D’
can be minimized to
Ans:- A’BCD’+B’C’D+ABC’D’

2024.10.18 Boolean Algebra PJF - 65


Problem
Q. 3 The Boolean expression for the thought
table a b c f
Shown is 0 0 0 0
(a). B(A+C)(A’+C’) 0 0 1 0
(b). B(A+C’)(A’+C) 0 1 0 0
(C). B’(A+C’)(A’+C)
0 1 1 1
(D). B’(A+C)(A+C’)
1 0 0 0
1 0 1 0
1 1 0 1
2024.10.18 Boolean Algebra
1 1 1 0
Thanks

2024.10.18 Boolean Algebra PJF - 67

You might also like