0% found this document useful (0 votes)
1 views

DLD Lecture 4th Week

Uploaded by

anasfarooqui505
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

DLD Lecture 4th Week

Uploaded by

anasfarooqui505
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 33

DLD 4th WEEK LECTURE

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

L = S1 AND (S2 OR S3)

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

Distinctive shape Rectangular outline


B

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

Distinctive shape Rectangular outline

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
00=0 0+0=0 0 1
01=0 0+1=1 1 0
10=0 1+0=1 A A
11=1 1+1=1
A0=0 A+0=A
0A=0 0+A=A
A1=A A+1=1
1A=A 1+A=1
AA=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

Distributive law De Morgan’s law


A(B  C ) AB  BC A  B A  B
A  BC ( A  B )( A  C ) A  B A  B

Associative law Note also


A(BC ) ( AB )C A  AB A  B
A  (B  C ) ( A  B )  C A( A  B ) AB

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

• In this lecture we will look at combinational logic

20
Implementing a function from a
Boolean expression 01

Implement the function:


X A  BC

21
Implementing a function from a
Boolean expression 02

Implement the function


Y AB  C D

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

can then be implemented as before

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

0 0 1 1 – first write down a Boolean


0 1 0 0
expression for the output
– then implement as before
0 1 1 0
– in this case
1 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)

The logic function X A BC  A BC  AB C


can then be implemented as before

28
Simplification of Logic Expression

• In some cases it is possible to simplify logic expressions using the rules


of Boolean algebra

X  ABC  A BC  AC  A C can be simplified to X BC  A

hence the following circuits are equivalent

29
Security light

During the day the


light sensor output
is high.
Light 1
senso
0
r
0 0
Relay Lamp
Body
heat 0/1
senso The relay controls a
separate circuit with
r the lamp in it.
During the day the body
heat sensor can be
either high or low – the
AND gate will not be 30
triggered.
Security light

When it is dark the


light sensor output is
low.
Light 0
senso
1
r
1 1
Relay Lamp
Body
heat 1
senso The AND gate receives
two high inputs and
r triggers the relay which
When it is dark, if causes the lamp to switch
someone approaches on.
the body heat sensor is
triggered and becomes 31
high
A night-time rain alarm

During the day, the output


1 0 from the light sensor is always
HIGH (1) so the output from the
NOT gate is always LOW (0) and
the alarm is not switched on.

0
0/1 Alarm

32
A night-time rain alarm.

In darkness the output from


0 1 the light sensor is LOW (0).
This means that the output
from the NOT switch is HIGH
(1). If rain falls on the
moisture sensor then its
output becomes HIGH (1). The
AND gate receives two HIGH
inputs, so the alarm is
switched1on.
1 Alarm

33

You might also like