0% found this document useful (0 votes)
87 views51 pages

Digital Logic Chap 4

1) Boolean algebra and digital logic are based on George Boole's laws of thought and involve manipulating variables that can have two values, like true/false or on/off. 2) Boolean algebra uses operators like AND, OR, and NOT to combine variables. 3) Logic gates are electronic devices that implement Boolean functions and form the building blocks of digital circuits. Common gates include AND, OR, NOT, NAND, and NOR. 4) Combinational logic circuits are digital circuits whose outputs depend only on the current inputs. They produce outputs instantly in response to input changes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views51 pages

Digital Logic Chap 4

1) Boolean algebra and digital logic are based on George Boole's laws of thought and involve manipulating variables that can have two values, like true/false or on/off. 2) Boolean algebra uses operators like AND, OR, and NOT to combine variables. 3) Logic gates are electronic devices that implement Boolean functions and form the building blocks of digital circuits. Common gates include AND, OR, NOT, NAND, and NOR. 4) Combinational logic circuits are digital circuits whose outputs depend only on the current inputs. They produce outputs instantly in response to input changes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Chapter 4

Boolean Algebra and Digital Logic

1
4.1 Introduction

• Computers, as we know them today, are


implementations of Boole’s Laws of Thought
(George Boole (philosopher and mathematician) ).
– John Atanasoff and Claude Shannon were among the first
to see this connection.
• In the middle of the twentieth century, computers
were commonly known as “thinking machines” and
“electronic brains.”
– Many people were fearful of them.

2
4.2 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.

3
4.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.

4
4.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” ().

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

So binary numbering system is fundamental in digital


systems.

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

8
4.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.

9
4.2 Boolean Algebra

• Most Boolean identities have an AND (product)


form as well as an OR (sum) form. We give our
identities using both forms

10
4.2 Boolean Algebra

• Second group of Boolean identities should be


familiar from study of algebra:

11
4.2 Boolean Algebra

• Simplify the function:

12
4.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 states:
• Replace each variable by its complement and change all ANDs
to ORs and all ORs to ANDs

13
4.2 Boolean Algebra

• There are two canonical forms for Boolean


expressions: sum-of-products and product-of-sums.
– Recall the Boolean product is the AND operation and the
Boolean sum is the OR operation.
• 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:

14
4.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
ORed together.
15
4.2 Boolean Algebra

• The sum-of-products form


for our function is:

Simplify further

Prove different laws using truth table

16
Simplify
P  A. ( B  C)  A(C  B)
 A

17
Simplify
P  A. ( B  C)  A(C  B)
 A

A.B + A.C+ A.C + A.B distributive


A.(B + B) + A.(C + C) re-distribute
A.1 + A.1 complementary
A+A
A idempotent

18
Karnaugh Map (K map)
• Method for minimizing logic
• Is used to represent the values of a function for different input values
• The rows and columns of the K-map correspond to the possible values of the
function's input
• Each cell in the K-map represents a minterm (i.e. a three variables function
has: x’y’z’, x’y’z, x’yz’, x’yz, xy’z’, xy’z, xyz’ and xyz)

19
x y z O
Karnaugh Map (K map) 0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0

(xy’ + yz)’

20
LOGIC GATES

21
4.3 Logic Gates

• Boolean functions are implemented in digital


computer circuits as digital logic 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.

22
4.3 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.
• These are also known as primary gates
23
4.3 Logic Gates

• NAND and NOR


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

24
4.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.

25
4.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.

26
XNOR A B P
0 0 1
XNOR P = A  B A
P 0 1 0
B 1 0 0
1 1 1

27
Design example:
Sound the buzzer when either car door is open and the driver is seated
on the seat. The output should be 1 when either OR right door is open
AND the driver is seated.
O= (L+R). S (Boolean Eqn.)

28
Design example:
Sound the buzzer when either car door is open and the driver is seated
on the seat. The output should be 1 when either OR right door is open
AND the driver is seated.
O= (L+R). S (Boolean Eqn.)

R
O
S

29
Exercise
Complete the truth table for this circuit and name the equivalent
primitive function/gate.
A B A+B A.B A.B P

0 0 0 0 1 0

0 1 1 0 1 1

1 0 1 0 1 1

1 1 1 1 0 0

31
COMBINATIONAL CIRCUITS

32
4.4 Digital Components

• The main thing to remember is that combinations


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

Simplification of Boolean expressions to


create simpler circuits.
33
4.5 Combinational Circuits

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

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

35
4.5 Combinational Circuits

• As we see, the sum can be


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

S= X.Y’+ X’Y
C= X.Y

36
4.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.

37
4.5 Combinational Circuits

• Here’s our completed full adder.

S=A’BC’+A’B’C+ABC+AB’C’

C= AB+BC+AC
38
4.5 Combinational Circuits

• Decoders are another important type of


combinational circuit.

• Address decoders with n inputs can select any of 2n


locations.

This is a block
diagram for a
decoder.

39
4.5 Combinational Circuits

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


inside.

40
4.5 Combinational Circuits

• A multiplexer 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.
This is a block
• To be able to select among n
diagram for a
inputs, log2n control lines are multiplexer.
needed.
41
4.5 Combinational Circuits

• This is what a 4-to-1 multiplexer looks like on the


inside.

42
EXERCISE

43
• Design a circuit which which will give an
output 1 when 2 or more buttons are
pressed.
Combinational circuit design steps.
1. Problem definition
2. Truth table
3. K map
4. Boolean equation
5. Logic circuit

44
1. A circuit which will give an output 1 when 2 or more buttons are
pressed.
A B C O
2. Truth Table
0 0 0 0
3. K Map 0 0 1 0

AB 0 1 0 0
00 01 11 10
C 0 1 1 1
0
0 0 1 0 1 0 0 0
1 0 1 1 1 1 0 1 1
1 1 0 1
4. Boolean equation 1 1 1 1
O= A.B+ B.C+ A.C A
5. Logic Circuit
B O

C 45
Karnaugh Map reduction method

46
Exercise

1. Design a logical expression with A, B and


C inputs with an output that they are true
only when B is true ( true=1)

2. Output (o)= a'b'c' + a'bc' + abc' + abc

47
Draw K Map

(B) 48
(A)
(B)

49
50
51

You might also like