Sei sulla pagina 1di 31

Dr.

Mohammed Ghazal

Dominance of digital circuit simplicity
Logic circuits perform operations on digital
signals.
Implemented using electronic circuits.
Binary logic circuits take only two values:
0 and 1.

Figure 2.1 A binary switch
Simplest binary
element is a two-state
switch
Switch is controlled by
input variable x
Open if x = 0
Closed if x = 1

x 1 = x 0 =
(a) Two states of a switch
S
x
(b) Symbol for a switch
Switch turns on/off a
light bulb
Battery provides power
source
Light is an electrical
resistance that emits
light with current
Current flows when
switch is closed (x=1)
Circuit behavior
governed by switch
control (i.e., x)

Figure 2.2 A light controlled by a switch
(a) Simple connection to a battery
S
x
(b) Using a ground connection
as the return path
L
Battery Light
x
Power
supply
S
L
L(x) = x
Output is defined as
state of light (L)
If light is on, L=1
If light is off, L=0
What is the state of the
light as a function of the
input?
L(x) = x
Called logic expression:
describes the output as
function if the input
Also a logic function

Figure 2.2 A light controlled by a switch
(a) Simple connection to a battery
S
x
(b) Using a ground connection
as the return path
L
Battery Light
x
Power
supply
S
L
L(x) = x
Circuit found in ordinary
flashlight (switch is
mechanical)
In an electronic circuit,
switch is a transistor and
the light is an LED
Power supply is kind of
fixed (5V)
One side of power is
connected to ground
ground connection used
as return path for the
current, to close the
loop.

Figure 2.2 A light controlled by a switch
(a) Simple connection to a battery
S
x
(b) Using a ground connection
as the return path
L
Battery Light
x
Power
supply
S
L
L(x) = x
What if we use two switches to
control the output?
Switches can be
connected in
series or in
parallel

With series light is
on if both are on

