Lecture 10
Lecture 10
x D Q A
State equations:
A+ = A∙x + B∙x Q' A'
B+ = A'∙x
Output function: D Q B
y = (A + B)∙x'
Q' B'
CP
Figure 1
Aaron Tan, NUS 4
DONE! 1/0
01 11
Aaron Tan, NUS 9
x D Q A
Q' A'
D Q B
Q' B'
CP
y
Figure 1
Aaron Tan, NUS 12
x K Q'
J Q B
K Q'
Figure 2
CP
Aaron Tan, NUS 14
1 10
01
1
Aaron Tan, NUS 15
J Q A J Q B
K Q' K Q'
CP
y
x
Figure 3
Aaron Tan, NUS 17
01 1/0 11
0/0
Aaron Tan, NUS 18
Q Q+ D Q Q+ T
0 0 0 0 0 0
0 1 1 0 1 1
1 0 0 1 0 1
1 1 1 1 1 0
D Flip-flop T Flip-flop
Aaron Tan, NUS 20
0 Questions:
00 How many flip-flops are needed?
1 How many input variable are
1
there?
1
01 11
0 Answers:
0 Two flip-flops.
1
10 Let’s call them A and B.
One input variable.
0
Let’s call it x.
Aaron Tan, NUS 22
Aaron Tan, NUS 23
A' A B' B
Q' Q Q' Q
K J K J
CP
KA JA KB JB
A' Combinational
A External
B circuit output(s)
B' (none)
x
External
What are to input(s)
go in here?
Aaron Tan, NUS 24
▪ Logic diagram:
A
B
Q' Q Q' Q
K J K J
CP
x
Aaron Tan, NUS 26
Present Next
state Input state Output
A B x A+ B+ y
0 0 0 0 0 0
0 0 1 0 1 1
0 1 0 1 0 0
0 1 1 0 1 0
1 0 0 1 0 0
1 0 1 1 1 1
1 1 0 1 1 0
1 1 1 0 0 0
Aaron Tan, NUS 27
x
Aaron Tan, NUS 28
D Q A
x
Q' A'
D Q B
Q' B'
CP
y
Aaron Tan, NUS 29
Cx C Cx C
AB 00 01 11 10 AB 00 01 11 10
00 X X 0 0 00 X X X X
01 0 1 1 0 01 X 0 0 X
B B
11 X X X X 11 X X X X
A A
10 X X X 0 10 0 0 0 1
SA = B∙x RA = C∙x'
x x
Cx C Cx C
AB 00 01 11 10 AB 00 01 11 10
00 X X 1 0 00 X X 0 X
01 X 0 0 0 01 0 1 1 1
B B
11 X X X X 11 X X X X
A A
10 0 0 0 0 10 X X X X
SB = A'∙B'∙x x x RB = B∙C + B∙x
Aaron Tan, NUS 31
Cx C
AB 00 01 11 10
00 X X 0 0
01 0 0 0 0
B
11 X X X X
A
10 0 1 1 0
y = A∙x
x
Aaron Tan, NUS 32
R Q' A'
S Q B
R Q' B'
S Q C
R Q'
CP
Aaron Tan, NUS 33
7. Memory (1/4)
▪ Memory stores programs and data.
▪ Definitions:
▪ 1 byte = 8 bits
▪ 1 word: in multiple of bytes, a unit of transfer between main
memory and registers, usually size of register.
▪ 1 KB (kilo-bytes) = 210 bytes; 1 MB (mega-bytes) = 220 bytes;
1 GB (giga-bytes) = 230 bytes; 1 TB (tera-bytes) = 240 bytes.
▪ Desirable properties: fast access, large capacity,
economical cost, non-volatile.
▪ However, most memory devices do not possess all these
properties.
Aaron Tan, NUS 34
7. Memory (2/4)
Memory hierarchy
Fast, expensive
(small numbers),
volatile
registers
main memory
disk storage
Slow, cheap
magnetic tapes (large numbers),
non-volatile
Aaron Tan, NUS 35
7. Memory (3/4)
Data transfer
Address Memory
Up to 2k
0
addressable
Processor 1
locations. 2
k-bit address bus 3
MAR 4
5
n-bit data bus
MDR
:
Control lines
(R/W, etc.)
Aaron Tan, NUS 36
7. Memory (4/4)
▪ A memory unit stores binary information in groups of bits
called words.
▪ The data consists of n lines (for n-bit words). Data input
lines provide the information to be stored (written) into
the memory, while data output lines carry the information
out (read) from the memory.
▪ The address consists of k lines which specify which word
(among the 2k words available) to be selected for reading
or writing.
▪ The control lines Read and Write (usually combined into
a single control line Read/Write) specifies the direction of
transfer of the data.
Aaron Tan, NUS 37
k Memory unit
k address lines
2k words
n bits per word
Read/Write
n data
output lines
Aaron Tan, NUS 38
▪ Read operation:
▪ Transfers the address of the desired word to the address lines.
▪ Activates the Read control line (set Read/Write to 1).
Select
R
Read/Write
Read/Write
Logic diagram Block diagram
Aaron Tan, NUS 40
▪ Logic construction
of a 43 RAM (with
decoder and OR
gates):
Aaron Tan, NUS 41
RAM 1K x 8
S0 0 1024 – 2047
1 DATA (8) (8)
S1 2 ADRS (10)
3 CS
1K x 8
RW
2048 – 3071
Read/write DATA (8) (8)
ADRS (10)
CS
1K x 8
RW
A 19
A 20
2-bit
decoder
512K x 8
memory chip 512k X 8
memory chip D 31-24 D 23-16 D 15-8 D 7-0
▪ 2M 32 memory module
19-bit 8-bit data
address input/output
End of File