0% found this document useful (0 votes)
86 views62 pages

Digital Electronics: CT 304N Unit-2 (Part-1) Binary Logic and Boolean Algebra

This document discusses digital electronics and binary logic. It defines basic binary logic concepts like binary variables that can have values of 1 or 0. It describes different logic gates like AND, OR, NOT, NAND, NOR, XOR and XNOR gates. It explains that NAND and NOR gates are universal gates since other logic gates can be implemented using only NAND or NOR gates. It provides examples of implementing logic functions using switches to represent 1s and 0s. It also gives an example of using logic expressions to represent conditions to open a boiler's fuel valve.

Uploaded by

Liyanshu patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views62 pages

Digital Electronics: CT 304N Unit-2 (Part-1) Binary Logic and Boolean Algebra

This document discusses digital electronics and binary logic. It defines basic binary logic concepts like binary variables that can have values of 1 or 0. It describes different logic gates like AND, OR, NOT, NAND, NOR, XOR and XNOR gates. It explains that NAND and NOR gates are universal gates since other logic gates can be implemented using only NAND or NOR gates. It provides examples of implementing logic functions using switches to represent 1s and 0s. It also gives an example of using logic expressions to represent conditions to open a boiler's fuel valve.

Uploaded by

Liyanshu patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

Digital Electronics: CT 304N

Unit–2(Part-1)
Binary Logic and Boolean
Algebra
Dr. Anand J. Patel
Index

2.1 Basic Binary logic


2.2 Logic Gate
2.3 Universal Gate: (1) NAND gate
(2) NOR gate
2.4 Boolean Functions
2.5 De-Morgan’s theorems
2.6 Examples
2.1 Basic binary Logic
Binary Variables
• The two binary values have different names:
1. True/False
2. On/Off
3. Yes/No
4. 1/0
• We use 1 and 0 to denote the two values.
• Variable identifier examples:
1. A, B, y, z, or X1 for now
2.2 Logic Gates:

Definition of logic gate


All basic logic gates have the ability to accept either one
or two input signals (depending upon the type of gate)
and generate one output signal.

Logic Circuit:
Logic circuit is made up of Various logic gate.
Input and Output signals are binary:

Binary always in one of two possible states;


typically treated as:
On / Off (electrically)
1 / 0
True / False

There are total 7 gate: NOT, AND, OR,NAND , NOR,


EX-OR and EX-NOR Gates.
There are 3 basic logic gate: NOT, AND and OR.
NOT Gate -- Inverter

X Y

X Y 0 1
1 0

Logical Expression : Y = X’
y is only TRUE if x is FALSE
AND Gate

X Y Z
X 0 0 0
Z 0 1 0
Y 1 0 0
1 1 1
Logical Expression: Z = X . Y
z is only TRUE only if x is TRUE and y is
TRUE
OR Gate

X Y Z
X 0 0 0
Z 0 1 1
Y
1 0 1
1 1 1

Logical Expression: Z = X + Y
z is TRUE if x is TRUE or y is TRUE (or both)
NAND Gate

X Y Z
X 0 0 1
Z 0 1 1
Y 1 0 1
1 1 0

Logical Expression: Z=X.Y


• z is TRUE if x is FALSE or y is FALSE (or both)
• z is FALSE only if x is TRUE and y is TRUE
NOR Gate

X Y Z
X 0 0 1
Z 0 1 0
Y
1 0 0
1 1 0

Logical Expression: Z=X+Y


• z is TRUE only if x is FALSE and y is FALSE
• z is FALSE if x is TRUE or y is TRUE (or both)
Exclusive-OR Gate (XOR)

X Y Z
X
Z
Y 0 0 0
0 1 1
1 0 1
1 1 0
Logical Expression: Z = X Y
z is TRUE if x is TRUE or y is TRUE (but not both)
Exclusive-NOR Gate(XNOR)

X
Z X Y Z
Y
0 0 1
0 1 0
1 0 0
Logical Expression: Z = X Y 1 1 1
Multiple-input Gates

Z1 Z2

Z3 Z4
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 eliminating inverter.
2.3 Universal gate

All other gates can be realized using NAND gate


and NOR gate. So both these are called universal
gate.

NAND gate NOR gate


NAND gate as Universal gate

Not gate

A Y=A’
0 1
1 0

Input is A
Output is Y
Y = A’
AND gate

A B Y1 Y
0 0 1 0
0 1 1 0
1 0 1 0
1 1 0 1
Y1 = A.B
Y = Y1
= A.B
= A.B
OR gate

