Digital Computer Fundamentals PPT
Digital Computer Fundamentals PPT
Logic Gates
Boolean Algebra
Map Specification
Combinational Circuits
Flip-Flops
Sequential Circuits
Memory Components
Integrated Circuits
Logic Gates
LOGIC GATES
Digital Computers
- Imply that the computer deals with digital information, i.e., it deals
with the information that is represented by binary digits
- Why BINARY ? instead of Decimal or other number system ?
1 7
6
5 signal
4
3 range
2
0 1
0
binary octal
0 1 2 3 4 5 6 7 8 9
* Consider the calculation cost - Add 0 0 1 2 3 4 5 6 7 8 9
1 1 2 3 4 5 6 7 8 9 10
0 1 2 2 3 4 5 6 7 8 9 1011
3 3 4 5 6 7 8 9 101112
0 0 1 4 4 5 6 7 8 9 10111213
1 1 10 5
6
5 6 7 8 9 1011121314
6 7 8 9 101112131415
7 7 8 9 10111213141516
8 8 9 1011121314151617
9 9 101112131415161718
Logic Gates
Binary Binary
Digital Digital
. Gate Output
Input .
Signal . Signal
- Truth Table
- Boolean Function
- Karnaugh Map
Logic Gates
COMBINATIONAL GATES
Name Symbol Function Truth Table
A B X
A X=A•B 0 0 0
AND B
X or
X = AB
0
1
1
0
0
0
1 1 1
A B X
A 0 0 0
OR X X=A+B 0 1 1
B 1 0 1
1 1 1
A X
I A X X = A’ 0
1
1
0
A X
Buffer A X X=A 0 0
1 1
A B X
A 0 0 1
NAND X X = (AB)’ 0
1
1
0
1
1
B 1 1 0
A B X
A 0 0 1
NOR X X = (A + B)’ 0 1 0
B 1 0 0
1 1 0
A X=AB A B X
XOR X or 0 0 0
Exclusive OR 0 1 1
B X = A’B + AB’ 1 0 1
1 1 0
A B X
A X = (A B)’
XNOR X or
0
0
0
1
1
0
Exclusive NOR
or Equivalence B X = A’B’+ AB 1 0 0
1 1 1
Boolean Algebra
BOOLEAN ALGEBRA
Boolean Algebra
Truth Table
- Table that describes the Output Values for all the combinations
of the Input Values, called MINTERMS
- n input variables → 2n minterms
Boolean Algebra
x y z F
0 0 0 0
Truth 0 0 1 1
Table 0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Boolean F = x + y’z
Function
x
F
Logic y
Diagram
z
Boolean Algebra
EQUIVALENT CIRCUITS
(2) A
B
C F
(3) A
B
F
C
Boolean Algebra
COMPLEMENT OF FUNCTIONS
A Boolean function of a digital logic circuit is represented by only using
logical variables and AND, OR, and Invert operators.
A,B,...,Z,a,b,...,z A’,B’,...,Z’,a’,b’,...,z’
(p + q) (p + q)’
AND OR
OR AND
SIMPLIFICATION
Truth Boolean
Table Function
Unique Many different expressions exist
Simplification from Boolean function
Truth
Table
Simplified
Karnaugh Boolean
Map Function
Boolean
function
Map Simplification
KARNAUGH MAP
1 0 1 1 1 1
F(x) = (1)
1-cell
x
x y F
y 0 1 x0 1
0 0 0 0 0 1 y
0 1 1 0 0 1
1 0 1 1 2 3
1 1 1 1 1 0
F(x,y) = (1,2)
Map Simplification
KARNAUGH MAP
x y z F
0 0 0 0
yz y yz
0 0 1 1
0 1 0 1 x 00 01 11 10 x 00 01 11 10
0 1 1 0 0 0 1 3 2 0 0 1 0 1
1 0 0 1 x 1 4 5 7 6
1 0 1 0 1 1 0 0 0
1 1 0 0 z
1 1 1 0 F(x,y,z) = (1,2,4)
wx w
uv 00 01 11 10
u v w x F
0 0 0 0 0
0 0 0 1 1 00 0 1 3 2 v
0 0 1 0 0
0 0 1 1 1 01 4 5 7 6
0 1 0 0 0
u 11
12 13 15 14
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0 10 8 9 11 10
1
1
0
0
0
0
0
1
1
1
x
1 0 1 0 0 wx
1 0 1 1 1 uv 00 01 11 10
1 1 0 0 0 00 0 1 1 0
1 1 0 1 0
1 1 1 0 1
1 1 1 1 0 01 0 0 0 1
11 0 0 0 1
10 1 1 1 0
F(u,v,w,x) = (1,3,6,8,9,11,14)
MAP SIMPLIFICATION - 2 Map Simplification
ADJACENT CELLS -
Rule: xy’ +xy = x(y+y’) = x
Adjacent cells
F(x,y) = (2,3)
= xy’+ xy
=x
MAP SIMPLIFICATION - MORE Map Simplification
u’v’w’x’+u’v’w’x+u’vw’x’+u’vw’x+uvw’x’+uvw’x+uv’w’x’+uv’w’x
= u’v’w’(x’+x) + u’vw’(x’+x) + uvw’(x’+x) + uv’w’(x’+x)
= u’(v’+v)w’ + u(v’+v)w’
= (u’+u)w’ = w’
wx
uv w uv w V’
1 1 1 1 1 1
w’
1 1
v v
1 1
u u 1 1 1 1 u
1 1 1 1 1 1
x x
Map Simplification
MAP SIMPLIFICATION
wx
uv 00 01 11 10 w
00 1 1 0 1 1 1 0 1
01 0 0 0 0 0 0 0 0
v
11 0 1 1 0 0 1 1 0
10 0 1 0 0 u
0 1 0 0
x
F(u,v,w,x) = (0,1,2,9,13,15)
(0,1), (0,2), (0,4), (0,8) Merge (0,1) and (0,2)
Adjacent Cells of 1 --> u’v’w’ + u’v’x’
Adjacent Cells of 0 Merge (1,9)
(1,0), (1,3), (1,5), (1,9) --> v’w’x
... Merge (9,13)
... --> uw’x
Adjacent Cells of 15 Merge (13,15)
(15,7), (15,11), (15,13), (15,14) --> uvx
x’
y’ x
z’
x’ z
y F F
z’ y
x
y z
z’
I AND OR
Map Simplification
F(x,y,z) = (0,2,6) y
F’ = xy’ + z
1 0 0 1 z
x 0 0 0 1 F = (xy’)z’
= (x’ + y)z’
x z
y’
x
y
F
z
I OR AND
Map Simplification
IMPLEMENTATION OF K-MAPS
- Don’t-Care Conditions -
In some logic circuits, the output responses
for some input conditions are don’t care
whether they are 1 or 0.
x
F
y
z
Combinational Logic Circuits
Multiplexer
Encoder
Decoder
Parity Checker
Parity Generator
etc
Combinational Logic Circuits
MULTIPLEXER
4-to-1 Multiplexer
Select Output
S1 S 0 Y
0 0 I0
0 1 I1
1 0 I2
1 1 I3
I0
I1
Y
I2
I3
S0
S1
Combinational Logic Circuits
ENCODER/DECODER
Octal-to-Binary Encoder
D1 A0
D2
D3 A1
D4
D5 A2
D6
D7
2-to-4 Decoder
D0
E A1 A0 D0 D1 D2 D3 A0 D1
0 0 0 0 1 1 1
0 0 1 1 0 1 1 D2
0 1 0 1 1 0 1
0 1 1 1 1 1 0
1 d d 1 1 1 1 A1 D3
E
Flip Flops
FLIP FLOPS
Characteristics
- 2 stable states
- Memory capability
- Operation is specified by a Characteristic Table
1 0 0 1
0 1 1 0
0-state 1-state
In order to be used in the computer circuits, state of the flip flop should
have input terminals and output terminals so that it can be set to a certain
state, and its state can be read externally.
R S R Q(t+1)
Q 0 0 Q(t)
0 1 0
1 0 1
S Q’ 1 1 indeterminate
(forbidden)
Flip Flops
In a large digital system with many flip flops, operations of individual flip flops
are required to be synchronized to a clock pulse. Otherwise,
the operations of the system may be unpredictable.
R
Q
c
(clock)
S Q’
S Q S Q
c c
R Q’ R Q’
operates when operates when
clock is high clock is low
Flip Flops
P(preset)
R Q
c
(clock)
S Q’
clr(clear)
S P Q S P Q
c c
R clr Q’ R clr Q’
S P Q S P Q
c c
R clr Q’ R clr Q’
Flip Flops
D-LATCH
D-Latch
Forbidden input values are forced not to occur
by using an inverter between the inputs
D Q
Q
E
(enable) E Q’
Q’ D Q
D(data)
D Q(t+1) E Q’
0 0
1 1
Flip Flops
Characteristics
- State transition occurs at the rising edge or
falling edge of the clock pulse
Latches
POSITIVE EDGE-TRIGGERED
D-Flip Flop
D S1 Q1 S2 Q2 Q D Q
SR1 SR2
C1 C2 D-FF
R1 Q1' R2 Q2' Q' C Q'
C
SR1 inactive
SR2 active
SR2 inactive SR2 inactive
SR1 active SR1 active
JK-Flip Flop
J S1 Q1 S2 Q2 Q J Q
SR1 SR2
C1 C2 C
K R1 Q1' R2 Q2' Q' K Q'
C
T-Flip Flop: JK-Flip Flop whose J and K inputs are tied together to make
T input. Toggles whenever there is a pulse on T input.
Flip Flops
CLOCK PERIOD
Usually, digital circuits are sequential circuits which has some flip flops
FF FF ... FF
C
Combinational .
.
. Logic .
. Circuit .
Combinational
FF Logic FF
Circuit
FF Setup Time
FF Delay Combinational logic Delay FF Hold Time
td
ts,th
clock period T = td + ts + th
Sequential Circuits
DESIGN EXAMPLE
Design Procedure:
Specification State Diagram State Table
Excitation Table Karnaugh Map Circuit Diagram
Example: 2-bit Counter -> 2 FF's
x=0 current next
state input state FF inputs
00 A B x A B Ja Ka Jb Kb
x=1 x=1 0 0 0 0 0 0 d 0 d
0 0 1 0 1 0 d 1 d
x=0 01 11 x=0 0 1 0 0 1 0 d d 0
0 1 1 1 0 1 d d 1
x=1 1 0 0 1 0 d 0 0 d
x=1 1 0 1 1 1 d 0 1 d
10 1 1 0 1 1 d 0 d 0
x=0 1 1 1 0 0 d 1 d 1
B B B B
d d d d
1 x d d x 1 d x d 1 x
d d 1 1 d x A B
A A A d 1 J Q J Q
A
d d d d C C
Ja Ka Jb Kb K Q' K Q'
clock
Ja = Bx Ka = Bx Jb = x Kb = x
Sequential Circuits
Clock
I0 I1 I2 I3
Shift Registers
Serial Serial
D Q D Q D Q D Q Output
Input C C C C
Clock
Q Q Q Q
D C D C D C D C
A0 A1 A2 A3
Q Q Q Q
J K J K J K J K
Clock
Counter
Enable
Output
Carry
Memory Components
MEMORY COMPONENTS
0
Logical Organization
words
(byte, or n bytes)
N-1
Random Access Memory
k address lines
2k Words
Read (n bits/word)
Write
m x n ROM
(m=2k)
TYPES OF ROM
ROM
- Store information (function) during production
- Mask is used in the production process
- Unalterable
- Low cost for large quantity production --> used in the final products
INTEGRATED CIRCUITS