Professional Documents
Culture Documents
CHAPTER THREE
CHAPTER 4
BA S I C S O F D I G I TA L LO G I C S
1
DIGITAL SIGNALS
Digital logic is the fundamental concept underpinning all modern computer systems.
It is the system of rules that allow us to make extreamly complicated decisions
based on relatively simple ‘yes/no’ questions.
Digital devices convert digial inputs into one or more digital outputs.
Logic signal uses a digital signal
Digital Signals have two basic states:
They may represent levels of ON or OFF, OPEN or CLOSE, YES or NO, TRUE or
FALSE e.t.c.
A good example of binary is a light (only on or off)
2
BINARY
In Binary, there are only 0’s and 1’s
101 = 5
Vcc Vcc
110 = 6
Vcc, or 1 Gnd, or 0
111 = 7
… =…
3
LOGIC
They are made of six(if you include NOT gate) basic logic gates:
AND gate, OR gate, XOR gate, NAND gate, NOR gate and NOT gate
4
THE AND GATE
The AND logic:
If all the inputs are high, the output is high
If any input is low, the output is low
“If this input AND this input are high, the output is high”
5
AND GATE
Symbol
A
Inputs Q Output
B
A.B = Q
6
AND GATE:- TRUTH TABLE
Are simple plots which explain the output of a circuit interms of the
possible inputs to that circuit.
They tabulate the relationship between the inputs and the output of a
logic gate
Inputs Output
0 0 0
Every possible 0 1 0
input combination
1 0 0
1 1 1
7
THE OR GATE
The OR gate:
if any input is high, the output is high
if all inputs are low, the output is low
8
OR GATE
Symbol
A
Inputs Q Output
B
Boolean equation
A+B = Q
9
OR GATE:- TRUTH TABLE
10
THE NOT GATE
11
NOT GATE
Symbol
Inputs A Q Output
Boolean equation
12
NOT GATE:- TRUTH TABLE
Truth Table
Input Output
0 1
1 0
13
THE NAND GATE
The NAND gate is the combination of an NOT gate with an AND gate.
Symbol
A
AND NOT NAND Q
B
Truth table
Boolean equation Inputs Output
A B Q
0 0 1
0 1 1
1 0 1
1 1 0
14
THE NOR GATE
The NOR gate is the combination of the NOT gate with the OR gate.
Symbol
A
OR NOT NOR Q
B
Truth table
Boolean equation Inputs Output
A B Q
0 0 1
0 1 0
1 0 0
1 1 0
15
THE XOR GATE
The EXCLUSIVE-OR gate can be considered to be an OR gate with a NOT gate
applied to one of the inputs to invert it before the inputs reach the OR gate.
Alternatively it can be considered as an AND gate with a NOT gate applied to one of
the inputs to invert it before the inputs reach the AND gate
Symbol A
A Q
B
Q
B NOT
Truth table
Boolean equation Inputs Output
A B Q
0 0 0
0 1 1
1 0 1
1 1 0
17
DIFFERENT IC CHIP DIAGRAMS
18
BOOLEAN ALGEBRA
Defines the rules for expressing and simplifing binary logic statements.The basic
Boolean laws and identities follows
Fundamental laws
OR AND NOT
Comutative laws
Associative laws
Distributive laws
19
DE MORGAN’S LAWS
Useful in rearranging or simplifying longer boolean expressions or converting
between AND and OR gate:
20
EXERCISE
1) Simplify the Boolean expression
21
DESIGN OF LOGIC NETWORKS
The following steps facilitate the design of a digital circuit to solve a problem:
1) Define the problem in words.
2) Write the quasi-logic statement in English that can be translated in to Boolean
expression
3) Write the Boolean expression
4) Simplify and optimize the Boolean expressions if possible
5) Write an all-AND, all-NAND, all-OR, or all-NOR realization of the circuitto
minimise the number of required logic gate IC components.
6) Draw the logic schematic for the electronic realization of the circuit.
22
EXAMPLE: SIMPLE SECURITY PROTECTION SYSTEM FOR A HOUSE
Design a circuit for a simple secutity protection system for a home.
The home owner wants an alarm to sound if someone breaks into the house through a
door or window or if something is moving around in the house while the occupants
are away.Under certain conditions, the users may also want to disable portions of
the alarm system.We assume that there are sensors to detect if windows or doors
are disturbed and to detect motion. To accomplish the goals of this security system,
design a combinational logic circuit using two switches that can be set by the owner.
23
STEP 1:DEFINE THE PROBLEM IN WORDS
1) An active state where the alarm will sound only if the windows or doors are
disturbed.This state is useful when the occupants are sleeping.
2) An active state where the alarm will sound if the windows or doors are
disturbed or if there is motion in the house.This state is useful when occupants
are away.
3) A disable state where the alarm will not sound.This state is useful during normal
household activity.
Define Boolean variables that will represent the inputs and outputs of the circuit.
A (input): state of the door and window sensors
B (input): state of the motion detectors
Y (output): output used to sound the alarm
CD(input): 2bit code set by the user to select the operating state
defined by
Operating state 1
Operating state 2
Operating state 3
STEP 2: WRITE QUASI-LOGIC STATEMENTS
We further translate the word statements into logic like statements.The quasi-logic
statements for the security system are:
Activate the alarm (Y=1) if A is high and the code CD is 01 or activate the
alarm if A or B is high and the code is 10.
Note the italicized quasi-Boolean operators, which should aid in writing the Boolean
expression.
25
STEP 3&4: WRITE THE BOOLEAN EXPRESSION & SIMPLIFY
To create a product of 1 for the active control code 10, we need to form the
expresssion . Based on this, the complete Boolean expression for the security
system is
27
STEP 6: DRAW THE CIRCUIT DIAGRAM
There are a total of 4 AND gates and 6 INVERTERS, the circuit can be constructed
with two ICs: one Quad AND gate IC (7408) and one Hex Inverter IC(7404) which
contains six inverters.
A B C D
A.D
Y
~END~
29