SlideShare a Scribd company logo
1
Chapter 3
Boolean Algebra and
Logic Gate
2
Topics
3.1) Basic Operations of Boolean Algebra
3.2) Relationship between basic operation
of Boolean and basic logic gate
3.3) Basic Theorems of Boolean Algebra
3.4) Relationship between Boolean
Function and Logic Circuit
3
3.5) Truth Table
3.6) Karnaugh Map
3.7) Example of Digital Problem
3.8) Create a Logic Circuit Using Only
NAND Gates or NOR Gates
4
3.1) Basic Operations of Boolean Algebra
• Boolean Algebra was introduced by George Boole
in the year 1854.
• Like other algebras, it uses variables (called
statements) and operations (called relations).
• Variables in Boolean algebra is called logic
variable that only has 2 possible values, either true
(1) or false (0) whereas its operation is called
logical operations.
5
• There are 3 basic logical operations, i.e. AND (.),
OR (+) and NOT ( ).
• These operations are used to combine operands
(logical constants and variables) to form logical
expressions.
• The following are a few logical expressions with
X, Y and Z as the logical variables that can only
have the value of FALSE (or 0) or TRUE (or 1).
X = NOT X
X.Y + Z = NOT( X AND Y) OR Z
6
• Other than the basic logical operations of AND,
OR and NOT, there are multiple of other logical
operations, among them are NAND, NOR and
XOR that are widely used in building logical
circuits in computers.
• These logical operations are combination of a
few of the basic logical operations, e.g. :
NAND is a combination of AND followed by NOT
NOR is a combination of OR followed by NOT
7
The following is a truth table for the logical operations
of AND, OR, NOT, NAND, NOR and XOR.
P Q NOT P P AND Q P OR
Q
P XOR
Q
P NAND
Q
P NOR
Q
0 0 1 0 0 0 1 1
0 1 1 0 1 1 1 0
1 0 0 0 1 1 1 0
1 1 0 1 1 0 0 0
CONSIDER XAND – eXclusive AND whereby a positive output is only achieved if
both inputs are equal.
XAND
XAND- eXclusive AND whereby a positive output is only achieved if
both inputs are equal.
8
9
Summary
1. AND (symbol: .)
☞The AND operation only gives the TRUE (or value
1 in binary) result if and only if the value of all the
variables are TRUE
2. OR (symbol : +)
☞The OR operation only gives the TRUE result if the
value of one or all of the variables is/are TRUE.
3. NOT (symbol : )
☞The NOT operation will change the value of the
operand, i.e. TRUE to FALSE and vice-versa
10
4. NAND
☞ The NAND operation only gives the TRUE result
if one or both of the operands are FALSE
5. NOR
☞ The NOR operation only gives the TRUE result if
and only if both operands are FALSE
6. XOR
☞ The XOR operation only gives the TRUE result if
and only if only one of the operands is TRUE
11
3.2) Relationship Between Basic Operation
of Boolean and Basic Logic Gate
• The basic construction of a logical circuit is gates.
• The logical functions are presented through the
combination of gates.
• Gate is an electronic circuit that emits an output
signal as a result of a simple Boolean operation on
its inputs.
• The basic gates that used in a digital logic is the
same as the basic Boolean Algebra operations
such AND, OR, NOT, NAND and NOR.
12
• Table below shows the symbols, Boolean algebra
and the truth table for the gates
A B F
0 0 0
0 1 0
1 0 0
1 1 1
A B F
0 0 0
0 1 1
1 0 1
1 1 1
A B F
0 0 0
0 1 1
1 0 1
1 1 1
A B F
0 0 0
0 1 0
1 0 0
1 1 1
F
F
F
F
Name Graphic Symbol Boolean Algebra Truth Table
A
B
A
B
A
B
A
B
A F
AND
OR
NOT
NAND
NOR
F = A . B
Or
F = AB
F = A + B
_____
F = A + B
____
F = A . B
Or
F = AB
_
F = A
B F
0 1
1 0
13
3.3) Basic Theorems of Boolean Algebra
1. Identity Elements 2. Inverse Elements
1 . A = A A . A = 0
0 + A = A A + A = 1
3. Idempotent Laws 4. Boundess Laws
A + A = A A + 1 = 1
A . A = A A . 0 = 0
5. Distributive Laws 6. Order Exchange Laws
A . (B + C) = A.B + A.C A . B = B . A
A + (B . C) = (A+B) . (A+C) A + B = B + A
14
7. Absorption Laws 8. Associative Laws
A + (A . B) = A A + (B + C) = (A + B) + C
A . (A + B) = A A . (B . C) = (A . B) . C
9. Elimination Laws 10. De Morgan Theorem
_ ______ _ _
A + (A . B) = A + B (A + B) = A . B
_ _____ _ _
A . (A + B) = A . B (A . B) = A + B
15
• All the theorems and laws can be proven by
substituting the value of 0 or 1 for each
variables A, B and C based on the Truth
Table for each logical operation given.
• These theorems and laws are extremely
important in the computer environment
because it is used to simplify logical
expressions that are produced when
designing the logical circuit of the computer
16
3.5) Relationship Between Boolean Function
and Logic Circuit
• Any Boolean function can be implemented
in electronic form as a network of gates
called logic circuit.
• The following are examples of Boolean
functions and their logic circuit.
17
1) F = A . B + C + D
A
B
C
D
F
A . B
C + D
18
2) G = A . (B + C + D)
A
B
C
D
G
19
3.5) Truth Table
⇨A truth table displays the relationship between
the truth values of propositions.
⇨Eg: Construct a truth table for a Boolean
function, X = A + B . C
20
A B C A+B A+B A+B . C
0 0 0 0 1 0
0 0 1 0 1 1
0 1 0 1 0 0
0 1 1 1 0 0
1 0 0 1 0 0
1 0 1 1 0 0
1 1 0 1 0 0
1 1 1 1 0 0
21
X Y X + Y X + Y X . Y
0 0 0 1 1
0 1 1 0 0
1 0 1 0 0
1 1 1 0 0
Logically equivalent : X + Y = X . Y
Logical Equivalence:
⇨ Two logic expressions are called logically
equivalent if and only if, they have identical values for
each of the statements variables.
22
3.6) Karnaugh Map
⇒ A graphical way of depicting the content of a truth
table where the adjacent squares differ by only one
variable.
⇒ For the purposes simplification, the Karnaugh map
is a convenient way of representing a Boolean
function of a small number (up to four) of
variables.
⇒ The map is an array of 2n squares, representing all
possible combination of values of n binary
variables.
23
⇒ Example: Karnaugh Map with 2
variables, A and B
00 01
10 11
A
B
0
0
1
1
_ _
A B
_
A B
_
A B A B
B _
B B
_
A
A
A
24
A B F
0 0
0 1
1 0
1 1
00 01
10 11
B
A 0 1
0
1
TRUTH
TABLE
input output
Relationship between Truth Table and Karnaugh Map
KARNAUGH MAP
25
The number of squares in Karnaugh map depends
on the number of variables:
⇨ if n variables, there are 2n squares in the
Karnaugh Map
Example : i) 2 Variables
2² = 4 squares in the Karnaugh Map
ii) 3 Variables
2³ = 8 squares in the Karnaugh Map
26
The arrangement of squares in the Karnaugh
map is free as long as the adjacent squares
that are next to each other only differ by one
variable.
BC BC
000 001 011 010
100 101 111 110
000 001 010 011
100 101 110 111
A
_ _
B C
_
B C B C
_
B C
_
A
A
00 01 10 11
0
1
A
Cannot!
27
001 001
010 011
110 111
100 101
_ _
A B
_
A B
A B
_
A B
AB
C _
C C
000 010 110 100
001 011 111 101
C
_ _ _ _
A B A B A B A B
AB
Example:
a) 3 variables
_
C
C
28
0000 0001 0011 0010
0100 0101 0111 0110
1100 1101 1111 1110
1000 1001 1011 1010
00
01
11
10
00 01 11 10
AB
CD
or others as long as the value of
adjacent squares differ by only 1
variable.
b) 4 variables
29
Getting an expression from a Karnaugh map
Example : Given the following Truth Table with 3 inputs (A, B
and C) and 1 output (F).
A B C
0 0 0
0 0 1
0 1 0 0
0 1 1
1 0 0
1 0 1
1 1 0 0
1 1 1 0
F
1
0
1
1
1
Only 4
combinations of
input that give
output, F = 1
30
Step 1:
⇒ Make a Karnaugh Map with 3 variables.
Step 2:
⇒ For each output F = 1, write 1 in the square that has the same
combination of input as in the truth table.
1
1 1
1
00
1
1
0
0
00
01
01
11
11 10
10
BC
BC
A
A
31
Step 3:
⇒ group the adjacent squares with the following steps :
i) If a Karnaugh map has n variables, begin grouping
with 2 n-1
ii) If there are no 2 n-1 adjacent squares (which the
value is 1), proceed with 2 n-2 squares until 2 n-n
OR until no squares which the value is 1 are not grouped
2n-1 = 23-1 = 22 = 4
2n-2 = 23-2 = 21 = 2 For n = 3
2n-3 = 23-3 = 20 = 1
32
1
A
BC
⇨only insert output which value is
equal to 1 to the appropriate squares
A B C
00 01 11 10
0
1
1
1 1
B C A B
Answer : F = B C + A B + A B C
33
A
BC
3 variables => n = 3
00 01 11 10
0
1
1
1 1
1
Explaination:
⇨ begin grouping with 23-1 = 4 adjacent squares. (none in the above Karnaugh
map)
⇨ proceed with 23-2 = 2 adjacent squares (there are 2 in the above Karnaugh
map)
⇨ if there are still squares with value 1 that are not grouped yet, proceed with
2 3-3 = 1 square (there is one in the above Karnaugh map)
⇨ get the expression from each group of squares.
34
SUMMARY (3 variables) n = 3
_ _ _ _
B C B C B C B C
_
A
A
A
BC
_
A
A
( 1) 4 adjacent squares
_
C
_
B B
C
35
_ _ _ _
B C B C B C B C
_
A
A
_
A C
A
C
_ _
A B
_
A B
_
A B
A B
A
BC
(2) 2 adjacent squares
36
A
BC
A
BC
1
1 1 1
1
0
1
00 01 11 10
1
1 1 1 1
00 01 11 10
0
1
_
C
AB
_
F = C + AB
A
_
B C
_
F = A + B C
Other examples
37
_ _ _ _ _ _
F = C D + B D + AB C
_
F = B + C
1
1
1
1 1 1
1
_ _ _ _
CD CD CD CD
CD
AB
_ _
AB
_
AB
AB
_
AB
00 01 11 10
0
1
BC
A
1
1
1
1
1
1
_
C
B
38
3.7) Example of Digital Problem
⇨ To design a logic circuit of an Alarm
System at the office (with one door and one
window) that will be rang if the door or
window is/are opened after working hours.
⇨ The followings are steps that are to be
taken to design a logic circuit.
39
1. Problem Determination
Determine the problem that has to be solved
⇨ to design a logic circuit for an alarm system
that will trigger the emergency bell if door or
window is/are opened outside office hours.
2. Conceptualization
Obtain the relevant logical variables and make a
logical table and also a truth table. Obtain the
logical expression from the truth table
40
• The related variables are :
Time T = 0 (work time) T = 1 (not work time)
Doors D = 0 (closed) D = 1 (opened)
Windows W = 0 (closed) W = 1 (opened)
• Whether Bell B will ring (1) or will not ring (0)
depends on all three logical variables (depending
on the condition or problem given)
41
Logic Table
INPUT OUTPUT
Time Door Window Bell
Work closed closed Doesn’t ring
Work closed opened Doesn’t ring
Work opened closed Doesn’t ring
Work opened opened Doesn’t ring
Not Work closed closed Doesn’t ring
Not Work closed opened Will Ring
Not Work opened closed Will Ring
Not Work opened opened Will Ring
42
Truth Table
(based on logical table above)
INPUTS OUTPUT
T D W B
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
43
• B is the output or the function that we have to
find. The B function or expression can be obtained
through many methods based on the truth table.
One of the methods is by using a Karnaugh map.
• Below is the Karnaugh Map for the Truth Table
above
1 1 1
00 01 11 10
0
1
WD
T
TD TW
From the Karnaugh
Map above,
B = TW + TD
44
3. Solution or summary
• The expression B above can be further
summarized using theorem or the laws in Boolean
algebra
B = TW + TD
= T(W + D) (from the Law of Distribution)
4. Execution
• From the expression obtained, the following is the
logic circuit for B.
45
D
W
T
(W + D)
T(W + D)
46
3.8) Building logical circuits using only
NAND or only NOR gates
• Most components in computers are built using
only type of gate either the NAND or the NOR
gates. This can further simplify the construction of
such circuits (i.e. do not need to use various gates
in a logic circuit)
• To build a circuit that only uses NAND or NOR
gates, firstly the expression for the circuit has to
be changed into an expression that only has either
the NAND or NOR operations only. To change it,
the De Morgan and Involution theorems are used.
47
The Involution theorem is as follow:
Example:
Using the logic expression in section 6.7 , B = T(W + D),
draw a logic circuit by using:
1. Only NAND gates
2. Only NOR gates
A = A
=
48
B = T.(W + D)
= T.(W + D) Involution Theorem
= T. (W . D) De Morgan theorem
= T. (W . D) Involution Theorem
1. Using only the NAND gate
To get an expression that only uses the NAND operations,
eliminate the OR operation in the expression by using the
Involution theorem and De Morgan theorem.
( W+D = W . D )
( W+D = W+D )
49
T
W
D
Hence, the logic circuit for B that use only the NAND gates
can be drawn as follow:
50
2. Using only the NOR gate
To get an expression that only uses the NOR
operations, eliminate the AND operation in the
expression by using the Involution theorem and
the De Morgan Theorem.
B = T.(W + D)
= T . (W + D) Involution Theorem
= T + (W + D) De Morgan theorem
( T.(W+D) = T.(W+D) )
51
• The expression no longer has the AND operation
and all the OR operation has the complement sign
or NOT symbol (or the NOR operation). Hence,
the logic circuit for B that only uses the NOR
gates can be drawn as follow:
T
W
D

