This action might not be possible to undo. Are you sure you want to continue?

Dr. M. Najam ul Islam

PhD Electrical Engineering

Lecture 4: Boolean Algebra

2

**Digital Logic • Logic Theory is that branch of mathematics which
**

deals with the truthfulness of a rational statement. Example: • “Switches A & B must be closed to turn ON a lamp” this statement can be tested for its truthfulness as follows: a. Is it necessary to have both the switches closed

b. c.

3

simultaneously for lamp to turn on? Will the lamp turn ON if switch A or switch B is closed? What will happen if both switches are open?

Binary Logic

• Consists of binary (twovalue) variables and logical operations

• Variables are A, B, C, x,

y, z etc.

**• logical operations AND,
**

OR, NOT etc.

4

**Basic Logic Gates
**

• OR Operator

represented by + sign

• AND Operator

represented by . sign

• NOT Operator

represented by '

5

Basic Logic Gates

6

Multiple Input Gates

7

**Secondary Logic Gates (1)
**

• Buffer • NAND

• NOR

8

**Secondary Logic Gates (2)
**

• XOR (Exclusive-OR)

• XNOR (Exclusive-NOR)

9

Exercise (1)

• f = (a b c) ' • g = (a + b + c) '

10

Exercise (2)

• f = (a b) • g = (a b)'

11

Boolean Algebra

**• An algebra that deals with binary
**

variables and logic operations.

**• Developed by George Boole in 1854 • Shannon introduced two-valued Boolean
**

algebra in 1938. • Huntington formulated the formal definition of Boolean algebra through the postulates in 1904.

12

**Postulates for Boolean Algebra
**

• Postulate 1: Closure property for + and . • Postulate 2: Identity law, 0 for +, 1 for .

• x + 0 = x; x.1=x • Postulate 3: Commutative property for + and . • x + y = y + x; x.y=y.x • Postulate 4: Distributive property (. over +, + over .) • x . (y + z) = (x . y) + (x . z) • x + (y . z) = (x + y) . (x + z) • Postulate 5: Complement (for every x there is an x’) • x + x’ = 1 • x . x’ = 0

13

Basic Theorems for Boolean Algebra • Straight Simplification using these theorems • Duality principle: One expression can be

reformulated if the binary operators and the identity elements are interchanged. Theorem # 1: (Idempotency Law)

• (x + x) = x

• (x . x) = x

14

**Basic Theorems for Boolean Algebra
**

Theorem # 2:

• x+1=1

(any variable + 1 = 1)

• x.0=0

(any variable AND with 0 = 0 )

15

**Basic Theorems for Boolean Algebra
**

Theorem # 3: (Involution or Double Negation)

• (x’)’ = x

16

**Basic Theorems for Boolean Algebra
**

Theorem # 4: (Associative Law) If x , y & z are three variables, then

• x + (y + z) = (x + y) + z • x . (y . z) = (x . y) . z

17

**Basic Theorems for Boolean Algebra
**

Theorem # 5: (Demorgan’s Law) If x & y are two variables, then

• (x + y)’ = x’ . y’

• (x . y)’ = x’ + y’

Demorgan’s Laws are one of the most important set of Boolean Algebraic Laws.

18

**Basic Theorems for Boolean Algebra
**

Theorem # 6: (Absorption Law)

**• If x & y are two variables then,
**

x + xy = x or x(x + y) = x (through duality) • Here variable y is absorbed by the variable x. Similarly • x + x’y = x + y • x(x’ + y) = xy • x’ + xy = x’ + y • x’(x + y) = x’y

19

**Proof • Absorption Law
**

x + xy = x Proof:

x + xy = x (1 + y) = x (1) =x Hence Proved

20

**Simplification by using Basic Rules • Similarly:
**

x + x’y = x + y Proof:

x + x’y = x (1 + y) + x’y

As 1 + y = 1 and x.1 = x

= x + xy + x’y = x + (x + x’) y =x+y

21

**Basic Theorems for Boolean Algebra
**

