Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boolean Algebra & Logic Circuits

Similar presentations


Presentation on theme: "Boolean Algebra & Logic Circuits"— Presentation transcript:

1 Boolean Algebra & Logic Circuits
Management Information Systems (MIS) K.S. School of Business Management Samit Tibrewala

2 The premise of Boolean Algebra
Binary Definition

3 Boolean Algebra to Logic Gates
Logic circuits are built from components called logic gates. The logic gates correspond to Boolean operations + , * , ’ OR + AND * NOT

4 AND A Logic Gate: A*B Truth Table: B A B A*B 1 A B Series Circuit: A*B

5 OR A Logic Gate: A+B Truth Table: B A B A+B 1 A Parallel Circuit: B
1 A Parallel Circuit: B A+B

6 NOT Logic Gate: A A’ Truth Table: a A 1 Single-throw Double-pole
(also called an inverter) A A’ Truth Table: a A 1 Single-throw Double-pole Switch: A A’

7 N-Input Gates Because + and * are binary operations, they can be cascaded together to OR or AND multiple inputs. A A B A+B+C ABC B C A A B A+B+C ABC B C C

8 Binary Digits – With Input Gates
It is sometimes useful to think of the logic gates processing n-bits at a time. 110001 001110

9 Logic Circuits and Boolean Expressions
All logic circuits are equivalent to Boolean expressions and any boolean expression can be rendered as a logic circuit. A y=aB+Bc abc B C A B C y aBc y Ab y=abc+aBc+Ab

10 Let’s practice… x+y (x+y)y y
What is the output of the following circuit? x+y (x+y)y y

11 Some more practice… x x y x y y
Find the output of the following circuit: x x y x y y

12 The other way round ! x+y x x+y
Prepare a circuit diagram for the following: __ x+y x x+y

13 The other way round ! (x+y)x x+y (x+y)x x+y
Prepare a circuit diagram for the following: ______ (x+y)x x+y (x+y)x x+y

14 Truth Tables A mathematical table used in logic.
Combines all possible values of logical variables as input, applies the function and generates and output. Number of combinations = 2n (n = # of variables)

15 Truth Tables – Hungry / Thirsty Problem

16 Some more gates NAND: “If either A or B is NOT true, then Q is true”

17 Some more gates NOR: “If either A or B is true, then Q is false”

18 Some more gates XOR: “If only one of A or B is true, then Q is true”
A ⊕ B

19 Some more gates XNOR: “If both A and B are either true or false, then Q is true” X ʘ Y

20 Universality of NAND gates

21 Universality of NOR gates

22 Primary Laws of Boolean Algebra
Commutative Laws Associative Laws Distributive Laws

23 Commutative Laws

24 Associative Laws

25 Distributive Laws

26 Distributive Laws – Truth Table
C B+C A(B+C) AB AC AB+AC 1

27 DeMorgan’s Laws Very useful in digital circuit design.
It allows ANDs to be exchanged by ORs by using inverters. This theorem can be extended to ANY number of variables.

28 DeMorgan’s Theorem – Truth Table
X Y X.Y (X.Y)' X' Y' X' + Y' 1

29 DeMorgan’s Laws – n Variables
We can extend DeMorgan’s laws to 3 variables by applying the laws for two variables. (X + Y + Z ) = (X + (Y + Z )) - by associative law = X ×(Y + Z ) - by DeMorgan’s law = X ×(Y ×Z ) - by DeMorgan’s law = X ×Y ×Z  - by associative law (X×Y×Z) = (X×(Y×Z )) by associative law = X  + (Y×Z ) by DeMorgan’s law = X  + (Y  + Z ) - by DeMorgan’s law = X  + Y  + Z  - by associative law Generalization to n variables. (X1 + X2 + × × × + Xn) = X 1×X 2 × × × X n (X1×X2 × × × Xn) = X 1 + X 2 + × × × + X n

30 The Duality Principle The dual of a Boolean expression is obtained by interchanging all ANDs and ORs, and all 0s and 1s. Example: The dual of A+(B×C )+0 is A×(B+C )×1 The duality principle states that if E1 and E2 are Boolean expressions then E1= E2  dual (E1)=dual (E2) where dual(E) is the dual of E. For example, A+(B×C )+0 = (B ×C )+D  A×(B+C )×1 = (B +C )×D

31 The Consensus Theorem Theorem. XY + X Z +YZ = XY + X Z Proof. XY + X Z +YZ = XY + X Z + YZ(X + X ) = XY + X Z + XYZ + X YZ = XY + XYZ + X Z + X YZ = XY(1 + Z ) + X Z(1 + Y ) = XY + X Z Example. (A + B )(A + C ) = AA + AC + AB + BC = AC + AB + BC = AC + AB Dual. (X + Y )(X  + Z )(Y + Z ) = (X + Y )(X  + Z )

32 Complement of a Function
Method 1. Apply DeMorgan’s Theorem repeatedly. (X(Y Z  + YZ )) = X  + (Y Z  + YZ ) = X  + (Y Z )(YZ ) = X  + (Y + Z )(Y  + Z ) Method 2. Complement literals and take dual (X (Y Z  + YZ ))= dual (X (YZ + Y Z ))

33 Thank You Questions?


Download ppt "Boolean Algebra & Logic Circuits"

Similar presentations


Ads by Google