More Related Content

Similar to Chapter 3_Boolean Algebra _ Logic Gate (3).pptx

Unit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptxUnit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Kartikkalaspurkar1
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
EasyStudy3
 
UNIT-1_CSA.pdf
UNIT-1_CSA.pdfUNIT-1_CSA.pdf
UNIT-1_CSA.pdf
ShabbeerBasha8
 
Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)
MeghaSharma513
 
booleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).pptbooleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).ppt
michaelaaron25322
 
3,EEng k-map.pdf
3,EEng k-map.pdf3,EEng k-map.pdf
3,EEng k-map.pdf
DamotTesfaye
 
Digital Logic
Digital LogicDigital Logic
Digital Logic
Dilum Bandara
 
Chapter-3.ppt
Chapter-3.pptChapter-3.ppt
Chapter-3.ppt
TANJILURRAHMAN190901
 
4 logic circuit optimisation
4 logic circuit optimisation4 logic circuit optimisation
4 logic circuit optimisation
chandkec
 
Boolean algebra1
Boolean algebra1Boolean algebra1
Boolean algebra1
Prof. Dr. K. Adisesha
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
arunachalamr16
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
Sayan Chakraborty
 
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdfLec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
abdnazar2003
 
Modern+digital+electronics rp+jain
Modern+digital+electronics rp+jainModern+digital+electronics rp+jain
Modern+digital+electronics rp+jain
Venugopala Rao P
 
