boolean algebra & logic gates · 2018. 10. 4. · basic logic gates •we have defined three...
TRANSCRIPT
![Page 1: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/1.jpg)
Boolean Algebra & Logic Gates
By : Ali Mustafa
![Page 2: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/2.jpg)
Digital Logic Gates
• There are three fundamental logical operations, from which all other functions, no matter how complex, can be derived. These Basic functions are named:
–AND
–OR
–NOT (INVERTER)
![Page 3: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/3.jpg)
AND Gate
• Represented by any of the following notations:
– X AND Y
– X . Y
– X Y
• Function definition:
Z = 1 only if X=Y=1
0 otherwise
![Page 4: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/4.jpg)
OR Gate • Represented by any of the following
notations:
– X OR Y
– X + Y
• Function definition:
Z = 1 if X=1 or Y =1 or both X=Y=1
0 if X=Y=0
![Page 5: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/5.jpg)
NOT (Inverter) Gate
• Represented by a bar over the variable
• Function definition:
It is also called complement operation , as it changes 1’s to 0’s and 0’s to 1’s.
![Page 6: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/6.jpg)
Logic gates timing Diagram• Timing diagrams illustrate the response of any gate to all
possible input signal combinations.
• The horizontal axis of the timing diagram represents time and the vertical axis represents the signal as it changes between the two possible voltage levels 1 or 0
![Page 7: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/7.jpg)
Other Gates
![Page 8: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/8.jpg)
Others Gates
![Page 9: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/9.jpg)
Digital Logic
• How to describe Digital logic system?
We have two methods: • Truth Table • Boolean Expression
![Page 10: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/10.jpg)
TRUTH TABLE • A Truth Table is a table of combinations of the binary variables
showing the relationship between the different values that the input variables take and the result of the operation (output).
• The number of rows in the Truth Table is where n = number of input variables in the function.
• The binary combinations are obtained from the binary number by counting from 0 to
• Example: AND gate with 2 inputs
– n=2
– The truth table has 2 rows = 4
– The binary combinations is from
0 to (22-1=(3)) [00,01,10,11]
![Page 11: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/11.jpg)
BOOLEAN EXPRESSIONS
• We can use these basic operations to form more complex expressions:
• Some terminology and notation:– f is the name of the function.
– (x,y,z) are the input variables, each representing 1 or 0. Listing the inputs is optional, but sometimes helpful.
– A literalis any occurrence of an input variable or its complement. The function above has four literals: x, y’, z, and x’.
![Page 12: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/12.jpg)
How to get the Boolean Expression from the truth table?
![Page 13: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/13.jpg)
Boolean Expressions From Truth Tables
• Each 1 in the output of a truth table specifies one term in the corresponding booleanexpression.
![Page 14: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/14.jpg)
Example
• Find boolean expression?
![Page 15: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/15.jpg)
Example Solution
![Page 16: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/16.jpg)
Basic Logic gates
• We have defined three basic logic gates and operators
• Also, we could build any digital circuit from those basic logic gates.
• In digital Logic, we are not using normal mathematics we are using Boolean algebra
So, we need to know the laws & rules of Boolean Algebra
![Page 17: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/17.jpg)
Boolean Algebra
• What’s the difference between the Boolean Algebra and arithmetic algebra?
The First obvious difference that in Boolean algebra we have only (+) and (.) operators we don’t have subtraction(-) or division(/) like math.
![Page 18: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/18.jpg)
Binary Logic
• You should distinguish between binary logic and binary arithmetic.
– Arithmetic variables are numbers that consist of many digits.
Arithmetic
• A binary logic variable is always either 1 or 0.
Binary
![Page 19: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/19.jpg)
Laws & Rules of Boolean Algebra
• The basic laws of Boolean algebra:
–The commutative law
–The associative law
–The distributive law
![Page 20: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/20.jpg)
Commutative Law
• The commutative law of addition for two variables is written as: A+B = B+A
• The commutative law of multiplication for two variables is written as: AB = BA
![Page 21: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/21.jpg)
Associative Law
• The associative law of addition for 3 variables is written as: A+(B+C) = (A+B)+C
• The associative law of multiplication for 3 variables is written as: A(BC) = (AB)C
![Page 22: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/22.jpg)
Distributive Law • The distributive law for multiplication as
follows: A(B+C) = AB + AC
• The distributive law for addition is as follows A+(B.C) = (A+B)(A+C)
![Page 23: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/23.jpg)
Basic Theorems of Boolean Algebra
![Page 24: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/24.jpg)
Basic Theorems of Boolean Algebra
OR Laws AND Laws
Inversion Law
![Page 25: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/25.jpg)
Theorem 1(a)
Proof X + X = XSolution
X + X = (X + X ) . 1 X.1=1
=(X + X)(X + X’) X + X’=1
=X + XX’ Dist X + YZ= (X+Y)(X+Z)
=X + 0 X.X’=0
=X
![Page 26: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/26.jpg)
Theorem 1(b)
Prove X.X = XSolution:
X.X = XX + 0 X + 0 =X
=XX + XX’ XX’= 0
=X(X + X’)
=X(1) X + X’ =1
=X
![Page 27: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/27.jpg)
Self Tasks (Theorems)
– X + 1 = 1
– X.0 = 0
– X + XY= X
![Page 28: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/28.jpg)
Duality Principle • A Boolean equation remains valid if we take
the dual of the expressions on both sides of the equals sign
• Dual of expression it means,
– Interchange 1’s with 0’s (and Vice-versa)
– Interchange AND (.) with OR (+) (and Vice-versa)
![Page 29: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/29.jpg)
DeMorgan’s Law Theorem 1: NAND = Bubbled OR Complement of product is equal to addition of the compliments.
Theorem 2: NOR = Bubbled AND Complement of sum is equal to product of the compliments.
![Page 30: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/30.jpg)
Truth Tables for DeMorgan’s
![Page 31: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/31.jpg)
Example• Get the logic function from the following truth table
and implement it using basic logic gates (AND, OR, NOT)
![Page 32: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/32.jpg)
Simplification of the logic function
• A´B´ + A´B + AB´
Solution:
A´(B´ + B) + AB´
A’(1) + AB´
(A’ + A)(A’ + B’) Hint A+AB Dist
1 (A’ + B’)
(AB)’ DeMorgan Law(1 NAND Gate only)
From 7 gates using simplification rule can be optimized to 1 gate
![Page 33: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/33.jpg)
Home Task: Simplify the following Expressions
• Find the dual of the following expressions
1. A + AB = A
2. A + A’B = A + B
3. A + A’ = 1
4. (A + B)(A + C) = A + BC
![Page 34: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/34.jpg)
Home Task: Simplify the following Expressions
• Prove the following binary expressions ( Using
Postulates)
1. A + AB = A
2. (A + B)(A + C) = A + BC
3. (A + B’ + AB)(A + B’)(A’B) = 0
4. AB + ABC + AB’ = A
5. AB’ + A’B + A’B’
![Page 35: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/35.jpg)
Fewer Gates
XZYX F
![Page 36: Boolean Algebra & Logic Gates · 2018. 10. 4. · Basic Logic gates •We have defined three basic logic gates and operators •Also, we could build any digital circuit from those](https://reader033.vdocuments.mx/reader033/viewer/2022051912/60033dca6493f52e1a09af79/html5/thumbnails/36.jpg)
Algebraic Manipulation
XZZYX YZ X F