A B Y1 Y2 Y
0 0 1 1 0
0 1 1 0 1
1 0 0 1 1
1 1 0 0 1

Y1 =A’
Y2 = B’
Y = (Y1. Y2)’
= [ (A)’ . (B)’ ]’ { Apply De-Morgan’s theorem }
= [ (A+B)’ ]’
= A+B
NOR gate

A B Y1 Y2 Y3 Y
0 0 1 1 0 1
0 1 1 0 1 0
1 0 0 1 1 0
1 1 0 0 1 0
Y1 =A’
Y2 = B’
Y3 = (Y1. Y2)’
= [ (A)’ . (B)’ ]’ { Apply De-Morgan’s theorem }
= [ (A+B)’ ]’
= A+B
Y = (Y3)’
= (A+B)’
EX-OR gate (Exclusive-OR gate)

=Y1

=Y

=Y2

A B A’ B’ Y1 Y2 Y
0 0 1 1 1 1 0
0 1 1 0 0 1 1
1 0 0 1 1 0 1
1 1 0 0 1 1 0
EX-NOR gate (Exclusive-NOR gate)

=Y1

=Y

=Y2

A B A’ B’ Y1 Y2 Y3 Y
0 0 1 1 1 1 0 1
0 1 1 0 0 1 1 0
1 0 0 1 1 0 1 0
1 1 0 0 1 1 0 1
NOR as Universal gate

NOT gate
Y A Y=A’
0 1
1 0
Input is A
Output is Y
Y = A’
OR gate

Y1
A B Y1 Y
A
Y 0 0 1 0
B
0 1 0 1
1 0 0 1
Y1 = A+B 1 1 0 1
Y = Y1
= A+B
= A+B
AND gate
A B Y1 Y2 Y
Y1 0 0 1 1 0
A
0 1 1 0 0
Y
B 1 0 0 1 0
Y2 1 1 0 0 1

Y1 = A’
Y2 = B’
Y = (Y1+Y2)’
= [ (A)’ + (B)’ ]’{Apply De-Morgan’s theorem}
= [ (A .B)’ ]’
= A.B
NAND gate

Y1
Y3
Y

Y2

A B Y1 Y2 Y3 Y
0 0 1 1 0 1
0 1 1 0 0 1
1 0 0 1 0 1
1 1 0 0 1 0
Y1 = A’
Y2 = B’
Y3 = (Y1+Y2)’
= [ (A)’ + (B)’ ]’ {Apply De-Morgan’s theorem}
= [ (A .B)’ ]’
= A.B
Y = (Y3)’
= (A.B)’
EX-OR gate

A B A’ B’ Y1 Y2 Y3 Y
0 0 1 1 0 0 1 0
0 1 1 0 0 1 0 1
1 0 0 1 1 0 0 1
1 1 0 0 0 0 1 0
EX-NOR gate

A B A’ B’ Y1 Y2 Y
0 0 1 1 0 0 1
0 1 1 0 0 1 0
1 0 0 1 1 0 0
1 1 0 0 0 0 1
Logic Function Implementation
Switches in parallel => OR
• Using Switches
• For inputs:
• logic 1 is switch closed
• logic 0 is switch open
• For outputs: Switches in series => AND
• logic 1 is light on
• logic 0 is light off.
• NOT uses a switch such
that: Normally-closed switch => NOT
• logic 1 is switch open
C
• logic 0 is switch closed
Logic Function Implementation (Continued)
• Example: Logic Using Switches
B C
A

