1 of 43

Chapter#2

BINARY LOGIC AND BOOLEAN ALGEBRA

2 of 43

INTRODUCTION

  • Logic gates are the basic building blocks of any digital circuit.
  • Logic Circuits are made up of various logic gates.
  • Logic Levels: There are two logic levels-0 & 1.

  • Logic Systems: Positive logic system & Negative Logic System.

Device

Logic 0

Logic 1

Switch

Off

On

Lamp

Off

On

Door

Open

Close

Level

Low

High

3 of 43

Types of Logic Gates

4 of 43

NOT GATE

  • A NOT gate accepts one input signal (0 or 1) and returns the opposite signal as output.
  • It is also known as inverter.

5 of 43

AND GATE

  • The output of AND gate is high (‘1’) if all of its inputs are high (‘1’).
  • The output of AND gate is low (‘0’) if any one of its inputs is low (‘0’).

6 of 43

OR GATE

  • The output of OR gate is high (‘1’) if any one of its inputs is high (‘1’).
  • The output of OR gate is low (‘0’) if all of its inputs are low (‘0’).

7 of 43

NAND GATE

  • The NAND gate accepts two input signals.

If both are 1, the output is 0; otherwise, the output is 1

8 of 43

NOR GATE

  • The NOR gate accepts two input signals
    • If both are 0, the output is 1; otherwise, the output is 0

9 of 43

EX-OR or XOR GATE

  • An XOR gate accepts two input signals

If both are the same, the output is 0; otherwise, the output is 1.

  • Note the difference between the XOR gate and the OR gate; they differ only in one input situation
  • When both input signals are 1, the OR gate produces a 1 and the XOR produces a 0.
  • XOR is called the exclusive OR

10 of 43

EX-NOR or X-NOR GATE

  • It is a combination of XOR gate followed by and inverter.
  • Its output is “1” if inputs are same and “0” if inputs are different.

11 of 43

SUMMARY OF LOGIC GATES

12 of 43

BUBBLED GATE

  • When input to a gate is given through inverter, the symbol can be made simpler by drawing a small circle at the input.
  • When a bubble is shown at the input, it is understood that the input to the gate goes through inverter.

Input through inverter Bubbled OR gate

13 of 43

NAND AS UNIVERSAL GATE

  • All other gates can be realized using NAND gates.

14 of 43

NAND AS UNIVERSAL GATE

15 of 43

NAND AS UNIVERSAL GATE

16 of 43

NAND AS UNIVERSAL GATE

17 of 43

NOR AS UNIVERSAL GATE

18 of 43

NOR AS UNIVERSAL GATE

19 of 43

NOR AS UNIVERSAL GATE

20 of 43

NOR AS UNIVERSAL GATE

21 of 43

APPLICATIONS OF LOGIC GATES

  • Digital clock
  • Digital instruments
  • In process control equipments
  • Microprocessor
  • Microcomputer
  • Calculator
  • Cell Phone
  • Commercial equipments
  • Integrated Circuits

22 of 43

BOOLEAN ALGEBRA

  • English Mathematician George Boole invented symbolic logic in 1854, which is known as Boolean Algebra.
  • Logic problems were solved with the help of this algebra.
  • BOOLEAN LOGIC OPERATIONS
    • Logical AND
    • Logical OR
    • Logical NOT

23 of 43

LAWS OF BOOLEAN ALGEBRA

  1. (a) A+0=A (b) A.1=A
  2. (a) A+1=1 (b) A.0=0
  3. (a) A+A=A (b) A.A=A
  4. (a) A+A′=1 (b) A.A′=0
  5. A′′=A

24 of 43

PROPERTIES OF BOOLEAN ALGEBRA

  1. COMMUTATIVE PROPERTY: If the sequence of variable is changed, there is no change in result.

(1) A+B=B+A OR is commutative

(2) A.B=B.A AND is commutative

2. ASSOCIATIVE PROPERTY: If variables are grouped in different ways there is no change in the result.

(1) A+(B+C)=(A+B)+C OR is associative

(2) A.(B.C)=(A.B).C AND is associative