boolean algebra and logic simplification
boolean algebra and logic simplificationboolean algebra and logic simplification
boolean algebra and logic simplification
Unsa Shakir
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
RithinA1
 
UNIT1-part2.pptx
UNIT1-part2.pptxUNIT1-part2.pptx
UNIT1-part2.pptx
AshokRachapalli1
 
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
siliconvalley6203
 
102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt
SATHYARAJECE
 
EE8351 DLC
EE8351 DLCEE8351 DLC
EE8351 DLC
rmkceteee
 

Similar to Chapter 3_Boolean Algebra _ Logic Gate (3).pptx (20)

Unit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptxUnit_2_Boolean_algebra_and_Karnaugh_maps.pptx
Unit_2_Boolean_algebra_and_Karnaugh_maps.pptx
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
UNIT-1_CSA.pdf
UNIT-1_CSA.pdfUNIT-1_CSA.pdf
UNIT-1_CSA.pdf
 
Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)Lect 2 boolean algebra (4 5-21)
Lect 2 boolean algebra (4 5-21)
 
booleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).pptbooleanalgebra-140914001141-phpapp01 (1).ppt
booleanalgebra-140914001141-phpapp01 (1).ppt
 
3,EEng k-map.pdf
3,EEng k-map.pdf3,EEng k-map.pdf
3,EEng k-map.pdf
 