• Light is on (L = 1) for
L(A, B, C, D) = A ((B C') + D) = A B C' + A D

and off (L = 0), otherwise.


• Useful model for relay circuits and for CMOS gate
circuits, the foundation of current digital logic
technology
Logic Gate Symbols and Behavior
• Logic gates have special symbols:
X X
Z X ·Y Z X +Y X Z X
Y Y
AND gate OR gate NOT gate
(a) Graphic symbols
• And waveform behavior in time as follows:
X 0 0 1 1

Y 0 1 0 1

(AND) X ·Y 0 0 0 1

(OR) X1 Y 0 1 1 1

(NOT) X 1 1 0 0
(b) Timing diagram
Example : Uses of Simple Logic
• Example – Heating Boiler
– If chimney is not blocked and the house is cold and the pilot light is
lit, then open the main fuel valve to start boiler.
b = chimney blocked
c = house is cold
p = pilot light lit
v = open fuel valve
-So give a logical (Boolean) expression for the statement ??....
Solution : Uses of Simple Logic Example
• Example – Heating Boiler
– If chimney is not blocked and the house is cold and the pilot light is
lit, then open the main fuel valve to start boiler.
b = chimney blocked
c = house is cold
p = pilot light lit
v = open fuel valve
– So in terms of a logical (Boolean) expression
v = (NOT b) AND c AND p
Boiler Example
• If chimney is not blocked and the house is
cold and the pilot light is lit, then open the
main fuel valve to start boiler.

b = chimney blocked c = house is cold


p = pilot light lit v = open fuel valve

• So in terms of a logical (Boolean) expression


v = (NOT b) AND c AND p
• Now draw the logical circuit for the Boolean
Expression ???....
Boiler Example: Solution

• If chimney is not blocked and the house is


cold and the pilot light is lit, then open the
main fuel valve to start boiler.
b = chimney blocked c = house is cold
p = pilot light lit v = open fuel valve

b
c v  b.c.p
p
Introduction to Boolean Algebra:
• English mathematician George Boole invented symbolic logic in
1854,which is known as Boolean algebra.
• Boolean logic operations:
There are three basic operations in Boolean algebra:
1) AND
2) OR
3) NOT or INVERSION
Properties of Boolean algebra:
1) Commutative property:
A+B = B+A
A.B = B.A
2)Associative property:
A+(B+C) = (A+B)+C
A.(B.C) = (A.B).C
3) Distributive property:
A+B.C = (A+B) (A+C)
A.(B+C) = A.B + A.C
4) Absorption property:
A+A.B = A
A.(A+B) = A
A+A’. B = A+B
A.(A’+ B) = A.B
Properties of Boolean algebra:
5) Consensus property:

A.B+A’.C+B.C = A.B+A’.C
(A+B)(A’+C)(B+C) = (A+B)(A’+C)
Laws of Boolean Algebra
• Basic Boolean Laws
• Idempotent Law
• A.A=A
• A+A=A
• Identity Law
• A.0=0 ; A.1=A
• A+1=1 ; A+0=A
• Complement Law
• A . A’ = 0
• A + A’ = 1
• Involution Law
• (A’)’ = A
Principle of duality:
• Each law is described by two parts that are duals of each other. The
Principle of duality is:
• Interchanging the + (OR) and * (AND) operations of the expression.
• Interchanging the 0 and 1 elements of the expression.
• Not changing the form of the variables.
• E.g. A+0=A then A.1=A
De-Morgan’s theorems:
1.Complement of the product is equal to the sum of the
complement.
(A.B)’ = A’+B’

2.Complement of sum is equal to the product of the


complement.
(A+B)’=A’.B’
Proof of De-Morgan’s theorems:

1.Complement of the product is equal to the sum of the


complement.
(A.B)’ = A’+B’

A B A.B (A.B)’ A B A’ B’ A’+B’


0 0 0 1 0 0 1 1 1
0 1 0 1 0 1 1 0 1
1 0 0 1 1 0 0 1 1
1 1 1 0 1 1 0 0 0
2. Complement of sum is equal to the product of the
complement.
(A+B)’=A’.B’

A B A+B (A+B)’ A B A’ B’ A’B’


0 0 0 1 0 0 1 1 1
0 1 1 0 0 1 1 0 0
1 0 1 0 1 0 0 1 0
1 1 1 0 1 1 0 0 0
Boolean Operator Precedence
 The order of evaluation in a Boolean
expression is:
1. Parentheses
2. NOT
3. AND
4. OR
 Consequence: Parentheses appear
around OR expressions
 Example: F = A(B + C)(C + D)
Boolean Algebra - Examples
Show: a.(a’ b)  a.b
Given: a.(a’ b)
 a.a’  a.b A.A’ =0
 0  a.b
 a.b
Show: a  (a’ .b)  a  b
Given: a  (a’.b)
 (a  a’).(a  b) (Distribution Property)
 1.(a  b) a  a’= 1
 ab
2.6 Example

Statement : Prove that A + A’B + AB’ = A + B

Solution:
LHS = A + A’B + AB’
= A + AB’ + A’B
= A (1+B’) + A’B {1+B’=1}
= A (1) + A’B
= A + A’B
= (A + A’) (A + B) Distributive Property
= (A + B) {(A + A’) =1}
= A+B
= RHS
So, A + A’B + AB’ = A + B
Statement : Simplify A (A’ + C) (A’B + C’)

Solution: A (A’ + C) (A’B + C’)


= ( AA’ + AC) (A’B + C’) Distribution Property
= (0 + AC) (A’B + C’) AA’ = 0
= AC (A’B + C’)
= ACA’B + ACC’ Distribution Property
= AA’BC + ACC’ AA’ = 0, CC’ = 0
= 0+0
= 0
So, A (A’ + C) (A’B + C’) = 0
Statement : Draw logic circuit from Boolean expression