3. DISTRIBUTIVE PROPERTY:

(I) A+BC=(A+B)(A+C) (2) A.(B+C)=AB+AC

Proof: LHS= A+BC

= A.1+BC

= A(1+B)+BC (⸪ 1+B=1)

= A.1+AB+BC

= A.(1+C)+AB+BC (⸪ 1+C=1)

= A.1+AC+AB+BC

= A.A+AC+AB+BC (⸪ A.A=A)

= A(A+C)+B(A+C)

= (A+B)(A+C)

=RHS

25 of 43

PROPERTIES OF BOOLEAN ALGEBRA

4. ABSORPTION PROPERTY:

(I) A+AB=A

Proof: LHS= A+AB

= A(1+B)

= A(1)

= A

=RHS

(2) A.(A+B)=A

Proof: LHS= A.(A+B)

= A.A+AB

= A+AB

= A(1+B)

= A.1

=A

= RHS

26 of 43

PROPERTIES OF BOOLEAN ALGEBRA

(3) A+A′B=A+B

Proof: LHS= A+A′B

= (A+A′)(A+B) (⸪ A+BC=(A+B)(A+C))

= 1(A+B) (⸪ A+A′=1)

= (A+B)

=RHS

(4) A(A′+B)=AB

Proof: LHS= A(A′+B)

= A. A′+AB

= 0+AB (⸪ A. A′=0)

=AB

=RHS

27 of 43

PROPERTIES OF BOOLEAN ALGEBRA

5. CONSENSUS PROPERTY:

(1) AB+A′C+BC=AB+ A′C

(2) (A+B)(A′+C)(B+C)=(A+B)(A′+C)

28 of 43

EXAMPLES OF BOOLEAN ALGEBRA

29 of 43

EXAMPLES OF BOOLEAN ALGEBRA

30 of 43

EXAMPLES OF BOOLEAN ALGEBRA

31 of 43

DE MORGAN’S THEOREMS

  • There are two theorems
  • THEOREM 1:

Complement of sum is equal to the product of the complements i.e

Left hand side is the complement of the sum. On the right hand side there is product instead the sum and each term is the complement of the variable.

32 of 43

DE MORGAN’S THEOREMS

33 of 43

DE MORGAN’S THEOREMS

  • THEOREM 2:

Complement of the product is the sum of the complements i.e

Left hand side is the complement of the product of the variables A & B. On the right hand side there is sum of the complements of variables A and B.

34 of 43

DE MORGAN’S THEOREMS

35 of 43

DE MORGAN’S THEOREMS

36 of 43

DRAWING LOGIC CIRCUIT FROM BOOLEAN EXPRESSION (Q=A.B+B.C(B+C))

🡪 Our first step in simplification must be to write a Boolean expression for this circuit.

🡪This task is easily performed step by step if we start by writing sub-expressions at the output of each gate, corresponding to the respective input signals for each gate.

🡪 Remember that OR gates are equivalent to Boolean addition, while AND gates are equivalent to Boolean multiplication.

For example, I’ll write sub-expressions at the outputs of the first three gates:

37 of 43

DRAWING LOGIC CIRCUIT FROM BOOLEAN EXPRESSION (Q=A.B+B.C(B+C))

then another sub-expression for the next gate:

38 of 43

DRAWING LOGIC CIRCUIT FROM BOOLEAN EXPRESSION

Finally, the output (“Q”) is seen to be equal to the expression AB + BC(B + C):

39 of 43

DRAWING LOGIC CIRCUIT FROM BOOLEAN EXPRESSION (REDUCING EXPRESSION)

40 of 43

DRAWING LOGIC CIRCUIT FROM BOOLEAN EXPRESSION (REDUCING EXPRESSION)

41 of 43

DRAWING LOGIC CIRCUIT FROM BOOLEAN EXPRESSION (REDUCING EXPRESSION)

42 of 43

DRAWING LOGIC CIRCUIT FROM BOOLEAN EXPRESSION (MORE EXAMPLES)

43 of 43

DRAWING LOGIC CIRCUIT FROM BOOLEAN EXPRESSION (MORE EXAMPLES)