Digital Logic
Digital LogicDigital Logic
Digital Logic
 
Chapter-3.ppt
Chapter-3.pptChapter-3.ppt
Chapter-3.ppt
 
4 logic circuit optimisation
4 logic circuit optimisation4 logic circuit optimisation
4 logic circuit optimisation
 
Boolean algebra1
Boolean algebra1Boolean algebra1
Boolean algebra1
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
 
Digital 1 8
Digital 1 8Digital 1 8
Digital 1 8
 
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdfLec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
Lec4-Algghhhhgghgjhf5dvbgyuygit87678.pdf
 
Modern+digital+electronics rp+jain
Modern+digital+electronics rp+jainModern+digital+electronics rp+jain
Modern+digital+electronics rp+jain
 
boolean algebra and logic simplification
boolean algebra and logic simplificationboolean algebra and logic simplification
boolean algebra and logic simplification
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
 
UNIT1-part2.pptx
UNIT1-part2.pptxUNIT1-part2.pptx
UNIT1-part2.pptx
 
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
1Boolean Alegebra 3booleanalgebraold-160325120651.pdf
 
102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt
 
EE8351 DLC
EE8351 DLCEE8351 DLC
EE8351 DLC
 

Recently uploaded

Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
jpupo2018
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 

Recently uploaded (20)

Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Project Management Semester Long Project - Acuity
Project Management Semester Long Project - AcuityProject Management Semester Long Project - Acuity
Project Management Semester Long Project - Acuity
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 