With parallel light
is on if one of he
switches is on
Figure 2.3 Two basic functions
(a) The logical AND function (series connection)
S
x
1
L
Power
supply
S
x
2
S
x
1
L
Power
supply S
x
2
(b) The logical OR function (parallel connection)
Light
Light
L(x
1
, x
2
) = x
1
x
2
L = 1 if x
1
= 1 and x
2
= 1
L = 0 otherwise
L(x
1
, x
2
) = x
1
+ x
2
L = 1 if x
1
= 1 or x
2
= 1
L = 0 otherwise
Figure 2.3 Two basic functions
(a) The logical AND function (series connection)
S
x
1
L
Power
supply
S
x
2
S
x
1
L
Power
supply S
x
2
(b) The logical OR function (parallel connection)
Light
Light
L(x
1
, x
2
) = x
1
x
2
L = 1 if x
1
= 1 and x
2
= 1
L = 0 otherwise
L(x
1
, x
2
) = x
1
+ x
2
L = 1 if x
1
= 1 or x
2
= 1
L = 0 otherwise
AND Operator
OR Operator
The building block of all logic circuits
Figure 2.4 A series-parallel connection
S
x
1
L
Power
supply S
x
2
Light
S
x
3
L(x
1
, x
2,
x
3
) = (x
1
+ x
2
) x
3
More complex logic functions can result from
Combining anding/oring
Previously, positive
action when the switch
is closed (x=1)
Equally interesting,
positive action when
the switch is opened
(x=0)
Figure 2.5 An inverting circuit
S
x
L
Power
supply
R
L(x) = x
L = 1 if x = 0
L = 0 if x = 1
Previously, positive
action when the switch
is closed (x=1)
Equally interesting,
positive action when
the switch is opened
(x=0)
Figure 2.5 An inverting circuit
S
x
L
Power
supply
R
L(x) = x
L = 1 if x = 0
L = 0 if x = 1
Why the resistor?
Previously, positive
action when the switch
is closed (x=1)
Equally interesting,
positive action when
the switch is opened
(x=0)
Figure 2.5 An inverting circuit
S
x
L
Power
supply
R
L(x) = x
L = 1 if x = 0
L = 0 if x = 1
Function is the inverse of
the input. Complement is
the more appropriate term
Previously, positive
action when the switch
is closed (x=1)
Equally interesting,
positive action when
the switch is opened
(x=0)
Figure 2.5 An inverting circuit
S
x
L
Power
supply
R
L(x) = x
L = 1 if x = 0
L = 0 if x = 1
In CAD tools, the bar symbol for
not is not easy to do,
alternatives x, !x, ~x, NOT x
( ) ( ) ( )
2 1 2 1 2 1 2 1
2 1 2 1
2 1 2 1
NOT !
) , (
) , (
x x x x x x x x
x x x x f
x x x x f
+ = + =
'
+ = +
+ =
+ =
Consider the output at all
possible input
combinations
Combination of logic values
valuation
Useful for depicting
information involving logic
functions
Uses to show validity of
function relations
Grow in size exponentially
with the number of inputs
Figure 2.6 A truth table for AND and OR
Figure 2.7 Three-input AND and OR
How many valuations do we have in a
three-input truth table?
ANDing/ORing/Complement implement any digital function
These operations can be implemented with transistors and
are called logic gates
Logic gates: multiple inputs, one output
Larger circuits are implemented using a network of gates
Complexity a given network has direct impact on its cost
We always want to reduce the cost
Important to implement logic circuits as inexpensively as
possible
There exists many implementation for any logic circuit
We aim at the simpler (hence cheapest one)
x
1
x
2
x
n
x
1
x
2
. x
n
+ + +
x
1
x
2
x
1
x
2
+
x
1
x
2
x
n
x
1
x
2
x
1
x
2

x
1
x
2
. x
n

(a) AND gates
(b) OR gates
x
x
(c) NOT gate
Figure 2.8 The basic gates
Figure 2.9 An OR-AND function
x
1
x
2
x
3
f x
1
x
2
+ ( ) x
3
=
Digital System Designer faces two issues:
Determine the function of an existing network (analysis
process)
Designing a new network that implements a desired
function (synthesis process).
One form of analysis is finding the truth table
Does not consider the order by which the valuations
are received
We can incorporate the order using timing diagrams
Idealized only when considering the functional behavior
Assume instantaneous response to the input signal change
Not a valid assumption. Why?
Can also be generated for you by the CAD tools

x
1
x
2
1 1 0 0
f
0 0 0 1
1 1 0 1
0 0 1 1
0 1 0 1
(a) Network that implements f x
1
x
1
x
2
+ =
x
1
x
2
f x
1
x
2
, ( )
0
1
0
1
0
0
1
1
1
1
0
1
(b) Truth table for f
A
B
Figure 2.10 a Logic network
1
0
1
0
1
0
1
0
1
0
x
1
x
2
A
B
f
Time
(c) Timing diagram
1 1 0 0 0 0 1 1
1 1 0 1
0 1 0 1
g
x
1
x
2
(d) Network that implements g x
1
x
2
+ =
Figure 2.10 b Logic network
Which one do we choose? Why? Can we find out by algebraic
manipulations?
x
1
x
2
1 1 0 0
f
0 0 0 1
1 1 0 1
0 0 1 1
0 1 0 1
(a) Network that implements f x
1
x
1
x
2
+ =
A
B
1 1 0 0 0 0 1 1
1 1 0 1
0 1 0 1
g
x
1
x
2
(d) Network that implements g x x + =
1849, George Boole published a scheme for
describing logical thought and reasoning.
In 1930s, Claude Shannon applied Boolean
algebra to describe circuits built w/switches.
Boolean algebra provides the theoretical
foundation for digital design.
1. 0 0 = 0 1 + 1 = 1
2. 1 1 = 1 0 + 0 = 0
3. 0 1 = 1 0 = 0 1 + 0 = 0 + 1 = 1
4. if x = 0 then x = 1 if x = 1 then x = 0
5. x 0 = 0 x + 1 = 1
6. x 1 = x x + 0 = x
7. x x = x x + x = x
8. x x = 0 x + x = 1
9. x = x
Axioms and theorems listed in pairs to show
principle of duality.
Given a logic expression, its dual is found by
exchanging + operators and operators and
0s ands 1s.
The dual of any true statement is true
Why important? Simplify networks to reduce
costs
5,8,10,12 Huntingtons Basic Postulates
Figure 2.11 Proof of DeMorgans theorem

Potrebbero piacerti anche