Theorem # 7: (Consensus Theorem) If x , y and z are three variables then,

• (x.y) + (y.z) + (z.x’) = (x.y) + (z.x’)

The proofs of all the above laws can also be obtained by using truth table.

22

**Proof • Consensus Theorem
**

(x.y) + (y.z) + (z.x’) = (x.y) + (z.x’) Proof:

**(x.y) + (y.z) + (z.x’) = xy + (x + x’)yz + x’z = xy + xyz + x’yz + x’z = xy(1 + z) + x’z(y + 1) = xy + x’z
**

23

Rule Number Boolean Expression

1

2 3 4 5 6 7 8 9

10

11 12

24

Prove that (A + B) (A + C) = A + BC

(A + B) (A+C) = AA +AC + BA + BC = A + AC + BA + BC = A (1 + C) + BA + BC = A.1 +BA + BC = A + BA + BC = A (1 + B) + BC = A.1 + BC = A + BC Distributive law Rule #7 Distributive law Rule 2 Rule 4 Distributive law Rule 2

25

Operator Precedence

Operator Precedence for evaluating Boolean expressions is

• Parentheses

• NOT

• AND • OR

26

Boolean Functions

• A Boolean function described by an algebraic expression

consists of binary variables, the constants 0 and 1, and the logic operation symbols. • For a given value of the binary variables, the function can be equal to either 1 or 0. Example: F1 = x + y'z • The function F1 is equal to 1 if x is equal to 1 or if both y' and z

•

27

are equal to 1. The complement operation dictates that when y' = 1, y = 0. Therefore, F1 = 1 if x = 1 or if y = 0 and z = 1. F1 is equal to 0 otherwise.

Truth table for function F1

Gate implementation of F1 = x + y' z

28

Another Example

Boolean function F2 = x' y' z + x' y z + x y' Simplifies to F2 = x' y' z + x' y z + x y' = x' z (y' + y) + x y' = x' z + x y'

29

Truth table for Function F2

F2 = x' y' z + x' y z + x y‘ F2 = x' z + x y'

30

Gate Implementation of F2

Gate implementation of function F2

Gate implementation of simplified form of function F2

31

32

Complement of a Function

• Complement of a function F is F' • Obtained from an interchange of 0’s for 1’s and 1’s for 0’s

in the value of F.

**• Algebraically may be derived through DeMorgan’s
**

Theorems.

33

**Canonical and Standard Forms
**

• Canonical form: consists of terms comprising of all

variables e.g., xy + x' y' • Sum of Product (SOP)

• Sum of Minterms • Standard Product • (XZ) + (Y' Z) + (X' YZ)

**• Product of Sum (POS)
**

• Product of Maxterms • Standard Sums • (X + Z) (Y' + Z) (X' + Y + Z)

**• Standard form: a reduced (short) form of canonical
**

expression.

34

**Minterms & Maxterms • A minterm is a special product of literals, in which
**

each input variable appears exactly once. • A function with N variables has 2N minterms (since each variable can appear complemented or not) • A three-variable function, such as f(x,y,z), has 23 = 8 minterms: • Each minterm is true for exactly one combination of inputs:

x’y’z’ - x’y’z - x’yz’ - x’yz - xy’z’ - x y’z - xyz’ - xyz

35

**Minterm Is True when
**

Minterm x’y’z’ Condition x=0, y=0, z=0 Shorthand m0

x’y’z

x’yz’ x’yz xy’z’

x=0, y=0, z=1

x=0, y=1, z=0 x=0, y=1, z=1 x=1, y=0, z=0

m1

m2 m3 m4

xy’z

xyz’ xyz

36

x=1, y=0, z=1

x=1, y=1, z=0 x=1, y=1, z=1

m5

m6 m7

**Sum of Minterms Form • Every function can be written as a sum of minterms,
**

which is a special kind of sum of products form

**• The sum of minterms form for any function is
**

unique

**• If you have a truth table for a function, you can
**

write a sum of minterms expression just by picking out the rows of the table where the function output is 1.

37

Example

