course name: discrete structures course code: am103 batch

25
Course Name: Discrete Structures Course Code: AM103 Batch 2020 BE(CSE) Department of Applied Sciences 9/16/2021 Department of Applied Sciences,HP 1

Upload: others

Post on 18-Mar-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Course Name: Discrete Structures

Course Code: AM103

Batch 2020

BE(CSE)

Department of Applied Sciences

9/16/2021 Department of Applied Sciences,HP 1

Boolean Algebra and its

application to switching

circuits

9/16/2021 Department of Applied Sciences,HP 2

Definition

BOOLEAN ALGEBRA :

Definition : A Boolean Algebra is a distributive,

complemented lattice having at least two distinct elements

as zero element 0 and a one element 1.

9/16/2021 Department of Applied Sciences,HP 3

Definition

9/16/2021 Department of Applied Sciences,HP 4

Definition

Boolean Algebra

Let B be a set with two binary operations ˅ and ˄ or + and *

and two elements 0 and 1 and a unary operation ‘–’ such that

the following properties holds:

1. Closure Property i.e. a+b a.b a,b

2. Commutative Property i.e. a+b=b+a and a.b=b.a a,b

3. Identity Law i.e. a+0=a,a.1=a a

4. Distributive Law i.e. a+(b.c)=(a+b).(a+c) a,b,c

5. Complement Law i.e. a+a=1 and a.a =0 a

6. Associative Law i.e. a+(b+c)= (a+b)+c

and a.(b.c)=(a.b).c a,b,c

9/16/2021 Department of Applied Sciences,HP 5

Dual of Boolean Expression

• The principle of duality is an important concept. This says that

if an expression is valid in Boolean algebra, the dual of that

expression is also valid.

• To form the dual of an expression, replace all (+) operators with

(·) operators, all (·) operators with (+) operators, all ones with

zeros, and all zeros with ones.

• Following the replacement rules…

a(b + c) = ab + ac

• Form the dual of the expression

a + (bc) = (a + b)(a + c)

• Take care not to alter the location of the parentheses if they are

present.

6

Examples

9/16/2021 Department of Applied Sciences,HP 7

TRUTH TABLES

A truth table is a mathematical table used in logic—

specifically in connection with Boolean algebra, Boolean

functions, and propositional calculus—which sets out the

functional values of logical expressions on each of their

functional arguments, that is, for each combination of values

taken by their logical variables.

9/16/2021 Department of Applied Sciences,HP 8

DeMorgan’s Theorem

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

Using truth table

x y x’ y’ x+y (x+y)’ x’y’ xy x’+y' (xy)’

0 0 1 1 0 1 1 0 1 1

0 1 1 0 1 0 0 0 1 1

1 0 0 1 1 0 0 0 1 1

1 1 0 0 1 0 0 1 0 0

9

Example

9/16/2021 Department of Applied Sciences,HP 10

Example

Show that xy + x’z + yz = xy + x’z using Boolean

identity laws

• Proof:

– xy + x’z + yz

• = xy + x’z + 1.yz

• = xy + x’z + (x+x’)yz

• = xy + x’z + xyz + x’yz

• = (xy + xyz) + (x’z + x’zy)

• = x(y + yz) + x’ (z + zy)

• = xy + x’z

11

Example

Simplify this expression using Boolean identities

x(x'+y)

solution

x(x'+y)

= xx' + xy

= 0+xy

= xy

9/16/2021 Department of Applied Sciences,HP 12

Logic Gates

Digital logic gates are the building blocks from which all

digital electronic circuits and microprocessor based systems

are made

9/16/2021 Department of Applied Sciences,HP 13

A

B

Z

𝐙 = 𝐀 + 𝐁

OR GATE

A

BZ

𝐙 = 𝐀●𝐁

AND GATE

A Z

𝐙 = ഥ𝐀

NOT GATE

A

B

Z

𝐙 = 𝐀 + 𝐁 = ഥ𝐀●ഥ𝐁

NOR GATE

A

B

Z

𝐙 = 𝐀●𝐁 = ഥ𝐀 + ഥ𝐁

NAND GATE

NAND and NOR Gates are known as Universal

gates because any digital circuit can be realized

completely by using either of these two gates and

also they can generate the three basic gates AND,

OR and NOT Gate

A universal gate provides flexibility and offers

enormous advantage to logic designers.

UNIVERSAL GATES

A

B

Z

XOR (EXCLUSIVE OR GATE)

AB

Z

XNOR GATE(EXCLUSIVE NOR GATE)

Draw the circuit diagram of the following

Boolean function

𝒇𝟏 𝒙, 𝒚, 𝒛 = 𝒙𝒚ത𝒛

x

y

z

Draw the circuit diagram of the following

Boolean function

𝒇𝟐 𝒙, 𝒚, 𝒛 = 𝒙 + ഥ𝒚𝒛

x

yz

Practice Questions

9/16/2021 Department of Applied Sciences,HP 24