Chapter 3_Boolean Algebra _ Logic Gate (3).pptx

  • 2. 2 Topics 3.1) Basic Operations of Boolean Algebra 3.2) Relationship between basic operation of Boolean and basic logic gate 3.3) Basic Theorems of Boolean Algebra 3.4) Relationship between Boolean Function and Logic Circuit
  • 3. 3 3.5) Truth Table 3.6) Karnaugh Map 3.7) Example of Digital Problem 3.8) Create a Logic Circuit Using Only NAND Gates or NOR Gates
  • 4. 4 3.1) Basic Operations of Boolean Algebra • Boolean Algebra was introduced by George Boole in the year 1854. • Like other algebras, it uses variables (called statements) and operations (called relations). • Variables in Boolean algebra is called logic variable that only has 2 possible values, either true (1) or false (0) whereas its operation is called logical operations.
  • 5. 5 • There are 3 basic logical operations, i.e. AND (.), OR (+) and NOT ( ). • These operations are used to combine operands (logical constants and variables) to form logical expressions. • The following are a few logical expressions with X, Y and Z as the logical variables that can only have the value of FALSE (or 0) or TRUE (or 1). X = NOT X X.Y + Z = NOT( X AND Y) OR Z
  • 6. 6 • Other than the basic logical operations of AND, OR and NOT, there are multiple of other logical operations, among them are NAND, NOR and XOR that are widely used in building logical circuits in computers. • These logical operations are combination of a few of the basic logical operations, e.g. : NAND is a combination of AND followed by NOT NOR is a combination of OR followed by NOT
  • 7. 7 The following is a truth table for the logical operations of AND, OR, NOT, NAND, NOR and XOR. P Q NOT P P AND Q P OR Q P XOR Q P NAND Q P NOR Q 0 0 1 0 0 0 1 1 0 1 1 0 1 1 1 0 1 0 0 0 1 1 1 0 1 1 0 1 1 0 0 0 CONSIDER XAND – eXclusive AND whereby a positive output is only achieved if both inputs are equal.
  • 8. XAND XAND- eXclusive AND whereby a positive output is only achieved if both inputs are equal. 8
  • 9. 9 Summary 1. AND (symbol: .) ☞The AND operation only gives the TRUE (or value 1 in binary) result if and only if the value of all the variables are TRUE 2. OR (symbol : +) ☞The OR operation only gives the TRUE result if the value of one or all of the variables is/are TRUE. 3. NOT (symbol : ) ☞The NOT operation will change the value of the operand, i.e. TRUE to FALSE and vice-versa
  • 10. 10 4. NAND ☞ The NAND operation only gives the TRUE result if one or both of the operands are FALSE 5. NOR ☞ The NOR operation only gives the TRUE result if and only if both operands are FALSE 6. XOR ☞ The XOR operation only gives the TRUE result if and only if only one of the operands is TRUE
  • 11. 11 3.2) Relationship Between Basic Operation of Boolean and Basic Logic Gate • The basic construction of a logical circuit is gates. • The logical functions are presented through the combination of gates. • Gate is an electronic circuit that emits an output signal as a result of a simple Boolean operation on its inputs. • The basic gates that used in a digital logic is the same as the basic Boolean Algebra operations such AND, OR, NOT, NAND and NOR.
  • 12. 12 • Table below shows the symbols, Boolean algebra and the truth table for the gates A B F 0 0 0 0 1 0 1 0 0 1 1 1 A B F 0 0 0 0 1 1 1 0 1 1 1 1 A B F 0 0 0 0 1 1 1 0 1 1 1 1 A B F 0 0 0 0 1 0 1 0 0 1 1 1 F F F F Name Graphic Symbol Boolean Algebra Truth Table A B A B A B A B A F AND OR NOT NAND NOR F = A . B Or F = AB F = A + B _____ F = A + B ____ F = A . B Or F = AB _ F = A B F 0 1 1 0
  • 13. 13 3.3) Basic Theorems of Boolean Algebra 1. Identity Elements 2. Inverse Elements 1 . A = A A . A = 0 0 + A = A A + A = 1 3. Idempotent Laws 4. Boundess Laws A + A = A A + 1 = 1 A . A = A A . 0 = 0 5. Distributive Laws 6. Order Exchange Laws A . (B + C) = A.B + A.C A . B = B . A A + (B . C) = (A+B) . (A+C) A + B = B + A
  • 14. 14 7. Absorption Laws 8. Associative Laws A + (A . B) = A A + (B + C) = (A + B) + C A . (A + B) = A A . (B . C) = (A . B) . C 9. Elimination Laws 10. De Morgan Theorem _ ______ _ _ A + (A . B) = A + B (A + B) = A . B _ _____ _ _ A . (A + B) = A . B (A . B) = A + B
  • 15. 15 • All the theorems and laws can be proven by substituting the value of 0 or 1 for each variables A, B and C based on the Truth Table for each logical operation given. • These theorems and laws are extremely important in the computer environment because it is used to simplify logical expressions that are produced when designing the logical circuit of the computer
  • 16. 16 3.5) Relationship Between Boolean Function and Logic Circuit • Any Boolean function can be implemented in electronic form as a network of gates called logic circuit. • The following are examples of Boolean functions and their logic circuit.
  • 17. 17 1) F = A . B + C + D A B C D F A . B C + D
  • 18. 18 2) G = A . (B + C + D) A B C D G
  • 19. 19 3.5) Truth Table ⇨A truth table displays the relationship between the truth values of propositions. ⇨Eg: Construct a truth table for a Boolean function, X = A + B . C
  • 20. 20 A B C A+B A+B A+B . C 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 1 1 0 0
  • 21. 21 X Y X + Y X + Y X . Y 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 1 1 1 0 0 Logically equivalent : X + Y = X . Y Logical Equivalence: ⇨ Two logic expressions are called logically equivalent if and only if, they have identical values for each of the statements variables.
  • 22. 22 3.6) Karnaugh Map ⇒ A graphical way of depicting the content of a truth table where the adjacent squares differ by only one variable. ⇒ For the purposes simplification, the Karnaugh map is a convenient way of representing a Boolean function of a small number (up to four) of variables. ⇒ The map is an array of 2n squares, representing all possible combination of values of n binary variables.
  • 23. 23 ⇒ Example: Karnaugh Map with 2 variables, A and B 00 01 10 11 A B 0 0 1 1 _ _ A B _ A B _ A B A B B _ B B _ A A A
  • 24. 24 A B F 0 0 0 1 1 0 1 1 00 01 10 11 B A 0 1 0 1 TRUTH TABLE input output Relationship between Truth Table and Karnaugh Map KARNAUGH MAP
  • 25. 25 The number of squares in Karnaugh map depends on the number of variables: ⇨ if n variables, there are 2n squares in the Karnaugh Map Example : i) 2 Variables 2² = 4 squares in the Karnaugh Map ii) 3 Variables 2³ = 8 squares in the Karnaugh Map
  • 26. 26 The arrangement of squares in the Karnaugh map is free as long as the adjacent squares that are next to each other only differ by one variable. BC BC 000 001 011 010 100 101 111 110 000 001 010 011 100 101 110 111 A _ _ B C _ B C B C _ B C _ A A 00 01 10 11 0 1 A Cannot!
  • 27. 27 001 001 010 011 110 111 100 101 _ _ A B _ A B A B _ A B AB C _ C C 000 010 110 100 001 011 111 101 C _ _ _ _ A B A B A B A B AB Example: a) 3 variables _ C C
  • 28. 28 0000 0001 0011 0010 0100 0101 0111 0110 1100 1101 1111 1110 1000 1001 1011 1010 00 01 11 10 00 01 11 10 AB CD or others as long as the value of adjacent squares differ by only 1 variable. b) 4 variables
  • 29. 29 Getting an expression from a Karnaugh map Example : Given the following Truth Table with 3 inputs (A, B and C) and 1 output (F). A B C 0 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 1 1 1 0 0 1 1 1 0 F 1 0 1 1 1 Only 4 combinations of input that give output, F = 1
  • 30. 30 Step 1: ⇒ Make a Karnaugh Map with 3 variables. Step 2: ⇒ For each output F = 1, write 1 in the square that has the same combination of input as in the truth table. 1 1 1 1 00 1 1 0 0 00 01 01 11 11 10 10 BC BC A A
  • 31. 31 Step 3: ⇒ group the adjacent squares with the following steps : i) If a Karnaugh map has n variables, begin grouping with 2 n-1 ii) If there are no 2 n-1 adjacent squares (which the value is 1), proceed with 2 n-2 squares until 2 n-n OR until no squares which the value is 1 are not grouped 2n-1 = 23-1 = 22 = 4 2n-2 = 23-2 = 21 = 2 For n = 3 2n-3 = 23-3 = 20 = 1
  • 32. 32 1 A BC ⇨only insert output which value is equal to 1 to the appropriate squares A B C 00 01 11 10 0 1 1 1 1 B C A B Answer : F = B C + A B + A B C
  • 33. 33 A BC 3 variables => n = 3 00 01 11 10 0 1 1 1 1 1 Explaination: ⇨ begin grouping with 23-1 = 4 adjacent squares. (none in the above Karnaugh map) ⇨ proceed with 23-2 = 2 adjacent squares (there are 2 in the above Karnaugh map) ⇨ if there are still squares with value 1 that are not grouped yet, proceed with 2 3-3 = 1 square (there is one in the above Karnaugh map) ⇨ get the expression from each group of squares.
  • 34. 34 SUMMARY (3 variables) n = 3 _ _ _ _ B C B C B C B C _ A A A BC _ A A ( 1) 4 adjacent squares _ C _ B B C
  • 35. 35 _ _ _ _ B C B C B C B C _ A A _ A C A C _ _ A B _ A B _ A B A B A BC (2) 2 adjacent squares
  • 36. 36 A BC A BC 1 1 1 1 1 0 1 00 01 11 10 1 1 1 1 1 00 01 11 10 0 1 _ C AB _ F = C + AB A _ B C _ F = A + B C Other examples
  • 37. 37 _ _ _ _ _ _ F = C D + B D + AB C _ F = B + C 1 1 1 1 1 1 1 _ _ _ _ CD CD CD CD CD AB _ _ AB _ AB AB _ AB 00 01 11 10 0 1 BC A 1 1 1 1 1 1 _ C B
  • 38. 38 3.7) Example of Digital Problem ⇨ To design a logic circuit of an Alarm System at the office (with one door and one window) that will be rang if the door or window is/are opened after working hours. ⇨ The followings are steps that are to be taken to design a logic circuit.
  • 39. 39 1. Problem Determination Determine the problem that has to be solved ⇨ to design a logic circuit for an alarm system that will trigger the emergency bell if door or window is/are opened outside office hours. 2. Conceptualization Obtain the relevant logical variables and make a logical table and also a truth table. Obtain the logical expression from the truth table
  • 40. 40 • The related variables are : Time T = 0 (work time) T = 1 (not work time) Doors D = 0 (closed) D = 1 (opened) Windows W = 0 (closed) W = 1 (opened) • Whether Bell B will ring (1) or will not ring (0) depends on all three logical variables (depending on the condition or problem given)
  • 41. 41 Logic Table INPUT OUTPUT Time Door Window Bell Work closed closed Doesn’t ring Work closed opened Doesn’t ring Work opened closed Doesn’t ring Work opened opened Doesn’t ring Not Work closed closed Doesn’t ring Not Work closed opened Will Ring Not Work opened closed Will Ring Not Work opened opened Will Ring
  • 42. 42 Truth Table (based on logical table above) INPUTS OUTPUT T D W B 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1
  • 43. 43 • B is the output or the function that we have to find. The B function or expression can be obtained through many methods based on the truth table. One of the methods is by using a Karnaugh map. • Below is the Karnaugh Map for the Truth Table above 1 1 1 00 01 11 10 0 1 WD T TD TW From the Karnaugh Map above, B = TW + TD
  • 44. 44 3. Solution or summary • The expression B above can be further summarized using theorem or the laws in Boolean algebra B = TW + TD = T(W + D) (from the Law of Distribution) 4. Execution • From the expression obtained, the following is the logic circuit for B.
  • 46. 46 3.8) Building logical circuits using only NAND or only NOR gates • Most components in computers are built using only type of gate either the NAND or the NOR gates. This can further simplify the construction of such circuits (i.e. do not need to use various gates in a logic circuit) • To build a circuit that only uses NAND or NOR gates, firstly the expression for the circuit has to be changed into an expression that only has either the NAND or NOR operations only. To change it, the De Morgan and Involution theorems are used.
  • 47. 47 The Involution theorem is as follow: Example: Using the logic expression in section 6.7 , B = T(W + D), draw a logic circuit by using: 1. Only NAND gates 2. Only NOR gates A = A =
  • 48. 48 B = T.(W + D) = T.(W + D) Involution Theorem = T. (W . D) De Morgan theorem = T. (W . D) Involution Theorem 1. Using only the NAND gate To get an expression that only uses the NAND operations, eliminate the OR operation in the expression by using the Involution theorem and De Morgan theorem. ( W+D = W . D ) ( W+D = W+D )
  • 49. 49 T W D Hence, the logic circuit for B that use only the NAND gates can be drawn as follow:
  • 50. 50 2. Using only the NOR gate To get an expression that only uses the NOR operations, eliminate the AND operation in the expression by using the Involution theorem and the De Morgan Theorem. B = T.(W + D) = T . (W + D) Involution Theorem = T + (W + D) De Morgan theorem ( T.(W+D) = T.(W+D) )
  • 51. 51 • The expression no longer has the AND operation and all the OR operation has the complement sign or NOT symbol (or the NOR operation). Hence, the logic circuit for B that only uses the NOR gates can be drawn as follow: T W D