x 0 0 y 0 0 z 0 1 f(x,y,z) 1 1 f’(x,y,z) 0 0

0

0 1

1

1 0

0

1 0

1

1 0

0

0 1

1

1 1

38

0

1 1

1

0 1

0

1 0

1

0 1

Example

= x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’ = m0 + m1 + m2 + m3 + m6 f(x,y,z) = Σ (0,1,2,3,6) f

f’

**= xy’z’ + xy’z + xyz = m4 + m5 + m7 = Σ (4,5,7) f’ contains all the minterms not in f
**

39

**Product of Maxterms • A product of sums (POS) expression contains:
**

• Only AND (product) operations at the “outermost” level • Each term must be a sum of literals

**• Product of sums expressions can be implemented
**

with two-level circuits • literals and their complements at the “0th” level • OR gates at the first level • a single AND gate at the second level

**• Compare this with sums of products
**

40

Product of Maxterms

• A maxterm is a sum of literals, in which each input

variable appears exactly once.

**• A function with N variables has 2N maxterms
**

• The maxterms for a three-variable function f(x,y,z):

x’ + y’ + z’ x + y’ + z’

41

x’ + y’ + z x + y’ + z

x’ + y + z’ x’+ y + z x + y + z’ x + y + z

**Maxterm Is false when
**

Maxterm x+y+z Condition x=0, y=0, z=0 Shorthand M0

x + y + z’

x + y’ + z x + y’ + z’ x’ + y + z

x=0, y=0, z=1

x=0, y=1, z=0 x=0, y=1, z=1 x=1, y=0, z=0

M1

M2 M3 M4

x’ + y + z’

x’ + y’ + z x’ + y’ + z’

42

x=1, y=0, z=1

x=1, y=1, z=0 x=1, y=1, z=1

M5

M6 M7

Product of Maxterms

• Every function can be written as a unique product of

maxterms

**• If you have a truth table for a function, you can
**

write a product of maxterms expression by picking out the rows of the table where the function output is 0.

43

Example

x 0 0 y 0 0 z 0 1 f(x,y,z) 1 1 f’(x,y,z) 0 0

0

0 1

1

1 0

0

1 0

1

1 0

0

0 1

1

1 1

44

0

1 1

1

0 1

0

1 0

1

0 1

Example

f = (x’ + y + z)(x’ + y + z’)(x’ + y’ + z’) = M4 M5 M7 = Π (4,5,7) = (x + y + z)(x + y + z’)(x + y’ + z) (x + y’ + z’)(x’ + y’ + z) = M0 M1 M2 M3 M6 = Π (0,1,2,3,6)

f’

**f’ contains all the maxterms not in f
**

45

**Minterms and Maxterms are Related
**

• Any minterm mi is the complement of the corresponding

maxterm Mi

Minterm x’y’z’ x’y’z x’yz’ x’yz xy’z’ xy’z xyz’ Shorthand m0 m1 m2 m3 m4 m5 m6

xyz

46

m7

**Minterms and Maxterms are Related
**

Maxterm x+y+z x + y + z’ x + y’ + z Shorthand M0 M1 M2

x + y’ + z’

x’ + y + z

M3

M4

x’ + y + z’

x’ + y’ + z x’ + y’ + z’

M5

M6 M7

**For example, m4’ = M4 because (xy’z’)’ = x’ + y + z
**

47

**Conversion between Canonical Forms • We can convert a sum of minterms to a product of
**

maxterms

**• In general, just replace the minterms with maxterms,
**

using maxterm numbers that don’t appear in the sum of minterms

**• The same thing works for converting from a
**

product of maxterms to a sum of minterms

48

**Conversion between Canonical Forms
**