Y = ( A + B )’ .C + ( A + C )’ . B
Statement : Write Boolean expression for the circuit
shown in figure.

Y = ( A + B’ + C ). (A’ B’). (ABC)


Statement : Write Boolean expression for the circuit shown in figure.
Problem:
Minimize the following Boolean expression using Boolean identities:−
F(A,B,C)=(A+B)(A+C)

Solution:

Given, F(A,B,C)=(A+B)(A+C)
Or, F(A,B,C)=A.A+A.C+B.A+B.C [Applying distributive Rule]
Or, F(A,B,C)=A+A.C+B.A+B.C [Applying Idempotent Law: A.A=A]
Or, F(A,B,C)=A(1+C)+B.A+B.C [Applying distributive Law]
Or, F(A,B,C)=A+B.A+B.C [Applying dominance Law]
Or, F(A,B,C)=A+B.C [Applying absorption Law]

So, F(A,B,C) = A+BC is the minimized form.


Problem:
Minimize the following Boolean expression using Boolean identities:−
F(A,B,C)=A′B+BC′+BC+AB′C′
Solution:
Given, F(A,B,C)=A′B+BC′+BC+AB′C′
Or, F(A,B,C)=A′B+(BC′+BC′)+BC+AB′C′ [By idempotent law, BC’ = BC’ + BC’]
Or, F(A,B,C)=A′B+(BC′+BC)+(BC′+AB′C′)
Or, F(A,B,C)=A′B+B(C′+C)+C′(B+AB′) [By distributive laws]
Or, F(A,B,C)=A′B+B.1+C′(B+A) [ (C' + C) = 1 and absorption law (B + AB')= (B + A)]
Or, F(A,B,C)=A′B+B+C′(B+A) [ B.1 = B ]
Or, F(A,B,C)=B(A′+1)+C′(B+A)
Or, F(A,B,C)=B.1+C′(B+A) [ (A' + 1) = 1 ]
Or, F(A,B,C)=B+C′(B+A) [ As, B.1 = B ]
Or, F(A,B,C)=B+BC′+AC′
Or, F(A,B,C)=B(1+C′)+AC′
Or, F(A,B,C)=B.1+AC′ [As, (1 + C') = 1]
Or, F(A,B,C)=B+AC′ [As, B.1 = B]

So, F(A,B,C)=B+AC′ is the minimized form.


Example:
• Simplify: C + (BC)’:
C + (BC)’ Original Expression
=C + (B’ + C’) DeMorgan's Law.
=(C + C’) + B’ Commutative, Associative Laws.
=1 + B’ Complement Law.
=1 Identity law
Example:
• Simplify: (AB)’(A’ + B)(B’ + B):
(AB)’(A’ + B)(B’ + B) Original Expression
=(AB)’(A’ + B) Complement law, Identity law.
=(A’ + B’)(A’ + B) DeMorgan's Law
=A’ + B’B Distributive law.
[A+B.C = (A+B) (A+C)]
(This step uses the fact that or distributes over and. It can look a bit
strange since addition does not distribute over multiplication.)

=A’ Complement, Identity.


Example:
• Simplify: (A + C)(AD + AD’) + AC + C:
(A + C)(AD + AD’) + AC + C Original Expression
=(A + C)A(D + D’) + AC + C Distributive.
=(A + C)A + AC + C Complement, Identity.
=A((A + C) + C) + C Commutative, Distributive.
=A(A + C) + C Associative, Idempotent.
=AA + AC + C Distributive.
=A + (A + 1)C Idempotent, Identity, Distributive.
=A + C Identity, twice.
Example:
Example:
• Simplify: A’(A + B) + (B + AA)(A + B’):
= A’A + A’B + (B + A)A + (B + A)B’ Idempotent (AA to A), then Distributive, used twice. A.(B+C) = A.B + A.C

= A’B + (B + A)A + (B + A)B’ Complement, then Identity. (Strictly speaking, we also used the
Commutative Law for each of these applications.)
= A’B + BA + AA + BB’ + AB’ Distributive, two places.
=A’B + BA + A + AB’ Idempotent (for the A's), then Complement and Identity to
remove BB.
=A’B + AB + AT + AB’ Commutative, Identity; setting up for the next step.
= A’B + A(B + T + B’) Distributive.
= A’B + A Identity, twice (depending how you count it).
= A + A’B Commutative.
=(A + A’)(A + B) Distributive.
=A+B Complement, Identity.

You might also like