Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 40

Digital Logic Design(CS-128T)

Lecture 05
Boolean Algebra

Batch 2021F
Boolean Algebra

• Boolean Constants
• these are ‘0’ (false) and ‘1’ (true)
• Boolean Variables
• variables X, Y etc. that can only take the vales ‘0’ or ‘1’
• Boolean Functions
• each of the logic functions (such as AND, OR and NOT) are
represented by symbols as described above
• Boolean Theorems
• a set of identities and laws – see text for details
2
Boolean identities

AND Function OR Function NOT function


00=0 0+0=0 0 1
01=0 0+1=1 1 0
10=0 1+0=1 AA
11=1 1+1=1
A0=0 A+0=A
0A=0 0+A=A
A1=A A+1=1
1A=A 1+A=1
AA=A A+A=A
A A  0 A  A 1
3
Boolean laws

Commutative law Absorption law


AB  BA A  AB  A
AB B A A( A  B )  A

Distributive law De Morgan’s law


A(B+C)=AB+AC
A+BC=(A+B)(A+C) A B  AB
AB  A B

Associative law Note also


A(BC )  ( AB )C A  AB  A  B
A  (B  C )  ( A  B )  C A( A  B )  AB

4
Combinational Logic
• Digital systems may be divided into two broad
categories:
• combinational logic
• where the outputs are determined solely by the current states of
the inputs
• sequential logic
• where the outputs are determined not only by the current inputs
but also by the sequence of inputs that led to the current state

• In this lecture we will look at combinational logic

5
Implementing a function from a Boolean expression
01

Implement the function:


X  A  BC

6
Implementing a function from a Boolean expression
02

Implement the function


Y  AB  C D

7
Generating a Boolean expression from a logic diagram

8
Example (continued)
work progressively from the inputs to the output adding logic expressions to
the output of each gate in turn

9
Implementing a logic function from a
description
The operation of the Exclusive OR gate can be stated as:
“The output should be true if either of its inputs are true,
but not if both inputs are true.”
This can be rephrased as:
“The output is true if A OR B is true,
AND if A AND B are NOT true.”
We can write this in Boolean notation as

X  ( A  B)  ( AB )
10
Example (continued)
The logic function

can then be implemented as before

X  ( A  B)  ( AB )

11
Implementing a logic function from a truth
table
Implement the function of the following truth table
A B C X

0 0 0 0

0 0 1 1 – first write down a Boolean


0 1 0 0
expression for the output
– then implement as before
0 1 1 0
– in this case
1 0 0 0

1 0 1 1 X  A BC  ABC  ABC
1 1 0 1

1 1 1 0
12
Example (continued)

The logic function X A BC  A BC  AB C


can then be implemented as before

13
Simplification of Logic Expression

• In some cases it is possible to simplify logic expressions using the rules of


Boolean algebra

X  ABC  A BC  AC  A C can be simplified to X  BC  A

hence the following circuits are equivalent

14
What will be the circuits for the following
expressions?

Computer Science & Information Technology Department


15
Sir Syed University of Engg. & Tech.
Precedence of Operators
• Perform all inversions of single terms
• Perform all operations with parentheses
• Perform an AND operation before an OR operation
unless parentheses indicate otherwise
• If an expression has a bar over it, perform the expression
inside the expression first and then invert the result

Computer Science & Information Technology Department


16
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
17
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
18
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
19
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
20
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
21
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
22
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
23
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
24
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
25
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
26
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
27
Sir Syed University of Engg. & Tech.
Computer Science & Information Technology Department
28
Sir Syed University of Engg. & Tech.
Simplify the circuit

Computer Science & Information Technology Department


29
Sir Syed University of Engg. & Tech.
Another simplification

Computer Science & Information Technology Department


30
Sir Syed University of Engg. & Tech.
Another simplification

Computer Science & Information Technology Department


31
Sir Syed University of Engg. & Tech.
Simplification using
Boolean Algebra

Computer Science & Information Technology Department


32
Sir Syed University of Engg. & Tech.
Simplification using
Boolean Algebra

Computer Science & Information Technology Department


33
Sir Syed University of Engg. & Tech.
Simplification using
Boolean Algebra

Computer Science & Information Technology Department


34
Sir Syed University of Engg. & Tech.
Security light

During the day the


light sensor output is
high.

Light 1
sensor 0
0 0
Relay Lamp

Body 0/1
heat The relay controls a
sensor separate circuit with the
lamp in it.
During the day the body
heat sensor can be either
high or low – the AND gate
will not be triggered. 35
Security light

When it is dark the light


sensor output is low.

Light 0
sensor 1
1 1
Relay Lamp

Body 1
heat The AND gate receives two
sensor high inputs and triggers the
relay which causes the lamp
When it is dark, if someone to switch on.
approaches the body heat
sensor is triggered and
becomes high 36
A night-time rain alarm

Light sensor During the day, the output from


1 0 the light sensor is always HIGH
(1) so the output from the NOT
gate is always LOW (0) and the
alarm is not switched on.

Moisture 0
sensor 0/1 Alarm

37
A night-time rain alarm.

Light sensor In darkness the output from the


0 1 light sensor is LOW (0). This
means that the output from the
NOT switch is HIGH (1). If rain
falls on the moisture sensor then
its output becomes HIGH (1). The
AND gate receives two HIGH
inputs, so the alarm is switched
on.
Moisture 1
sensor 1 Alarm

38
Minterm and Maxterm

Computer Science & Information Technology Department


39
Sir Syed University of Engg. & Tech.
Minterm and Maxterm

Computer Science & Information Technology Department


40
Sir Syed University of Engg. & Tech.

You might also like