From Previous Example; f = Σ (0,1,2,3,6) and f’ = Σ (4,5,7) = m4 + m5 + m7 complementing (f’)’ = (m4 + m5 + m7)’ f = m4’ m5’ m7’ [DeMorgan’s law] = M4 M5 M7 [By the previous page] = Π (4,5,7)`

49

**Conversion between Canonical Forms • In general, just replace the minterms with maxterms,
**

using maxterm numbers that don’t appear in the sum of minterms: f = Σm(0,1,2,3,6) = ΠM(4,5,7)

**• The same thing works for converting from a product
**

of maxterms to a sum of minterms

50

Equivalent Circuits & its Simplification

51

Equivalent Circuits & its Simplification

52

Equivalent Circuits & its Simplification

53

Equivalent Circuits & its Simplification

54

• Now simplifying the expression

55

• Final Simplified Circuit....

56

• Similarly

57

**Review • Sum-Of-Products, or SOP, Boolean expressions
**

may be generated from truth tables quite easily, by determining which rows of the table have an output of 1, writing one product term for each row, and finally summing all the product terms. This creates a Boolean expression representing the truth table as a whole.

**• Sum-Of-Products expressions lend themselves well
**

to implementation as a set of AND gates (products) feeding into a single OR gate (sum).

58

**Review • Product-Of-Sums, or POS, Boolean expressions
**

may also be generated from truth tables quite easily, by determining which rows of the table have an output of 0, writing one sum term for each row, and finally multiplying all the sum terms. This creates a Boolean expression representing the truth table as a whole.

**• Product-Of-Sums expressions lend themselves well
**

to implementation as a set of OR gates (sums) feeding into a single AND gate (product).

59

**Multiple Input Gates
**

• NOR does not extend easily

• Associative law does not hold

60

**Positive and Negative Logic
**

• Signal levels as high (H) or low (L)

• Positive logic

• H1 • L0

• Negative logic

• H0 • L1

61

**Positive and Negative Logic
**

• Truth Table for H and L

• In positive logic: AND

• In negative logic: OR

62

Integrated Circuits (IC)

• Small Scale Integration (SSI)

• 10s of logic gates

**• Medium Scale Integration (MSI)
**

• 100s – 1000s of logic gates

**• Large Scale Integration (LSI)
**

• 1000s – 10000s of logic gates

• 100000s of logic gates • Millions of logic gates

• Very Large Scale Integration (VLSI) • Ultra Large Scale Integration (ULSI)

63

Standard Form

• F = A + BC’

• Truth Table

• Minterms or Maxterms • Algebra

64

- DLD05 Gates
- DLD04 Boolean Algebra
- DLD03 Complement
- Untitled
- DLD02 Number System
- Writing Outlines
- Terrorism
- Precis Writing
- Pakstudies Lecture
- mids
- Letc 12 Missing Views
- Lecturer 11 ing
- Lecture 7
- Lecture 6
- Judicial System in Pakistan
- First Lecture Drawing
- Energy Crisis
- Calculation of Moment of Inertia
- Lecture 3 of Programming
- consolidation efforts made by pakiistan
- Precis Writing
- Lecture 2 of Programming

- Boolean Algebra
- Chapter 2 Boolean Algebra and Logic Gates
- ch02
- Chapter 2 Boolean Algebra and Logic Gates
- 31800180 Boolean Algebra and Logic Gates
- Boolean Algebra and Logic Gates
- Boolean Algebra
- DLD_lab_-4
- Boolean Algebra
- CBSE Class 12 Computer Science - Boolean Logic Concepts
- Slide07-BooleanAlgebra
- Digital Electronics EEE 357 Lecture 05
- Chapter 2 fdfdgd
- Boolean Algebra
- 2 - Com Bi National Logic Circuits
- Boolean Algebra Examples
- Extra Exercises Week 2_en
- Logic Laboratory Report Manuscript
- Boolean Algebra
- Chapter2 Boolean Algebra
- Dld Lecture 1
- CC2510-LN2-CombinLogic
- Laws of Boolean Algebra
- NAND NOR Implementation
- Experiment 1
- Boolean_algebra_-2008_2015_08_09_16_17_09_768
- Boolean equation to CMOS circuit
- Positive&Negative Logic
- CPE133-01
- Combination Al Circuits
- DLD04 Boolean Algebra

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue reading from where you left off, or restart the preview.

scribd