DLD Lecture 4th Week
DLD Lecture 4th Week
CONTENTS
Introduction
Binary Quantities and Variables
Two Switches in Series
Two Switches in Parallel
Series Parallel Arrangement
Gates(AND,OR,NOT,BUFFER,NAND,NOR,XOR and XNOR)
Boolean Algebra, Identities and Laws
Combinational Logic and Examples
Security Light and Night Time Rain Alarm Circuits
1
Introduction
• Digital systems are concerned with digital signals
• Digital signals can take many forms
• Here we will concentrate on binary signals since these
are the most common form of digital signals
• can be used individually
• perhaps to represent a single binary quantity or the state of a
single switch
• can be used in combination
• to represent more complex quantities
2
Binary Quantities and
Variables
• A binary quantity is one that can take only 2 states
S L
OPEN OFF
CLOSED ON
S L
0 0
1 1
A simple binary arrangement
A truth table
3
Two switches in series
L = S1 AND S2
4
Two switches in parallel
L = S1 OR S2
5
A series/parallel arrangement
6
The AND
gate
7
The OR
gate
8
The NOT gate (or
inverter)
9
Buffer
gate
10
The NAND
gate
11
The NOR
gate
12
The Exclusive
OR(XOR) gate
13
Exclusive-OR Logic
Inputs Output
The truth table for an exclusive-OR gate is A B X
0 0 0
Notice that the output is HIGH whenever 0 1 1
A and B disagree. 1 0 1
1 1 0
The Boolean expression is X = AB + AB
The circuit can be drawn as
A
Symbols:
X =1
14
The Exclusive
NOR(XNOR) gate
15
Exclusive-NOR Logic
Inputs Output
The truth table for an exclusive-NOR gate is A B X
0 0 1
Notice that the output is HIGH whenever 0 1 0
1 0 0
A and B agree. 1 1 1
The Boolean expression is X = AB + AB
The circuit can be drawn as
A
Symbols:
X
B
=1
16
Boolean
Algebra
• Boolean Constants
• these are ‘0’ (false) and ‘1’ (true)
• Boolean Variables
• variables X, Y etc. that can only take the vales ‘0’ or ‘1’
• Boolean Functions
• each of the logic functions (such as AND, OR and NOT) are
represented by symbols as described above
• Boolean Theorems
• a set of identities and laws – see text for details
17
Boolean
identities
AND Function OR Function NOT function
00=0 0+0=0 0 1
01=0 0+1=1 1 0
10=0 1+0=1 A A
11=1 1+1=1
A0=0 A+0=A
0A=0 0+A=A
A1=A A+1=1
1A=A 1+A=1
AA=A A+A=A
A A 0 A A 1
18
Boolean
laws
Commutative law Absorption law
AB BA A AB A
A B B A A( A B ) A
19
Combinational
Logic
• Digital systems may be divided into two broad
categories:
• combinational logic
• where the outputs are determined solely by the current states of
the inputs
• sequential logic
• where the outputs are determined not only by the current inputs
but also by the sequence of inputs that led to the current state
20
Implementing a function from a
Boolean expression 01
21
Implementing a function from a
Boolean expression 02
22
Generating a Boolean expression from a logic diagram
23
Example (continued)
work progressively from the inputs to the output adding logic expressions to
the output of each gate in turn
24
Implementing a logic function
from a description
The operation of the Exclusive OR gate can be stated as:
“The output should be true if either of its inputs are true,
but not if both inputs are true.”
This can be rephrased as:
“The output is true if A OR B is true,
AND if A AND B are NOT true.”
We can write this in Boolean notation as
X ( A B) ( AB)
25
Example (continued)
The logic function
X ( A B) ( AB)
26
Implementing a logic function
from a truth table
Implement the function of the following truth table
A B C X
0 0 0 0
1 0 1 1 X A B C A B C A B C
1 1 0 1
1 1 1 0
27
Example (continued)
28
Simplification of Logic Expression
29
Security light
0
0/1 Alarm
32
A night-time rain alarm.
33