Chapter 3 - Get Logic
Chapter 3 - Get Logic
Chapter 3 - Get Logic
CHAPTER 2
OR Gates
X=A+B
‘+’ is stand for OR operation
A
B X = A+B
•Application Example:
–Intrusion detection & alarm system.
X=A.B
‘.’ is stand for AND operation
A
X = A.B
B
•The AND operation produce result (o/p) of 1 wherever both i/p is ‘1’,
otherwise the result is ‘0’.
A B X A
0 0 0
0 1 0 B
1 0 0
1 1 1 X
•Application Example:
–A seat-belt alarm system.
Ignition
Switch Master
Seat-Belt Alarm
Circuit
30s
The Inverter (NOT)
• Perform on a single i/p variable
• The Boolean operation for the NOT operation is:
X=A
‘-’ overbar represent the NOT operation
A X=A
Presence of small circle
always denotes inversion
• The expression is read as ‘ X equals NOT A’ or ‘ X equals inverse of A’
or ‘X equals the complement of A’
OR AND NOT
A B X A B X A X
0 0 0 0 0 0 0 1
0 1 1 0 1 0 0 1
1 0 1 1 0 0 0 1
1 1 1 1 1 1 1 0
NOR Gate
A X = A+B A X = A+B
B B
Denotes inversion
A B A+B A +B
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
c) Truth Table
NAND Gate
B B
A B A.B A.B
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
c) Truth Table
Exclusive OR gate (XOR)
A
X=A+B
B
– The o/p of an XOR gate is ‘1’ only when the 2 i/p are at
opposite logic level.
A B A +B
0 0 0
0 1 1
1 0 1
1 1 0
a) Truth Table
Exclusive NOR Gate (XNOR)
A
X=A+B
B
– The o/p of an XOR gate is ‘1’ only when the 2 i/p are at
same logic level
A B A+B
0 0 1
0 1 0
1 0 0
1 1 1
a) Truth Table
Boolean Operations
Boolean Addition
• Boolean addition is equivalent to the OR operation
0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 1
•
A + B, A + B , A + B + C
A sum term is equal to 1 when one or more of the literals in the term is 1
Boolean Operations (cont.)
Boolean Multiplication
• Multivariable Theorems
1. x+y = y+x
2. x.y = y.x
3. x+(y+z)= (x+y)+z = x+y+z
4. x(yz) = (xy)z = xyz
a. x(y+z)= xy+xz
b. (w+x)(y+z)= wy+xy+wz+xz
5. x+xy = x
a. x+xy = x+y
b. x+xy = x+y
Boolean Theorems
• Distributive law
– A(B + C) = AB + AC
– (A + B)(C + D) = AC + AD + BC + BD
DeMorgan’s Theorem
• DeMorgan’s Theorems are useful in
simplifying expression in which a product or
sum of variables is inverted.
• The two theorems are :
1.
( X + Y ) = Y .X
2.
( X .Y ) = Y + X
• E.g.: Apply DeMorgan’s Theorems to the following
expression:
AB + C D + EF
• Solution:
AB + C D + EF = ( AB )(C D )( EF )
= ( A + B )(C + D )( E + F )
= ( A + B )(C + D )( E + F )
Implications of DeMorgan’s
Theorem
Universality of NAND gates and NOR
gates
NAND gate can be used to perform each of the
Boolean operation OR, AND & NOT
A X=A.A=A ⇒ A X=A
A A
B
X = A.B
X = A.B = A.B ⇒ B
X = A.B
A X=A
A
X = A .B = A+B ⇒ B X = A+B
X=B
B
OR Gate
Universality of NAND gates and NOR
gates
A A
X = A+B = A+B ⇒
X = A+B
X = A+B
B B
A X= A
A
X = A + B = A .B ⇒ B
X = A .B
X= B
B
AND Gate
Alternate Logic-Gate
Representations
Standard and alternate symbols for various logic
gates and inverter.
How to obtain the alternative
symbol from standard ones
• Invert each input and output of the standard
symbol. This is done by adding bubbles (small
circles) on input and output lines that do not
have bubbles and by removing bubbles that are
already there.
• Change the operation symbol from AND to OR,
or from OR to AND. (In the special case of the
INVERTER, the operation symbol is not changed.)
Several points
• The equivalences can be extended to gates with any
number of inputs.
• None of the standard symbols have bubbles on their
inputs, and all the alternate symbols do.
• The standard and alternate symbols for each gate
represent the same physical circuit; there is no difference in
the circuits represented by the two symbols.
• NAND and NOR gates are inverting gates, and so both
the standard and the alternate symbols for each will
have a bubble on either the input or the output, AND
and OR gates are non-inverting gates, and so the
alternate symbols for each will have bubbles on both
inputs and output.
Logic-Symbol
Interpretation
• Active high/low
When an input or output line on a logic
circuit symbol has no bubble on it, that
line is said to be active-high, otherwise it is
active-low.
Interpretation of the two
NAND gate symbols
Interpretation of the two OR
gate symbols
How to represent the basic
logic functions
• Logical statements in our own
language
• Truth tables
• Traditional graphic logic symbols
• Boolean algebra expressions
• Timing diagrams
Summary
• Boolean Algebra: a mathematical tool used in the analysis and
design of digital circuits
• OR, AND, NOT: basic Boolean operations
• OR: HIGH output when any input is HIGH
• AND: HIGH output only when all inputs are HIGH
• NOT: output is the opposite logic level as the input
• NOR: OR with its output connected to an INVERTER
• NAND: AND with its output connected to an INVERTER
• Boolean theorems and rules: to simplify the expression of a logic
circuit and can lead to a simpler way of implementing the circuit
• NAND, NOR: can be used to implement any of the basic
Boolean operations