Professional Documents
Culture Documents
llad1e lhaeK
.:.-
Understanding
Digital
Electronics
ltafl1e lhaeK
M A DIVISION OF TANDY CORPORATION
FT. WORTH. TEXAS 76102
This hook was dei,eloped hy:
The Staff of the Texas Instruments Learning Center
P.O. Box 225012 MS-54
Dallas, Texas 75265
W-i:th conttibutions by:
Jim Allen
Gene Marcum
Frank Walters
Ralph Oliva
Appreciation is expressed to Walt Matzen,
Phil Miller, Marcus Allen, Kirk Allen, and
Doug Luecke for their valuable comments.
De.~ign and artwork by:
Schenck, Plunk & Deason
ISBN 0-895 12-017-8
Library of Congress Catalog Kumber: 78-57024
IMPORTANT
Texas Instruments makes no warranty, either express or implied,
including but not limited to any implied warranties of merchantability
and fit ness for a particular purpose, regard ing these materials and makes
such materials available solely on an "as-is" basis.
In no event shall Texas Instrum ents be liable to anyone for special,
collateral, incidental, or consequential damages in connection with or
arising out of the purchase or use of these materials and the sole and
exclusive liability to Texas Instruments, regardless of the form of action,
shall not exceed the purchase price of this book.
Copyrii;ht c' 1978 Texas Instrumen ts lncorporaled, All rights Reserved
Unless otherwise noted, this publication, or parts thereof, may not be reproduced in
any form by photographic, electrostatic, mechanical, or any other method , for an y use,
including information storage and retrieval.
For condition of use and permission to use materials contained herein for publication
i n other than the English language, apply to Texas Instrumen ts Incor porated.
For permissions and other rights under this copyright, please write T exas Instruments
Learning Center, P.O. Box 225012 MS-54, Dallas, T exas 75265.
Foreword. . IV
Preface v
Chapter Page
1 Let's Look At A System. . 1-1
Quiz 1-27,28
2 How Digital Circuits Make Decisions . . 2-1
Quiz . 2-23, 24
3 Building Blocks That Make Decisions . . 3-1
Quiz 3-18
4 Building Blocks With Mernory. .. 4-1
Quiz . 4-17, 18
5 Why Digital? .. 5-1
Quiz . 5-23, 24
6 Digital Integrated Circui ts . . 6-1
Quiz 6-24
7 Mass Storage in D'igital Systems .. 7-1
Quiz . 7-25, 26
8 How Digital Systerns Function .. 8-1
Quiz 8-30
9 Programmed Digital Systerns . 9-1
Quiz . 9-25, 26
10 Digital Electron ics Today and in the F utu re 10-1
Quiz 10-21,22
Glossary G-1
Index . 1-1
1
Now le t's consider what this calcula t or can do. Turn it on . Press
the "3" key, noting what happens. The result may not seem very
impressive at first - just a matter of a number "3" appearing in the
display, r ight?
What goes on inside a ca lculator?
But ask yourself what made t his "3" appear. Look closely at the
lighted number itself. If your calculat or is li ke most, the "3" consists of
five small lighted segments, out of seven segmen ts that can be lighted.
When all seven segments are lighted, you get an "8". The segments in
your display may be tiny red bars, rows of eve n smaller red dots, larger
g reen bars, or dar k bars not ill um inated. These ar e all different ways
to make the same basic pattern of seven segments.
Now consider what mad e the part icular five segments turn on
t o form the "3". App arently, pressing the "3" key sent some information
somewhere inside t he calcul ator - some informa tion saying, " Remember
number 3." And somewhere inside, something is remember ing "3". And
somehow t his reme mbered "3" is making five particular segments of the
display light up.
Now go through the steps for adding five to the three and
g etting t he total. The particula r keys you press at which times depe nds
on just what kind of calculator you have. Most likely, you pr ess t he "plus"
key, t hen t he "5" key, and finally the "equals" key. Note what happens
as you go through the necessary steps to get t he tot al of five and three.
First, th e "3" was replaced by a "5," right? So where did the
"3" go? Apparently, it was still being remember ed somehow wi t hout being
displayed. And the "5" was lighted up in the same way the "3" was earlier.
If you pressed "plus" befor e the "5," th en something inside had t o
remember you wanted to add the next number . If you pressed "equals"
after the "5," th is ap parently caused the t wo numbers to be added,
because now an "8" is being displayed. But what inside t he calculat or
figured ou t this answer? And what happen ed to the 5 and t he 3? Where
are t hey now?
Obviously, there are some pretty complicated t hings going on
inside this machine, even when we simply add t wo numbers less than
ten. When we have answe red the questions as to how t hese numbers were
transmitted from the keyboard, how they were added, how they were
stored, and how they were formed on the d·i splay, we will have answered
the questions of what a digit al system is, and how it works. So let's get
star t ed.
f!!I = ==
How can we simplify a calculator for study?
Let's limit our discussion at this point to a very simple imaginary
calculator - one that will only add, subtract, multiply, and divide. Its
display will handle numbers with only eight digits (numerals). It won't
work exactly the same way as the calculator in your hand, so you can
put yours down. But keep it handy for reference.
Furthermore, let's say that the electronic circuitry in our example
calculator is the simplest possible to handle these limited tasks. But the
general way t he circuitry works is very much like the operation of most
real calculators that will do more sophisticated things.
First, let's consider the main parts of the machine, as shown
schematically in Figure 1-2. (A "schematic" drawing of a circuit is one
using simple symbols for the various parts and the interconnecting
wires.) The large block at the bottom represents an integrated circuit
- words we'll abbreviate to "IC." The 22 arrows pointing in and out of
t he IC represent wires, and the arrowheads indicate the direction electric
current flows.
Segment Lines "a"' through '"h "' ......._
N INE
CHARACTER
POSIT IONS
IN DISPLAY
Arrow\..
heads
2 3 4 5 6 7 B
Scan Lines are energized one at a time, over & over
p } Keyboard
inputs Segment
tell whether INTEGRATED lines
N either key CIRCUIT control
is ··on" for display d igit
the scan line being
being energized.
energized, Power Supply
+7
l
0 -7
volts volts volts
1
What's an integrated circuit?
Integrated circuits are the main reason digital systems are becoming
more and more sophisticated, compact, and econo mical. They are a method
of mass-producing complicated electronic circuits containing thousands of
transistors, diodes, resistors, capacitors and the interconnecting wires in
an unbelievably tiny form.
Figure 1-3 shows a Texas Instruments calculator integrated
circuit. It's a little package about an inch and a half long, half an inch
wide, and an eighth of an inch thick (38 by 13 by 3 mm), with metal strips
(pins) for electrical terminals. These st rips are connected on the inside to
a little "chip" of semiconductor material called silicon. The chip, which is
about a quarter of an inch square (6mm) and not much thicker than t he
pages of this book, is shown in the enlarged photograph of Figure 1-3. As
you can see, there are so many transistors inter connected with other
components on this chip, packed so close together, that you can 't tell
them apart. Many small calculators have all their electron ic circuitry
packed into just one integrated circuit (not counting the batteries,
keyboard, and display).
That's a brief look at I Cs. We'll explain them further in a later
chap ter. But for now, let's move on with our discussion of the calculator.
What are the calculator parts outside the IC?
Looking back at Figure 1-2, we see 18 little blocks representing
the calculator keys. Under each key is a schematic symbol representing
a switch. One pole (terminal or connection) of each switch is connected
to a horizontal "keyboard input" wire labeled Nor P. The other pole is
connected to a vertical "scan line" wire (numbered 1 t hrough 9). Pressing
a key closes (turns on) a switch for a momen t. This allows electric current
to flow from one of the vertical scan lines to one of the horizon tal
keyboard-input lines
Notice that a custom in schematic diagrams is to use a little black
dot to show when two wi res are connected. If t wo lines representing wires
cross without a dot, they're not connected. Many of these "wires" would
actually be little metal strips on a printed-wiring card. Real wires (or
strips) are not always laid out so straight and neat as they appear in
a schematic diagram.
Above the keys are nine somewhat larger blocks called "character
positions." These blocks form the display, where numbers as long as eight
digits can be shown, in addition to a minus sign and various symbols
for errors. We'll get to these in a moment. But first , let's talk about how
the keys transmit numbers and commands to the IC chip.
~
~
co,,'""'"'""""' '"""" '" 'c ""'"
= = =rm
in a row - no matter how quickly you released the key. (Compared to
digital circuitry, the fastest mechanical switch is as slow as molasses in
January!) And so pulses began arriving at the "N" input line whenever
scan line 3 was supplied power in pulses. These pulses coming at these
particular times told the IC that the "3" key was pressed.
Similarly, when the "plus" key was pressed later on, pulses began
coming in on the "P" line whenever scan line number 3 was energized.
And pressing the "5" key caused pulses on input "N" when scan line 5
was energized.
Pressing a ke y 3 5
transmits
pulses from a
scan line
to a keyboard
input line
N
1234567 8 g
p } SCAN LINES
IC
L------~ N ""'KEYBOARD CHIP
INPUTS
Figure 1-4. Concept of p11/sesfro111 many k eys corning into only t wo input
terminal.~on the IC chip (.(rom F igure 1-2)
f!!I ==--------==
Each LED has two electrical terminals. One terminal on each
LED is connected to the scan line coming up to that character position
from below (bolder lines), and the other terminal is connected to one of
the eight segment lines (lighter lines). To illuminate one LED segment,
both its scan line and its segment line must be turned on by the IC, so
that current can be supplied by the scan line and returned to t he IC by
the segment line. (When a scan line is "on," it supplies electricity. But
when a segnient line is "on," it accepts electricity or "sinks" electric
current.)
As a result of this arrangement, each character posit ion can be
illuminated only when that particular scan line is supplying electricity.
And the character (the number or sy mbol, etc.) that appears at that
position is defined by which segmen t lines are turned on to allow current
to flow. The IC is able to change the combination of active segment lines
every time it energ izes another scan line.
a
b SEGMEN T
c
}
LINES TO
d OTHER
e CHARACTER
I POSITIONS
g
----
h
To other character positions
SCAN SEGMENT
LINES- LINES
Broad arrows
hgfedcb a indicate
SEGMENT DECODER several wires
running
together, showing
DISPLAY REGISTER
flow of information
:E M
c( 0 a:
a:> 0
CJ a:
Oo
"0 ...a:
(.) c(
g: :E
ow
"'
0 _, w
(.) z
a: :E w
u CJ
:i 0
z
"' a: 0 a:
......
"'"'
a:"'
~ ~
u"'
::> -
0"
Ow
c( a: ......
a: Cl
<J! a: a:
c
WI-
a:
~
...
w ~-
cc
a:' u :::>
zt-
0 a:
w w c(
cc ,_
a:
~u
c( c( .J w!!:
ua: .J
ct m I- u
"'~w
0
,_a:
z
"'
.J
c(
::>
"' ~
Cl z
0 Cl
~ u iii
z _,
.:::i 0
...a:z
0
u
AIWn::Hll:J
a: !:>Nl l.nO ll
w
...
Q
a:
c( ,_
II) "'aw
0::> a:
Q
ID II. CJ
> a: >z
w- c(
a: .J
~ c(
II. 0
m " Q
a: w IL
a: a: ,_a:w i-z,_
(!j
' ,_w
c( Q
"'0 > Oo ,_w ~
w mu "'5w c(
Cl) a:
" >z
~w "'5w "'5w a:
zW
o z
a: a: a: u w
0 : Cl
,_a: ~
_,
Q
z
zw
we II. c( !<_,
a: ::>
:E 0
Cl u
ww
"'0 w
a.
0
:E
::>
§
::;;
I
"'
t/)Q (.)
u
c(
<:JW
"'~
Cfl--1
Fig u re 1-6. Simp/1fi ed diagram of the major subsystems in the e.ra mple
calculator, and pa th1N1y8for info rmation a.nd numbers among the
su bsystems.
= ==
How are the subsystems controlled?
f!fl
The first thing to understand is thal all t he subsystems are
directly linked to the "controller" subsystem by a network of electrical
conductors that are not fully shown in Figure 1-6. The job of t he controller
is to tell each subsystem when to act, and what to do. And the controller,
in turn, acts merely as an interpreter of inst ruct ions that it draws one
at a time from a place where they were stored when the chip was made
- a place called the " microprogram memory."
ADDRESS R EGISTER
MICROPROGRAM
CONTROLLER
MEMORY
Figur e 1-7. The controller sto re.~ the desired 1:ru;lrnction address in the
add ress register. The micr&pro,qram mernory subsyslern responds by storing
the -instruction in the instruct·ion reg·i st.er.
f!fl =--==---:---
Each instruction that t he controller looks up t his way governs
its actions for a period of time called one " inst ruction cycle." An
instruction cycle corresponds to the time during wh ich one scan line is
energized - about 100 microseconds (100 millionths of a second). At the end
of each instruction cycle, the controller draws (Fetches) another instruct ion
for the next cycle - stepping along one instruction at a t ime every cycle.
If t he current instruction doesn't tell the controller how to decide which
instruction to use next , t he con troller automatically picks t he one at the
next address in sequence in t he microprogram memory.
Ti me signa ls l o all other subsystems
0 000 1
SECOND
\ / High Voltage
!---'-I
q,J ~ Low Voltage
¢2 __JL__n__J
Phase Phase Phase ¢1~
1 2 3
<Il l <1> 2 <1>3 TIMING RELATION OF
CLOCK GENERATOR PULSES IN EACH NETWORK
DISPLAY REGISTER
OPERAND REGISTER
ACCUMULATOR REGISTER
Figure 1-9. When the calculator is turned on, the controller sends a
control signal to clear unwanted information from these storage registers.
In the next instruction cycle, automatically stepping to the next
instruction in the microprogram memory (number 1), the controller is told
(all in digital code, of course): "Check for signals from the keyboard. If
you don't see any signal, follow the same instruct ion again. But if you do
see a signal, go on to the next instruction. " And so until a keyboard input
signal arrives, the controller doggedly sticks to this "keyboar d-checking"
instruction for cycle after cycle, in ti me with the beats of the clock sig nals.
The controller is in what we call the "idle routine." All step-by-step
sequences of instructions that it follows in doing various tasks end in this
routine.
Meantime, while the controller is busy doing this, the "scan
generator" subsystem (shown back in Figures 1-5 and 1-6) is humming
along all by itself, paying no attention to the controller. It's busy counting
clock signals, and turn ing on one scan line after another (as we have
already discussed) at the beginning of each 100-microsecond instruction
cycle.
And over to the right in Figure 1-5, the "segment decoder"
subsystem is doing its own thing, too. Its job is to keep the display
illuminated with the num ber digits t hat are pr esently stored in the
"display register" subsystem, by turning on the appropriate segment lines
to receive current at the r ight times. (The display register is a temporary
storage place for an 8-digi t number, complete wi th decimal point and
minus sign, if any.) Every time a new scan line comes on, t he decoder looks
at the next digi t position in the display register, and figures out which
segment lines to turn on to show this digit in its position in the display. It
automatically leaves out an y zeroes at the beginning of any stored
number, except that it does show you one zero and a decimal point if the
register has no number in it-that is, if the regist er is empty. So that's
what it's showing now as we begin to add 3 and 5.
UND ERSTANDING D IGITAL ELECTRON l(,'S 1-13
~ ====================-====-=======L=~=T=~=L=O=O=K=A=T=A=S=Y=ST=E=M====:====
I. .
What happens when we press the " 3 " key?
So- we press the "3" key. (See Figure 1-10). Nothing happens
until the scan gene rator turn s on scan line number 3. Then a signal is
transmitted in keyboard input line N to t he "keyboard ent:oder"
subsystem. Knowing which sca n line is on , the en coder ge nerates a
number "3"-not in the way you would write it on paper hut in a special
code so that it can be electroni cally tra nsmitted to the display reg ister an d
stored t he re. Recall t hat we talked earlie r about "remembering a 3" -well,
t he display r eg ister is what does that.
KEYBOARD
I'
Ke yboard t SCAN LINE =3
SCAN GENERATOR
Input
Line .. N ..
.. N UMBER REAov·· SIGNAL
KEYBOARD CONTROLLER
ENCODER
FLAG REGISTER f4o-..i ~___,.~~~~~~
Number .. 3""
Transmitted - .. STORE"" SIGNAL
In Code
Register Automahcally
0000 0 00 - - puts ··r 1n tar right end
DISPLAY REGISTER
DISPLAY
0 0 0 0 0 0 0 514---~ ....
REGISTER
' \' \ " 3" IS
I I copied
I
,.,. / I 1n10
OPERAND
REGISTER • operand
register
ROUTING
SUBSYSTEM
ACCUMULATOR 0 0 0 0 0 0 0 014----i
REGISTER
D ECIMAL
POINT
D IGITS NUMBER DIGI TS
DISPLAY
0 0 0 0 0 0 0 0 8 REGISTER
OPERAND
0 0 0 0 0 0 0 0 3 REGISTER
ACCUMULATOR
0 0 0 0 0 0 0 0 8 REGISTER
1
How can electricity transmit numbers?
So there you ha,·e a ge ner al pict ure of how t he calculator goes
about its business. You\·e seen a ll the maj or parts of the syste m, an d how
t hey work together. We \·e come a long way in understanding many of t he
th ings a typical di gital system does.
Or course, we ha,·e not corered all the possible
complica tions-such as e ntering decimal points and minus signs. And we
haven't cove red subtraction, multiplication, a nd divis ion. But the fact is
t hat all these matters are hand led by the very same subsyst ems we have
already watched in operation . They're managed by appropriate steps,
done one at a time, in accordance wi th programmed seque nces of
instructions.
We'll understand more about these operations when we get
further in to the book. But for now, let's more on to finding ou t j ust lw1c
number:,: are repre»enl ed in a dig ital system such as this. We have seen
where the " 3" a nd th e "5" go inside the calculator IC chip, and we
mentioned that the numbers were coded so they could be handled
electronically- hu t just what do they look like inside the IC'?
To be specific, let's zero in on the connec t ion between t he keyboard
encoder and !hi! display register, back in Figure 1-11 . We know t he encoder
generates an electronic code that represents numbers from zero up to
n ine, correspond ing to number keys. In Figure 1-11, we see a broad arrow
leading from the encoder to the display register, indicating a pathway for
numbe rs. So what is thi s pathway like, and how does it work'?
The answer - and the r eason for it-goes back lo our earlier
discovery t hat t he secret of success for digital electron ics is that eve ry job
and every number is broken down into small, simple steps a nd bits. This is
so that the tasks and information can be handled by very simple elect ronic
ci rcuits of the sort that can easily be put t ogether in great quantities in
in tegrated circuits.
SWITCHING
CIRCUITS WIRES LAMPS
POWER _ ___ ! I I
-=sumv I t~i- - Q OFF
POWER _ __ _
_c-SUPPLY
\ I I
-ON
Symbol for connection to "ground.·
a network of wires all over _ /
the system, usually considered
to be at zero volls.
TRANSMITTING RECEIVING
CIRCUIT CIRCUIT
Figure 1-15. Su·itching circuits can receive :;witching sig11a/.~ as tl·ell as
transmit th e111 .
Now, as indicated in Figure 1-15, the kind of switching cir cu its
,,·e're talking about ar e con trolled by one or more in put signals, which are
themseh·es either on or off. This means they can rece fre signals from other
switching circuits. And t his is how n umbers and information are sent
from place to place in our calculator, an d every digital system- by
switching-circu its t urning one another on and off.
What information can a switch send?
Now wait a minute, you may say. What kind of infor mat ion can
you send by turning a switch on a nd off? How can anything this simple
handle t he com plicated kin d of information involved in digita l systems?
Well- it's true that a swit ch can't say much. Bu t it can say
somet hing. For a specific exa mple, look at F igure 1-16. Two n umbers, A
and B, a re being "compared" by the adder-subtracter to see whet her or
not A is greater than B (a job which the adder-subtracter handles simply
by sub tract ion). By switching one wire on or off, the adder-subtracte r can
tell the controller t be answer. "On" means, "Ye.~. A is g reater." And "off"
means, "No, A is not greater."
One wire ca mes "comparison signal" .
ON - YES. A IS GREA TER THAN B.
OFF ~ NO . AIS NOT GREATER THAN 8 .
A
....
....
NUMBERS
TOBE
ADDER-
SUBTRACTER
I - CONTROLLER
COMPARED ....
B ...
Figure 1-16. E:rample of huw rniich information one w ire can carry hy
being switcher!. on or ojf:
UN lJERSTANDINC. DIGITAL E:LECTRONICS 1-19
Lc:T's LooK AT A Svsn:M
1
This is an exam ple of t he /Jasfr um:t nf information in all d igital
syste ms-the very simplest possible sta teme nt t hat can be made. It's just a
specification of one out of two altern ati ves- a ma t te r of yes or no. We call
th is amount of information one "bit. " One r eason th is is a good name is
t hat a bit represents the sma llest possible pir.rr '!f h~fornwt ion. What we
have discovered, t hen, is that at a ny one moment, a switch can transmit
one bit of infonnation. . -
But how can a switch sendi ng one bit help µs with th e proble m
we're attacki ng about how to transmi t 11 1011bers? Whal number can you
send wit h 011e bit of information? We could let "off" represent "one," and
let "on" rep resen t "two"- but what g ood would that do is?
The a nswer is that to t rans mit large r nu mbers than one or t wo,
we simply use more than one ll'ire . This wi ll g ive us a lot of di fferent
combinations or patterns of "on" and "off," and we can let each
combination represent a different number, according to some sort of code.
F igure 1- l 7shows speci fi cally how numbe rs a re transmitted in
ou r example calculator. The "transmit t ing unit" above and the " recei\·ing
unit" below r epresent t he encoder a nd t he the d isplay register back in
F igure 1-11. Furt hermore, these sam e units represent any two subsystems
that transmit and receive numbe rs. They all work t he same wa y in this
pl}rt icular calculator .
TRANSMITTING UNIT
Number Received:
4+ 1 =
5
lEl SYMBOLS
1 AND 0 MEAN
0 0
"ON " AND " OFF "
RECEIVING UNIT
0000 O+O+O+O - 0
0001 0 + 0 + 0 .,. 1
0010 0+0+2+0 2
0 = OFF
t = ON
00 1 1
0100
- 0 + 0 + 2+ 1
0+4+0+0
- 3
4
~0101 - 0+ 4+ 0+t - 5
0 1 10
- 0+4+2+0 - 6
Binary Numbers:
0 11t
100 0
-
-
0 + 4 + 2 + 1
8+0+0+0
-
-
7
8
O and 1 are
Binary Digits ~ O
1 8+0+0 + 1 ~
9 DECIMAL
-
or"Bits" ~ L-----" DIGITS
f!!I = - = ==
In writing an Arabic number, we use ten diffe rent symbols: 0, 1,
2, 3, 4, 5, 6, 7, 8, and 9. These sym bols are called numerals, or digits. A digit
is a position in a number telling how many ones, how many tens, how
many hundreds, and so fort h. This system is also called the "decimal"
system, and the numerals a re called the "decimal digits." Decimal means
something related to t he number ten.
Now " binary" means something related to t he number two, or
something with two parts. In writi ng a number using the binary system,
we only use two sy mbols, 0 and 1. These numerals a re the binary digits.
Each position for a digit in a binary number stands fo r twice wha t t he
next position to the right stands for. So that's what bin ary numbers are.
And by the way, the first and last letters of "binary digit" are
whe re we get the word "bit." (Remember, a bit is t he basic unit of
information in all digital systems-the smallest possible piece of
information.) A bit is a binary digit- a Cor a l.
And so a dig ital system is one that uses digits for all the
inform ation it handles. Even infor mation that has nothing to do with
numbers is reduced to th e.form of numbers usi ng special codes, and the
codes are made out of digits.
You can see that this definition does not limit digital systems t o
those that use binary num bers. For example, old-fashio ned mechan ical
adding mach ines are digital systems that use deci mal digits. They
represen t each pos ition in a number by a gear or bar with ten teeth, so
tha t it can be se t at any one of ten different positions.
To represent numbers purely in decimal fo rm by usi ng electricity,
you wou ld need a diffe re nt voltage level for each of t he ten digits.
Switching circuits that can handle ten differe nt voltage levels are pretty
expensive, howev er. So all modern digital electron ic systems use binary
dig its (zeros and ones), as re presented by very sim ple electr onic circuits
switching on and off. Consequently, whenever we say "digital system"
nowadays, we take it fo r g ranted that we're speaking of binary digital
syste ms.
What a re the four principal functions in digital systems?
Let's press ahead n ow wi t h one more detail of our initial
understanding of d igital electronics. Remember we said early in t he
chapter that to begin our understanding of a digital system by studying a
calculator, we have to learn four things: How numbers a re transmitted as
inputs from t he keyboa rd, how they are stored, how they a re added , and
how t hey a re formed on the di splay as an output.
We're already covered the questions·of transmission, addition,
a nd display. (We haven't yet seen exactly how t he adder-subtracter
manages to add, but we've gotten a good overview of how the system goes
about 1nakin g the additi on take place, and that 's good enough for now.) So
the remaining feature to cover now is storage.
LATCHING
CONTROL
S IGNAL "LATCH"
CIRCUIT
I SENSE
(INPUT)
(CONVERT)
DECIDE
(PROCESS)
ACT
(OUTPUT)
(CONVERT)
(DETECT)
r - ..
I I
I I
I f--------1 I
I I l I
L- I STORE I J
oij ( MEMORY) ~
I I
I ________ _JI
L
f!!I= = - - - = =
How are all systems organized?
And second, all systems are organized in the same fashi on. They
do th eir jobs in the same general steps or stages. First, they sense (or
detect, or accept) information in various forms from the outside world,
and convert it to forms of information that cari be handled in the system.
Then they make decisions based on this in put information-meaning t hey
process or man ipulate the information. In doing so, they may store or
remember some of the information for a time, or process it as a result of
other information stored permanen tly. And fin ally, th ey take t he
resultant new in formation and act on t he outside worl d with it- by
converting it in to external forms of information again, and perhaps by
exerting some cont rolled form of work or energy. Think of any sys tem you
like, and th is univer sal organizat ional concept can be construed to apply to
it.
For example, our calculator's keyboard and encoder sense
information and convert it into an internal form. Various subsystems
deci:de and store. And the segment decoder and display system convert t he
resulting internal information into the desired action of showing you
numbers in the display. This "digital electronic" system, of course, is
handling the information in digi tal form.
How does this distinguish digital systems from others?
The significance of this universal system concept is that it
shows us that digital systems are those that manipulate i nforrnat·ion in
digital form, which we have seen means in the for m of digits -little
separate pieces of information. There's only one other general method
for handling information, and it's called "analog." In Chapter 5, we'll
st udy the differences between these two kinds of information, and the
two kinds of system that result.
And now we really have come a long way! We've moved from a
general understanding of a hand-held calculator, through an
introduction to concepts of digital systems, to a grasp of the uni fyi ng
concepts of all systems. This will provide a background of understanding
as we proceed to dig into digital systems and see Jww they do the things
we've been discussing.
Take a break
As you come to t he end of each chapter, it will be a good idea for
you to stop and take a breather. And before moving on to the next
chapter, go back and study any of the parts t hat weren't clear to you at
first. This is because a lot of the ideas covered in each chapter are
necessary for your comprehension of material in later chapters. The
glossary, and the quiz that follows each chapter, will help you review.
1
Quiz for Chapter 1
1. H ow does t he calculator 4. How ar e operations in all
cir cuitry know which key sybsystems kept in st ep
caused a signal in a keyboard together?
·in put line? a. Each sybsystem has a little
a. There's a differ ent input "clock" unit.
line for each key. b . By control signals from the
b. There's a different scan controller.
line for each key. c. By signals in the scan
c . By noting which scan li ne lines.
is on when the sig nal is d. By timing pulses in three
r eceived. networks called phases.
d. B and C above.
5. When the "equals" key is
2. Why do the numer als in t he pressed, how does t he
display flicker (although controller know which
faster than you can see)? arithmetic operation to
a. They use alternating perform?
current. a. It checks a note it made
b. They're off while the about t his in t he flag
controller re-checks the regist er.
inputs to verify a sig nal b. The cu rrent microprogram
was received. instruction contains t his
c . The segment out puts can informa ti on.
transmit only one numeral c. There's a place in each
at a t ime. number register fo r minus
d. The display register only signs, plus signs,
stores one digit at a time. multiplication signs, and so
3 . How is t he controller able to forth .
do so many different things d . It has already performed
at diffe rent times? t he necessary operation
a. It contains a special, and is just waiting to
different ci rcuit for each display t he result.
job it has to con trol. 6. All the arithmetic in the
b . It really doesn 't control th e
calculator is handled by a uni t
other subsystems - they that can only:
pretty much act
a. Add
independen tly and
b. Subtract
automatically.
c . Com pare t wo numbers
c. It just repeats t he same
d. A and B above
process for each job it has
to do.
d . It's told what to do by
instructions fetched from
th e microprogram memory.
UNDERSTANDING DIG IT AL ELECT!t ON ICS 1-27
LF.:T'S LOOK AT A Svsn:M
1
7 . The switching circuit 11. Which binary number
controlling a wire in a binary represen ts "seven?"
digital system: a. 1111111
a. Is either "on" or "off." b. 7
b. Is often " part-way" on or c. 0777
off. d. 0111
c. Ca n be controlled by other 12. Wh ich of the following
Switching circuits. man ipulate info rmation and
d. A and C above. possibly do work?
8 . A binary switching circuit can a. All systems.
indicate a choice be tween how b. Only digital syste ms.
many al ternatives (in one c. Only binary digital
wire at one moment)? systems.
a . One d. Only elect ronic binary
b. Two digital systems.
c . Te n 13. Which do all systems have in
d. Depends on the circuit common?
design. a. Sensing external
9. What is a "bit" in a digital information.
system? b. Making decisions a nd
a . A binary digit (1 or 0). possibly storing
b. The basic unit of information.
information. c. Acting to produce external
c . The smallest possible piece information and possi bly
of information. work.
d. All of the above. d. All of the a bove.
10. Where do we get the name 14 . Digital systems are those
"digital" electronics? which:
a. You key in numbers wit h a. Sense, decide, store, and
your fingers (digits). act.
b. All digital systems use b. Manipulate information
binary digits (bits). a nd do work.
c . All digital systems use c. Handle information in
some sort of numberical digital form internally.
digits (decimal, binary, d . Deal with digital
etc.) information in the external
d. All digital systems have world.
digital numbe r displays as
in the calculator.
2
How Digital Circuits
Make Decisions
As we begin a new stage in ou r learning process, let's remind
ourselves of what we have covered already, and why we did so.
First , we gained a general familiarity with the operation of a
s imple hand-held calculator. Of all digital systems, the calculator is
perhaps the most fam iliar and intriguing, so it provided a good way to get
us into th is su bject.
And indeed we already are into the subject with both feet. Based
on our study of the calculator, we have grasped the basic organizing
principles that are common to all electronic digital systems. Some of these
principles apply also to all digital systems, whether electronic or not. And
some even encompass anything that we can call a "system" - even if it's
not a digital system.
And this is where we're going to pick up the subject now - with
the universal system organization that we learned in Chapter 1, as we
appl ied it to the hand-held calculator. This will lead us into our topic for
this chapter.
How does the universal organization apply to the calculator?
Figure 2- 1 shows how the various parts and subsystems of the
calculator are categorized according to which of the "universal functions"
they mainly perform - based on whether their primary job is to sense, to
decide, to store, or to act. (There's actually a certain amount of
decision-making involved in all four stages - but decisions are the main
job only in the "decide" section.)
IN TERNAL INFORMATION
EXTERNAL INFORMATION IN NECESSARY UNIFORM E XTERNAL INFORMATION
I
VIA FINGER M OTIONS
SENSE
Keyboard
and
/ DIGITA L ELECTRICAL FORM
::~~~e~.
Adder-Subtracter
Routing Subsystem,
\
,___ _. ,
AS P ATTERNS OF LIGHT
.----
A_C_T_ __, \
Decoder
and
,_____, ,
STORE
Figure 2-1. Suh.~ y.~tems of calculator system from Figure 1-6, rear ranged
to illustrate univer,qal system organization
U s nrn STANlllNG DI GITAL E LECTRO:-l lCS 2-1
- How
• ===
DIG ITA L CIR CU ITS MAKE D ECIS IONS
2
Chances are you pretty well understand how the switches in the
keyboard sense external information from your fingertips, and how the
light-emitting diode display acts to produce new external information in
the form of patterns of light. And our initial picture of how switching
circuits can store information is probably fairly satisfying to you for the
time being. But you probably have some pret ty big question marks in
your h_ead with regard to the decide function. How in t he world can
electrical circuits actually make decisions? Can it be that electric circuits
have some form of intelligence?
Well, of course, they don't. But t his is indeed a natural question.
And it's such a crucial question for digital systems t hat we're going to
devote this entire chapter to it.
What's the simplest example of decisions in the calculator?
Looking back at Figure 2-1, then, let's pi ck a very simple
decision-making unit as an example to study, to hel p us grasp t he main
idea of how digital circuits make decisions. Surprisingly enough, the
simplest example is not in the "decide" stage (We'll postpone studying
these more complicated subsystems un t il later). Instead, the simplest
decisions are made in the keyboard encoder, over in th e "sense" stage.
Figure 2-2 r eminds us of what the encoder's job is, and why this
decision-making unit is classified in the "sense" stage rather t han in the
"decide" stage.
SCAN LINES FROM
SCAN GEN ERA TOR
,,,,,..,..-
---- ---- '
_, B IN ARY NUMBERS \
EXTERNAL
/ TO D ISPLAY I
INFORMATION IN
t R EGISTER /
FINGER MOTIONS -··~ \ /'
KEYBOARD
ENCODER
--- ~
N S IGNALS TO T ELL
KEYBOARD ,___ ___,
p CONTROLLER WH EN
A N UMBER K EY IS
Keyboard-------~ PRESSED AN D WH ICH
Input Lines OPERATION KEY
IS PRESSED
"SENSE" STAGE
Figure 2-2. The "sen .~e" stage of the calculator not only detects finger
motions but also converts the resulting signals to forms suitable for other
subsystems.
The "sense" stage, depicted in Figure 2-2, not only senses or
detect s external information by means of t he switches in the keyboard -
but it also com;erts this information into a form t hat's con venie nt for t he
other subsystems (which we have seen is the electr onic "binary code") by
means of the encoder. This conversion process in volves decisions, as we
will soon see - decisions that a re very well suited for introducing us to
how they are performed.
2-2 U NDERSTA NDING D IG ITAL ELECTRONICS
How
= = =•
D IGITAL C IRCUITS MAKE DECISIONS -
2
What steps are Involved in encoding numbers?
F irst, let's narrow the scope of our study of the encoder. It will be
sufficient for us to find out only how the encoder generates the number
signals to the display register , shown as a broad arrow emphasized by a
circle in Figure 2-2. We wi ll take it for granted that the signals to the
controller, shown further below, are produced in much the same fashion.
(These signals tell t he controller when a number key is pressed - without
saying which on·e - and when each of the "operation" keys is pressed, such
as pl us, equals, and so forth.) So let's inquire into the decisions involved in
encoding keystrokes into binary code.
SCAN L INES
KEYBOARD
INPUT 123456789
i
Li NES
1 J !I!J j j j' PART OF
ENCODER
SUBSYSTEM
N SECTION 1: Which number key
p has been pressed?
0 1 2 3 4 5 6 7 8 9
1
BINARY
2 NUMBERS
SECTION 2: What's the right
TO DISPLAY
code for this number?
4 R EG ISTER
Figure 2-3. The encoder uses two steps in converting keyboard signals into
numbers.
The encoder generates numbers in two steps, and each step will
illustrate a different kind of basic decision-making circuit for us. These
steps are illustrated in Figure 2-.'l as two sections of the encoder.
In the first section, some circuits of one kind decide which
number key has been pressed, accor ding to which of the keyboard-input
lines and scan li nes are "on." The answer is transmitted by turning on one
of t en "number lines" leading down to the second sect ion. Down ther e,
some circuits of the other kind decide which of the four wires leading to
the display register to turn on, to transmit the number according to the
binary code we learned back in Figure 1-18.
UN DERSTANDING DIGITAL ELECTRONICS 2-3
How DIGITAL C IRCl JI TS MAKE DECIS IONS
2
What does an AND gate do?
Let's look into the first sect ion shown in Figure 2-3, and consider
the switching circuit that decides when to turn on the "number one" wire
leading down to th e second section. Figure 2-4 shows what this particular
circuit has to do, and where it gets its input information. Let's consider
t his job carefully, because it's one of the most basic decisions in digital
electronics.
SCAN L INES
12345678 9
"1" key
Is pressed
Switching circuit
must Iurn output
wire on when
input N and scan
line 1 are on
N
SECTION #1
FROM FIGURE 2-3
\
Bold lines are those "on·· - -
when .. , .. key is p1essed
and scan line ·· 1 · · 1s on.
0 1 23"56 7 89
Figure 2-4. The job of the type of switching circ1.cit .foimd in Section 1 of the
encoder shows what an AND gate does.
We want this ci rcu it to turn on the "num ber one" wire whenever
the "one" key is pressed on the keyboard. Remember now - pressing the
"one" key causes keyboard input line N to be "on" when scan line 1 is "on ."
No other keys (such as the other three shown in Figure 2- 4) will make both
these inputs be on at the same time. Therefore, our "number one" switching
circuit must turn on whenever both input N and scan line 1 are "on ."
This circuit may be considered a "coincidence detector ," because
it responds only when it discovers both input signals "on" at the same
time. (Two things happening at the same ti me a re called "concident.")
The ci rcuit can also be considered to be like a gate in a.fence, because an
"on" signal in either in put causes the output to be in the same state as
the other input. This makes it seem as though a "gate has been opened
up" fo r sig nals in the other in put to "pass th rough." But an "off" signal
in one input "shuts t he gate" against signals in the ot her input, causing
the output to remain "off." This idea is where we get the name fo r the
circuit . It's called a "gate." And since there are oth er circuits also called
gates (which we will see in a moment), this kind is called t he AN D gate,
with the "and" spelled in capital letters.
2
How does an AND gate work?
Before we see how all the rest of the t en "number wires" are
turned on by AND gates, let's look at th e idea of how AND gates work,
shown in Figure 2-5.
Regardless of the details of circuit design (which we will study
in due ti me), all AND ga tes fit the men tal picture presented in Figure 2-5.
They all act as though they consisted of electrically-controlled switches
connected "in series" as shown, wit h each switch t urned on by an "on"
signal in a particular input wire. ("In series" means with the same current
passing through both switches.) In this particular example, when "on"
signals in both input N and scan line l t urn on both switches at the same
time, electricity flows from the power supply to the output line. This gives
us t he output signals we want for each of the possible combinations of
input signals, as summarized in the "function table" in the figure. It's as
simple as that.
Customary symbol fo r "ground " - an ·electrical
Output Is on SCAN Une 1
connec tion shared by all circ uits in the system
when scan line 1 and usually considered to b e at zero volts
ANO
keyboard Input line N
are both "on"
\ POWER
SUPPLY
FUNCTION TABLE • +
SCAN 1 N OUTPUT
Fig u re 2-5. General idea of how the A ND gate in preceding figu re works
- -
2
Again, we recogn ize the pattern we will see again and again in
this fi eld: The deci8ions t.hat a system is r equired lo make can be broken up
and subdirided inlv ff l'.I/ s 1:mple deci.~io11s . 'll:hich can bl' handled by r1·ry
si mple electric circ uits (or better sti ll, electronic circui ts) .
What's the customary symbol for the AND gate ?
Now in fini;;hing up our ex plana t ion of how the first section of
our nu mber encoder works, we will need to show seve ral AND ga te;; in a
small space. To avoid having to label each lit t le hox as an AND gate, we
will use the customa ry sy mbol for AND gates, shown in Fig u re 2-ti. Note
that t he output and all input;; are shown, but t he po\\"e r-supply connection
is left off to keep the drawing simple.
" AND" GATE
Tw o OR MORE INPUT S
Output 1s "yes" ( I ) only when
A B C TRUTH TA BLE all in pu1s are I .
FOR 3- IN PUT Ou1put is· ·no " (0) when any
··ANO . GATE one o r more inputs are 0
A B c 0 TRUTH TAB LE
0 D 0 D FOR CIRCU IT IN
FIGURE 2-4. USING
D 0 I 0
POSITIVE LOGIC
0 I 0 0
0 1 1 0 SCAN I N OUTP UT
1 0 0 0 0 0 0
1 0 1 0 0 1 0
a
1 1 0 0 I 0 0
ONE OUTPUT
1 1 1 1 I 1 I
Figure 2-6. Custmnary symbol and precise de.finit ion~/" A ND ga.te. Jn the
encoder, "ON" (higher voltage) means "yes" or 1, and. "u.ff' (lower voltage)
means "no" or 0. whfrh is called "positive logic."
We're taking this opportunity to poin t ou t ;;omething new here in
Pi,gure 2-6: three inputs are shown on this gate (labelled A, B, and C),
rather than two. This is to shov,: you that an AND gat e can have rn.ore tha.n
two inputs.
Another thing new in F i:g ur e 2- fJ is tha t we're showing the
definition of an AN D gate more preci:;ely than before. An AND ga te is
actually defined in terms of the logical meaning of t he inputs and outputs,
in terms of the two basic bits of informat ion a wire can carry, rat her than
in terms of t he electricity itself. As we learned in Cha pter 1, we call t he;;e
hits 1 ("yes," or "true") and 0, ("no," or "false" ).
So to be precise, then , an AND gat e is any cir cuit with t wo or
more inputs and one output, whose output is 1 only when all the in puts a re
1. The output is 0 whe n any one or more in put s are 0. The larger table in
F igu re 2-6 shows what this means in the case of a 3-input AND gate. It's a
list of all the possible input combinations and the resulting out put fo r each
combinat ion. It';; called the "truth table" for a 3-in put AND gate.
2-6 G !\DE RSTA:\lJING D IGITAL Eu;crnONics
2 How 01<;1T.H Crnn=·1=
TS=:\=l=
AK='r.=. =-D-~:1-·1-s·1_m_;·s--====..;:_--=---==== •
2
D IGITAL DECIS IONS
Li[['f}J =-=---==------==--===-=
What you see in front of you in F igure 2- 7 is actually a miniature
digital system, And you actually have learned how it works! From here on,
the design of any digital system is just a matter, essentially, of hooki ng
up the right kind of gates in the right way.
Lines snown bold are "on" 2 3 4 5 6 7 8 9
when "O" key is pressed
and scan hne 1 is "o~n.__.._ _ ___.___--'--l---1----1---+--+--1----+--~
N ~-l---1-----.1-+4~.......i.-~-1-~-l-~-1-~-1-~~
P-~-
0 2 3 4 5 6 7 8 9
"NUMBER LiNEs· · TO SECTIO~ ;: 2 OF ENCODER
Figure 2-7. How AND gate1; are arranged to decide which nurnber key
·i.q pressed. (For key connections, see Figure 1-2.)
How can OR gates finish the decoder's job?
And speaking of the right kind of gates, there's another kind -
just as important as t he AND gate - that will let us design the second
section of t he encode r. You'll remember from Figure 2-3 that the second
section decides which of the four output wires to turn on to make a
number for the display register. Well, this decision is made by several "OR
gates." The entire design for encodi ng numbers - with both section 1 and
section 2 lumped together - is shown in F igure 2-8.
LINES SHOWN BOLD AR E "ON "
KEYBOARD 2 3 4 5 6 7 8 9 - S CAN WHEN " 5 '' KEY IS PRESSED
INPUT
LINES LINES AND SCAN LINE 5 IS " ON"
~---1---l---l.---+----lt.----l----l----lt.---l-----
+
" NUMBER READY " SIGNAL
TO CONTROLLER THAT
A NUMBER KEY IS PRESSEO
0
UJ
"'
::::>a:
: b
~8 NUMBER "5"
_, w
;; UJ
a:
UJ
z
0
I TO DISPLAY
REGISTER
~~
Lr-
:::i -
~ 0 23456 7 89
PART OF KEYBOARD ENCODER SUBSYSTEM " OR" G ATES
I
Figure 2-8. Complete design for encoding numbers, illustrating use uf
AND gat e.~ and OR gates
2-8 U:-< UERSTA:-IDI:-IG DIGITAi. 81.F.CTRO:"ICS
==~
======H=o=w=D=l=G=IT=A=I.=C=IR=C=Ul=TS=M=A=K=E=D=E=Cl=S=IO=N=s ·================== ~
You ca n recogn ize the ten AND gates at the top of Figure 2-8,
just as th ey appeared in the preceding figure. The additional OR gates are
shown along t he right edge of the subsystem. This spearhead shape is the
customary symbol for an OR gate. (Since we're assuming positive logic as
usual, the symbol means a positive OR gate.)
As to just what an OR gate does - you can get a clue by following
th e bold li nes in Figure 2-8. These are the lines that are "on" (1) when the
"five" key is pressed and 0101 is being encoded, which is "five" in the
binary code list ed back in Figure 1-18. (Remember-0101 means4 plus 1
in the electronic code that we have decided to use to transmit numbers
electrically.)
You already understand how one of the AND gates turns on the
vertical "number 5" line inside the encoder. Now notice that this li ne is
connected to two OR gates. It provides one input for the OR gate that
t urns on the 'T' output line, and also one input for the OR gate that turns
on the "4" output line. These are the gates we want to be "on" (1) to
transmit a bi nary 5, right? Notice that when any digit key is pressed, a
certain AND gate transmi ts a 1 to t he OR gates that need to be turned on
to make up the code for that number (4 and 1 for 5 . . . 4 and 2 and 1 for7,
and so forth). So can you see now what an OR gate does?
2
DECISIONS
Li[(@JTo= = = - ==
follow an OR gate's action more closely, refer back to Figure
2-8, and look at the OR gate that turns on the "8" output. This OR gate's
output is 1 when either the "number 8" line OR the "number 9" line is 1.
And of course the reason we use these two number lines as inputs here is
that eight and nine are the only numbers in our binary electron ic code
that have 1 in the "eights" place.
So that's what an OR gate does, and that's how number keys are
encoded. However, if you've been studying Figure 2-8 closely, there's a
feature that may be puzzling you. The "zero" number line does not connect
to any of the four OR gates that generate binary numbers, but instead
ties into another OR gate higher up. Why is this?
What do we want the " zero " key to do?
Well - we don't want the "zero" key to cause a 1 in any of the
binary output lines. To transmit a "zero", these fou r outputs must be 0000,
right?
But what we do need the "zero" number line for is to participate
in alerting the controller whenever one of the ten number keys is pressed,
so the controller can go through the appropriate routines (discussed in
Chapter 1) and tell th e display register to store the number. Remember,
we said that the controller doesn't need to kn ow exactly which number key
is pressed. As you can see in F igure 2-8, this "number ready" signal to the
controller is generated by the uppermost OR gate. This output is 1
whenever either the "zero" number line is 1 (indicating the "zero" key is
pressed) OR input line N is 1 (indicating one of the other number keys is
pressed).
So there you have the desig n of our number-encoder network -
the most impor tant part of the keyboard encoder. The only other function
of the complete subsystem is to recognize when one of the nine
"operation" keys (plus, minus, equals, etc.) is pressed, and to tell the
controller which one. This is done in much the same fashio n as we have
seen for numbers.
This network in Figure 2-8 may not look very significant by
comparison with th e complexity of the ent ire calculator, or some other
digital systems. But it ill ustrates not only the two most important gate
fun ctions, but also the principle of one of the most basic types of
subsystems - one that handles codes. (We'll explor e this principle in more
depth in Chapter 3, with respect to the segment decoder subsyst em.) You'll
learn then that this general pattern of gates is repeated again and again
in many different types of subsystems: a row of AND gates foll owed by a
row of OR gates. Take a good look at it, because it's going to be with you
for a long time.
2
How does an OR gate work?
As for the gates that the encoder has taught you abou t - you've
already got a good mental pictu re of how to t hink of a cir cuit that acts as
an AND gate in terms of positive logic ("high" voltage= 1, "low"
voltage= 0). Figure 2-5 showed us that all you need, essentially, is an
electrically-controlled switch for each input (whether two, th ree, or
more), with the switches arranged in series.
Figure 2-10 provides a similar mental picture of a ci rcuit that's an
OR gate when it's used wit h positive logic. Here again, we have an
electrically-controlled switch for each input (as many inputs as you need,
though only two are shown, labeled A and B.) But the switches are
connected "in parallel" as we see here, rather than in series as in Figure
2-5. So the output would be "on" either when input A is "on" OR when
input B is "on" (or when both are on, of course). You may imagine a lamp
on t he output to indicate when the output is "on."
Output is on when
- - - - - Input A OR Input B - - - -
A is on . B
FUNCTION TABLE •
POWER A B 0
SUPPLY
OFF OFF OFF
+ OFF ON ON
ON OFF ON
ON ON ON
TRUTH TABLE
USING POSITIVE LOGIC
a A B a
0 0 0
0 1 1
Lamp would indicate - 1 0 1
when 0 is "on".
1 1 I
The fun ction table for this circuit is shown at top r ig ht. (The
function table for any digital circuit shows t he electrical state of t he
output for every possible combination of input states.) If we let "on" mean
1 and let "off" mean 0, the/unction table turns in to the truth table on the
right. As you can see, this is t he truth table for a 2- input OR gate.
UNDERS TA KDING Dw1·rAL ELECTRON!(', $ 2-11
- How DIGITA L C1 Rrt11rs M AKE DECISIO!>IS
Li[IJ =-----------~ 2
Do real gates work like this?
Now that you unde rstand what AND gates and OR gates do and
how they can team up to han dl e com plicated decisions, let's move on to the
subject of how real gates work - how t ransistors are hooked togethe r to act
as gates. As it turns out, t ransistors can't simply be inserted into the place
of the switches in Figures 2-5 and 2-10, so let's see just how they are used.
In doing so, we will be chipping in to t he bedrock under the foundation of
digital electron ics that we spoke of earlier. This bedrock is the
semiconductor mate rial of wh ich t ransistors are made - wh ich in t hese
days is the silicon integrated-circui t chip.
Later on , we will see t hat gate circuits can use a ny of a number of
different kinds of transistors. But we're going to limit ourselves right now
to just one kind of transistor - the one that acts most nearly like t he
electrically-controlled switches we have been envisioning. (It's also t he
type used in most calculators.) This is the MOS t ransistor. "MOS" is
pronounced by just saying the letters, li ke M-0-S. In a moment, we'll see
where this name comes from.
What are the parts of an MOS transistor?
Figure 2-11 shows the general idea of the internal construction of
t he par ticular kind of MOS transistor that we're going to study. (The
name of this kind is not important right now, but fo r your information,
th is is an "n-channel en hancement-mode MOS t ra nsistor.") What you see
in Figure 2-11 is a hig hly siµ1 plifi ed a nd magnified picture of an area in
an integrated circuit no bigger than a flyspeck. Dow n below is a pictorial
reminder t hat th is transistor roughly fits the idea of an
electrically-controlled switch that we have bee n imagi ning in ou r gate
circuits. 6-
+ 10 VOLTS
(N-channet
enhancement-mode
MOS transistor)
Elec l ricity is
at zero volls
blocked by N-P
1unction
+ 10 ----+--<Jr- OUTPUT
VOLTS (ZERO VOL TS)
2 = = - - = =Li\r(@J
= We won 't go into semiconductor t heory right now. All we'll say is
that t he main part of the transistor is a bar of silicon co nsisting of two
different t ypes: n-type a nd p-type. (Slight traces of certain other
materials were added to the original pure silicon to make it either n-type
or p-type - each type reacting differ ently to electricity.) Both ends of t he
bar are n-type silicon, a nd in t he middle it's p-type.
On top of the silieon bar, th ere's a layer of silicon oxide. This is a
substance mu ch like glass. It acts as electrical insulation, so no electricity
can pass t hrough this layer. And above the oxide layer is a metal plate.
Now the two n-type areas are the main electrical terminals of our
"switch". Electricity a t ten volts is being supplied to the left terminal,
try ing to get th rough to the output term inal on the right. But at the left
edge of t he p-type region, th e electr icity is blocked by the most basic law
of semiconductor action: electricity (positive electric charge, to be more
specific) cannot flow across the border, or "junction", from n-type material
top-type. (This has to do with then-type material having a more positive
voltage in it than the p- type.) So the transistor is now in t he "off" state.
signal packs
Spark symbols
represent electnc
field from
posit 1ve charge
into plate "'.. j_ ( "M
OS"
positive charge
on plate - -- - - M ETAL
~----,. -0 XIOE
- 5 EMICONOUCTOR
+ tO NEARLY
VOLTS + 10
VOLTS
creates temporary + 10
N-type channel ~ VOLTS
+to _+~~ G II
VOLTS .
+ 10
VOLTS
2
However, the positive charge creates an electric field, which does
exert itself right t hrough the oxide, as a magne t exerts a field through a
sheet of paper to a nail on the other side. This field is suggested by t he
little spark sy mbols. (T here are no actual sparks involved - just an electric
field.)
The effect of t h is electric field on the p-type region is one of the
many remarkable t hings about semiconductors. As if by magic, the upper
part of the p-type gap seems to furn into n-type as long as the positive
charge is maintained on the plate above. Thus, a temporary n-type channel
is fo rmed bet ween the two n-type t erminals, allowing current to flow, and
in effect turning on the transistor. This fact is suggested by th e "switch"
drawing below.
How do you turn an MOS transistor off?
Now to t urn the transistor off again, it's important to note t hat
we have to flip the control switch back to zero volts again. This is because
we have to provide a path.for po.~itive charge to drain out of the metal
plate. If we simply turn ed the control switch off, cutti ng the plate off from
any electrical contact, the positive charge would simply remain on the
plate until it somehow leaked out. So t he t ran sistor wouldn't t urn off for a
while. Th is is an important fact for the design of gate ci rcuits.
Before we move on to gate design, though, notice that Figiire
z- 12 shows us where we get t he name "MOS" that we promised to explai n.
It stands for " metal-oxide-semiconductor". This refers to the "sandwich"
construction of the three materials of MOS transistors - the metal plate,
the oxide layer between, a nd the semiconductor silicon below.
Conlrolled currenl
( positive charge}
flows out main 1erm1nal
on same side
as con trol 1erminal
One thing we'll need in showing gate circuits is a symbol for our
transistor. Figure 2-13 sh ows the customary schematic symbol for the
particular kind of MO S t r ansistor we're using.
2-14 U:<DERSTANDl:-IG DIG ITAL E LECTRON ICS
===~======H=o=w=·D==IG=IT=A=L=C=I=R=C=U=IT=S=~=1A=K='E=D==EC=.l=SI=O=K=S====================~
How does the transistor fit into a switching circuit?
To ill ustra te the idea of using our MOS transistor in a digital
gate, we're first going to take up another switching circuit called the
"inverter". (It's sometimes called the " NOT gate"~ alt hough it can 't ga.te
anything like the AND and OR gates can.) This is a building-block that's
just as basic as the AND gate and the OR gate, although we didn't have
an opportun ity to show it in action in the encoder example.
+ 10 VOLTS
I
ZERO I + 10 VOLTS
VOLTS "OFF"
I
I
I
I
+ 10
VOLTS
""' I
I
I
I
__ _ __JI
ZERO VOLTS
'------+-----l~--" \ C harge to
ZERO turn receiving -=-~Z ER O
VOLTS transistor o ff VO LTS
Figure 2-14 shows two MOS inverters in the two upper boxes,
with the output of the first (left) providing t he input for the second. The
two boxes below give you a mental picture of what these inverters
do, in terms of electrically-cont rolled switches. When an inverter
input is at ten volts as shown on the left below, the output is connected to
a "ground" termi nal at zero vol ts. (The meaning of "ground " was
explained back in F igure 2-5, although we didn't mention it in the text.)
And when an inverter input is at zero volts as shown on t he right, t he
outpu t is connected to the "power supply" terminal above at ten volts.
UN DERSTANDING DIGITAL ELECTRO'.'<ICS 2-15
- How DI GITAL C IRCU ITS MAKF: DECISIONS
~f}J _ ------=- 2
These mental pictures below show us two t hings about t he inverter.
First, its purpose is to change, or "invert'', the incoming signal to the
opposite state. In our MOS circuitry, "on" (1) is ten volts or thereabouts,
and "off" (0) is zero volts or something close to it. The inverter's output is
always the " inverse" (the opposite) of the input. In simpler terms, we
might say that the output is "flipped over" from the input.
The second point illustrated in the lower pa rt of Figu r e 2-1 4 is
lhal an MOS switching circuit must not only be able to .mpply electri city
through its output fo r the "on" st ate, but it must also be able to drain
electricity back ·into the output fo r the "off" state. This is so the output can
turn o.ff an MOS transistor in the receiving circuit, as we have already
learned in studying how an MOS transistor is tu rned off. This
require ment of "two-way" output current applies not only to the inver ter
ci rcuits in Figure 2-1 4, but to all MOS gates, which as we will see are
constru cted very much alike. In fact, it applies to all e/.ectronic digi tal
circuits. Current must be able to move both ways in all signal wires.
Incidentally, even thoug h electricity somet imes flows into an
output of digital ci rcuits, the thing that always fl ows out of an output is
information. The small arrowheads on the signal lines in the diagram
below in Figure 2-14 represent information, not curre nt.
How does an " inverter" circuit work?
Referrin g now to the schematic inverter circuits above in F igure
2- 14, we can see how a 10-volt input signal turns on the lower transistor,
connecting the output to the zero-volt ground as we desire. As for the
upper t ransistor in each inverter (called the "load" transistor) - it is a
very specially-made transistor with a compara tively long and narrow
channel between the two n-t ype terminals. It is always kept "on" by
having its control terminal connected to the 10-volt power supply. But it
can't supply very much current - it chokes back most of the current like
the electrical dev ices we call " resistors".
When the lower or "input" transistor is "off", the load transistor
can supply enough current t hrough the output to charge up the control
plate of a receiving tra nsistor in another circuit rapidly enough (very li ttle
current is required). But when the input t ran sistor is "on'', the small
curre nt supplied by the load transistor is not enough to interfere with the
drainage of charge from th e receiv ing transistor.
INVERTER W HEN INPUT IS 1, O UTPUT Is 0 . TRUTH TABLE
WHEN INPUT IS 0. OUTPUT Is 1
INPUT OUTPUT
O NE INPUT ONE O UTPUT
1 0
0 1
GROUND=
SINGLE C USTOMARY SYMBOL
"="" ZERO VOLTS
Figure 2 -16. MOS two-inpnt positive NAND gate (lef t) and gym.bols f or
N A N D f u nction
F igure 2-16 shows one of these other gate circuits. The schematic
diagram a t the left shows t hat this circuit cons ists essentially of an
inverter (as in Figur e 2-1 4) with not one but two inpu t t.ran.~istors in
series. The bold a rrow shows how the outpu t is connected to ground on ly
when both input trans istors are "or_". (Obviously, we could include more
than two input t r ansistors he re if we need more t han two inpu ts.) So the
output can only be in t he low-voltage state when all t he input t ransistors
a re "on" - t hat is, when all t he inputs are in t he high-volt age state.
Otherw ise, if a ny one or more inputs are in the low-vol tage st a te, the
output is high-voltage.
UJ'.:DE RSTAIW I NG D tr. tTA L E LE\TRUJ'.:ICS 2-17
- How
2
D IGITA L C IRCU ITS MAK E DECISIONS
~[ii ===-=-=
Why do we use " H" and '" L" In function tables?
The action of this gate is shown in the function table left of the
circuit in Figure 2- 16, using "H" for the high voltage or more positive state
(ten volts, we said earlier) a nd "L" for the low-voltage, more negat ive slate
(zero volts, or ground). These sy mbols are typical of function t abl es for all
"real" electronic digi tal circui ts (not just MOS circuits). We can't use "on"
and "off" because the outputs are always on, in a se nse - being connected
either Lo the ground or to the power supply. What distinguishes one
electrical st ate from t he other is r eally t he voltage in a wi re. So "high" (H )
and " low" (L) mean the same thing in real digital ci rcuits as " on" a nd
"off" did in the imaginary "electrically-controlled-switch" circuits tha t we
have found so useful as a learning de vice.
What Is a "NANO" gate?
Anyway - if we use positi ve logic and replace each " H" in the
function table with a 1 an d replace each "L" with a 0, we get the truth
table shown at the rig ht in F igure 2-1 6. This particular digital fun ction is
called "NAND" because the output is just the inverse of that for an AND
gate. NAND stands for "NOT-AND". This truth tabl e can be represented
sy mbolically by an AND gate foll owed by an inverter as shown in the
figure. The single customary sy mbol is a combination of the two symbols
- it's an AND sy mbol with a little circle at the output to sig nify the AND
fun ction is inverted. Sin ce the "real" circuit at the left performs the NAND
function when using positive logic, it's a positive N AND gat e.
OR NOT
A
a
B
EFFECTIVE FUNCTION
Figure 2-1 7. MOS two-inpiit positive NOR gate circu·it (left) and sym.bols
for NORfunct·ion
2-1 8 UN D ERSTAN DING DIG ITAL E l, ECT RON ICS
How
2
DIGITAL CIRC UITS MAKE DECI SIONS
l
N ....~~-+-__....+-.....-1--.....+.-.....~....i>---->--..-l~....i~e-1~~
scan line 5 is ··on ..
""NUMBER READY ..
SIGNAL TO
CONTROLLER
2
0
4
0 2 3 4 5 6 7 8 9
8
N UMBER
0
"5..
DISPLAY R EGISTER
1
TO
Figure 2 -18. How to build the decoder.from Figure 2-8 by using positive
NAND gates and an inverter, as in a real MOS integrated circuit chip
Ir
logic used inside
Figure 2-19. Imagining NAND gates feeding a NAND gate as AND gates
feeding an OR gate
2
9. To decide which gate function 14. A posit ive AND gate's output
an electric circuit with a is "high" on ly when:
certain function table a. All inputs a re "high."
performs, you must first b. All inputs are " low."
decide: c. Only one input is " high."
a. Whether you're using d. One or more inputs a re
posi tive or negative "high."
electricity. 15. Which is the best way to
b. Whether you're using
imagine t he in ternal
positive or negative logic. operation of a positive OR
c. Whethe r the " higher,"
gate?
more positi ve vol tage a. Switches connected in
mean s 1 or0. ser ies.
d. B a nd C above.
b. Switches connected in
10. How many differ ent truth par allel.
tables can be made from one c . MOS t ra nsistors in seri es.
function table? d. MOS t ransistors in parallel.
a. One. 16. The most hasic law of
b. Two.
semiconductor action is t hat
c . Three.
voltage pressure cannot easily
d. Any number.
force positive electr ic cha rge
11. An OR gate's output is 1 to flow across the border from:
when: a. Ann-region to a p-region.
a. All inputs a re 1. b. A p-region to an n-region.
b. All inputs are 0. c. An MOS t ransistor's metal
c. Only one input is 1. "cont rol plate."
d. One or more inputs are 1. d. Any of the above.
12. An AND gate's output is 1 17. What distinguishes one
only when: electrical state from the other
a. All inputs are 1. in all "real" electronic digital
b. All in pu ts are 0. circuits, including MOS
c. Only one input is 1. circu its?
d. One or more inputs are 1. a. Curren t moving or stopped.
13. A positive OR gate's output is b. Ou tpu ts "on" or "off."
"high" when: c. Voltage "high" or " low."
a. All inputs are " high. " d. Any of the above.
b. All inpu ts ar e "low." 18. A positive AN D gate is also a
c. Only one inpu t is "high." negati ve:
d. One or more inputs are a. AND gate.
"hig h." b. NAN D gate.
c. NOR gate.
(Answers 'in b(LCk of the book) d. OR gate.
2-24 UNDERSTAN DING DIGITA i. 1-:u;CTRONI CS
3
BUILDING·BWCKS THAT MAKE DECISIONS
Building-Blocks
That Make Decisions
In Chapter 2, we became familiar with the hasic building-blocks
that make up all digital electronic systems, which are simple little ci rcuits
called "gates" (F igure :J-1). We noted that designing a digital system is
basicall y a matter of putting together large numbers of gates in the right
way. As it turns out, this is a lot like assembli ng a ti nkertoy proj ect from a
few kinds of parts. And so, to proceed with find ing out how digital systems
work, we've got to look into the ways these gates are put together to do
m;o"' jobs==t:=)----
AND
NOT (INVERTER)
NANO NOR
Figure 3-1. Symbols for the 11imple decisions that all digital decisions are
r educed to. Circuits pe1:form i11g these decisions are called "Gates ."
Fortunately for our study of the ways gates are put together,
most digital systems are made up of just a few diffe ren t kinds of "building
blocks" that are themselves made of gates . So in th is chapter and t he next,
we will become farnilar with about seven different kinds of these building-
blocks made of gates. There are ma ny different varieties of each building-
block, but we will learn t he basic principles by looking at a typical example
of each one. Furthermore, there are other kinds of building-blocks than the
ones we'll study. But the ones we'll pick out will resemble the others to a
great extent.
How are digital building-blocks classified?
We're going to organize our study of digital building-blocks into
two parts. First, in this chapter , we'll look at some uni ts t hat don't have
any memory in them. They just make decisions, based on the inputs they
happen to be receiYing a t the moment. (See Pigu re ./-2.) These non-
memory units are called "combinational" circuits, because for every
combination of bits in t he various input wires, t here's a definite,
prearranged com bination in the output wires to be decided upon. The
output co mbination is the same every time a particular input combination
shows up.
UNor:nsTANOING DIGITAL ELErT1<0N1cs 3- 1
~
3
BUILDING- BLOCKS THAT MAKE DECISIONS
~On===
the other hand, the building- blocks that do contain memory
circuits can store information derived from previous combinations of
inputs. So the combin ation of output bits depends not just on the input
signals at the moment, but also on previous combinations of bits. These
"memory-containing" building-blocks a re called "sequent ial" circuits. This
is because the outputs depend on a sequence, or chain of inputs at diffe rent
times. We'll cover sequential building-blocks in Chapter 4.
VARIOUS VARIOUS
INPUT OUTPUT
WIRES W 1AES
j - j
A v - 0
0 B "COMBINATIONAL" w
DIGITAL
- c BUILDING x -
BLOCK -
D y 0
z
(HAS NO MEMORY)
-
Figure 3-2. Definition of a "combinational" digital building block
POSITIVE
CURRENT SUPPLY
TO ALL SEGMENTS
'"O" at an output
means low voltage.
BINARY-CODED DECIMAL allowing current
OR ·· Bco·· NUMBERS to flow 1n through
segment
\
O N ES
z
--9
...o- - ~-~o=/=====-L-L~
0
b t--- - - - -- - 1 - - '
TWOS
c .___0_ __ _ ____, • b
0 y
BCD TO d ...__o___ _ _
0 X 7-SEGMENT (SEGMENT
DECODER e 1-----'----.o--....._-4_ e
OFF)
w 0 d
0 t
gt--- - - - -- --' EXAMPLE:
SEGM EN TS
EXAMPLE
EXA MPLE :
a. b . c , d. f. g .
"9" CODED ARE " ON ."
"9 "" IN ?- SEGMENT
IN BINAR Y FORMING " 9"
CODE (0000 100)
(100 1) CHARACTER
1 = HIGH VOLTAGE
0 - LOW VOLTAGE
X - " DON'T CARE "
ALL POSSIBLE
MEANINGS RESULTING
IN PUT
OF OUTPUT COMBINATIONS
COMBINATIONS
C OMBIN ATIONS
w x y z a b c d e t g
~ un 0 0 0 0 0 0 0 0 0 0 1
0 0 0 1 1 0 0 1 1 1 1
0 0 1 0 0 0 1 0 0 1 0
0 0 1 1 0 0 0 0 1 1 0
0 1 0 0 1 0 0 1 1 0 0
0 1 0 1 0 1 0 0 1 0 0
0 1 1 0 0 1 0 0 0 0 0
0 1 1 1 0 0 0 1 1 1 1
1 0 0 0 0 0 0 0 0 0 0
1 0 0 I 0 0 0 0 1 0 0
1 0 1 0 x x x x x x x
1 0 1 1 x x x x x x x
No
MEANING
1 1 0 0 x x x x x x x
IN BCD I 1 0 I x x x x x x x
CoDE
1 1 1 0 x x x x x x x
1 1 1 1 x x x x x x x
POSITIONS IN S
B INARY NUMBERS-~ (
4 2 1)
=== ~
What are the principles of " Boolean algebra " ?
Anywa y, Figure 3-5 summarizes the basic elements of Boolean
alge bra, as it's related to digital electron ics. The idea is t hat we use the
letter label of a wire to represent t he logical sta,tement carr ied by t he wire.
And we use a multiplicat ion sign to represent the AND operation, an
add ition sign to represent t he OR operation, and a bar over t he letter to
represent the NOT (in version) funct ion . These three operations a re t he
only ones used in Boolean algebra.
For example, as shown in Fi gitre 3-5, suppose we have an AND
gate with inputs A and B and output X. The way the signal at Xis r elated
to those at A a nd B is expressed by t his logical statement: "X is 1 if A is 1
AND B is l ." Using Boolean alge bra, this statement would be written
simply as X = A· B, wh ich you wou ld read, "X equals A AN D B." (You
could just as well write X = AB, wh ich is another way of writ ing the AND
function.)
:=o- x x IF AANO 9
x
x
-
-
A·B
AB
c
D
=D- y y IF COR 0
y- C+O
E
--t>- z z IF NOTE z - E
Figure 3-5. Su m mary of Boolean algebra, showing how the three basic
logical opera.lions are spoken and wri tten
~1 a
I
I
0 0 0 1 1 a = w x y
= p, + p,
y 0 1 0 0 1 + w x y
w x y z = p,
w w
x x
y y
z z
a = p , + p,
w w
x x
y y
z z
w x y z p,
INPU H t t1( ~ ~
1
t 1t1~1 t OUTPU TS
~
a
I b
_...;'BUFFER'
d
-
e
-
g
Po p, p, p, p, p, p, p, p, \
OR GATES ANO BUFFER ARE DESIGNED As "DRIVERS"
TO HANDLE LARGE INCOMING CURRENT IN "0 " STATE.
and so forth. Since the OR gate fo r output "a" is fed from lines P , and P.,
"a" is the sign al we disrnssed earlier: W·X·Y·Z+ W·X·Y·Z. Similarly, all the
other output functions are taken directly from the truth table.
U NDERSTANDING DIGITAL ELECTRON ICS 3-9
~
3
BUILDING-BWCKS THAT MAKE DECISIONS
~ Now
===--===
output function "c" is just P,, so th is out put could
conceivably be connected directly to product line P,. But to avoid
burdening t he AND gate for P, with t he heavy current from t he display,
we provide the "buffer" shown at output "c." A buffer acts as two inverters
in series, to repeat an d strengthen a digital signal. In t his particular
building-block, the buffer and OR g ates are all specially made to handl e the
large seg ment current when they're in the 0 state. They're called "segment
d rivers." Actually, the prope r name for the entire building-block would be
"BCD-to-7-segment decoder- driver. "
How would you make a real decoder?
A real decoder would in most cases differ from th is design in two
respects. First, it would substit ute (for the AND and OR gates) whatever
kinds of gates were most economical in t he particular integrated-circuit
fam ily being used. For example, as shown in Figure 8-8, t he decoder in the
Texas Instr uments TTL circuit SN74143 substitutes NAND gates as we
learned to do in F igu re 2-18. And second, as shown in Figu re 3-8, t he real
decoder would lea.ve off the W inputs to the AND gat es for P" t hrough P,,
z (1) z
y (2)
Le z
'.:!'._
Lr-
... y
x (4 ) x
'-{: x
w (8)
Le . . T w
w
t
l '
• •
"Asterisks
Inputs left
1 :Fettc~ ../
<'
I l
-r'
because th e
" don't care " a
com blnati ons
a re ne ver received. b
d
-
"Reducing Inputs e
to " AND' ' gates
causes th e " DON' T
CARE" products
P10 throug h P1s to g
be lncl ud ed.
I
L_ Po p, P, + P, + P. + P,+ Ps+ P >+ P, + P,, +
P 10 P 11 P ii Pu Pu P1 ~ P u + P 1~
=== ~
and the X and Y inputs to the AND gate for P •. These inputs would only
serve to distinguish between these six input combinations and the six
"never received" combinations at the bottom of the truth table (which we
can call P 10 through P j", ). So by taking note of the "don't care" conditions
when we make up a truth table, we can often simplify our designs.
(Incidentally, the manufacturers of integrated circuits sell or
give away catalogs and data sheets that show the logical design of many
digital I Cs. You're learning to understand these designs, so you may want
to obtain some of these publications to advance your comprehension of
digital electronics.)
So that finishes our in troduction to the "code-converter" class of
combinational bui lding-blocks. All units in this category work more or less
like this one-including the part of the keyboard encoder we studied in
Chapter 2.
But more than just lear'.1ing about one type of building-block,
you've become acquainted with the use of a truth table and Boolean
algebra in analyzing any combinational network. This understanding will
serve you well as we proceed through our st udy of digital systems.
How do "data routing" units resemble decoders?
The second class of combinational building-blocks we'll take up
could be called "data routing units." Net works in t his group actually rou.te
data (meaning information being processed) from various sources to
various destinations. First, F igure .'J- !J shows a network called a "data
selector," which as you can see looks a lot like our decoder in Figu re S- 7,
only simpler. As suggested by the "switch" drawing to the right, this unit
act s as a sort of "switchboard" with four input wires (A, B, C, D) and one
output wire (E). The network allows you to connect any one of the inputs
to the output, for the purpose of transmitting digital information. An
in put is selected by means of the two " input selection control" wires, Wand X.
" DATA INPUTS" To BE CONNECTED To OUTPUT .
INPUT SELECTION A B C D Bold lines
CONTROLS /Carry
~x --.---=----+---+---I---++-,,.,.,.,-·w·· example "1"
:rr--~-t---t-t---~r----t-t~w
W _.~------<-+----+-+---....+->--~-+-+--X
::o----++-r--.+-t----+~,__-+-++~x
INPUT SELECTED
w x ANO CONNECTED
TO OUTPUT
0 0 A
0 B ( ILLUSTRATED)
0 c inputs 1s "open " to
r---t-- t t - -- - - - - -1 passage of data fr om
D data input.
E
Figure 3-9. A "data selector" recognizes control combinations the way a
decoder does, enabling data to pass from the selected data input.
UNDERSTANDING DIGITA L r~LECTRON ICS 3- 11
3
BUILDING-BLOCKS THAT MAKE DECISIONS
~ -- -------------------
,
( \ . . - - True and complement ADDER- ~
'
-- ,' controls are shared SUBTRACTER --v"
i
I
81
82:
OPERAND 8 2
REGISTER 8 4
88
c- o STRAI GHT
c c C - 1 CROSS
I THRO UGH
@
CONCEPT EIGHT 2-INPUT
A
B ._I:: OF
RESULTS:
Figure 3-10. Eight 2-input data selectors can select each 4-bit
A
B
-----;--- DATA SELECTORS
=-=---:=--=----:== ~
To do th is, we use a two-input data .~el ec tor on each of t he eight
input wires to the adder-subtracter. (That's eight data selector s in all- but
only two a re shown.) We n eed only one con t rol in put, labelled "C". A "O"
sends the numbers s traig ht t hrough, a nd " l " makes them cross over . So as
you can see, this concept of data selection can be very versatile.
F
( Bold Lines DATA INPUT ......
Carry Example " 1") ~-----------~
z --+-------t--+-11----+----+--t-~ z
z
m
'X>--.....+--+-+--.....-11---+-i-~
y
"D---+--+-11----.-+-+--t-+-+-- ++-+-- - y F
OUTPUT SELECTED
Y Z AND CONNECTED
: : ~ rn 'N>'UT ¢ ----
0 J (ILLUSTRATED) G H J K
1 1 K OUTPUTS To BE C ONNECTED To INPUT G H J K
Figure 3-12. A 4-bit. b1:nary adder adds two 4-bit bina'l7/ num bers A and
B, and produces a 5-b'il binary si1rn S .
UNDERSTAN DING DIGITAi. ~l.ECTRON J CS 3-13
c==--- Bu1LDl~G-BLOcKs THAT MAKE DEc1sIO!'iS
As you can tell from the labe l "816," t his fift h output wire has a va lue of 16,
compared to values of 8, 4, 2, and 1 for the other four. Each input number
tan run from zero (0000) to fi fteen (111 1). So t he sum can run from zero
3
(00000) to thi r ty (11110). If lhe "sum" output had only fo ur wires like the
inputs, it coul<l only go up to fi fleen.
Now we could desig n t his combinati onal block hy using t he sa me
approach as with the decode r- by design ing the sum-of-products ,·ersion
right from the t ruth tabl e a nd tr ying to si mplify it. But the sum-of-
products network would need 2.) li eight-i 11p11f AND gates to handle all t he
poss ible input co mbina t ions in eight w ires (that's t wo to the e ighth power-
lwo multiplied by itself seven times). And the output 01{ gates would have
t o handle as many as 128 i11p11ls (which isn't pract ical - we'd ha\'e to handle
each output OR function in two or more "stages,'' say, with sixteen 8-input
01{ gates feeding a seYe nteenth). So we have to back otf, scratch ou r heads,
and find another way.
What' s a simple approach to a binary adder design?
The a ns,,·er torr.cs from considering the " logit" (the reasonin g) of
ad ding bina ry n umbers, as ill ustrated in Figll re .J-J./. Here, we see 44 and
58 added to get the sum of 102, both in the customary decimal way and in
the binar!J way. (An d by t he way, we're talking abou t "pure" binary
numbers here, not binary-coclccl decimal num bers. Th at's why "44" is
101100, and not 0100 0100. Later on, we'll sec how to use pure-bina ry
adders to add binary-coded decimal n um bers.)
JL
To
Next - 1 0 0 0
Place
(0) 4 4 (0) 0 1 1 0 0
+ (0) 5 8 + (0) 1 1 0 1 0
1 0 2 1 0 0 1 1 0
I
100 10
11 1 64 32 16 8 4
"PLACES"
in
Numbers
F igure 3-13. R i11a ry 1111111/wrs are add!'d 11s111g :;c011e steps a:; in addin_q
decimal n11111hers .
FOUR BITS
BS B4 B2 81
- OF NUMBER " B"
" CARR Y IN"
FROM PRECEDING
"CARR Y STAGES. IF
our A 8 N A 8 N A B N A B N DESIRED (USE . 0
To O TH ER IN THIS CASE)
STAGES.
IF D ESIRED
( NONE IN c s c s c s cs I
THIS CASE) FOUR 1-BIT
"FULL ADDERS "
Figure ,'J- 14. Concept of us i nyfo11 r /-hit bina ryfu ll adders to add f 1.1 •0
4-bit numbers, incl1.1diny "carry in " and "carry flUt " connecti ons to han dle
larger n u 111he·1·s if de::; ired
UND E RSTA:-.llHNG DIGITAL ELECTROJ\ IC'S 3-15
~
3
BUILDING- BLOCKS T HAT M AKE DECISIONS
~ ===
How does a one-bit full adder work?
F iyHre .J-15 shows the truth ta ble for a 1-bit full adder-including
all eight possible combina tions of inputs A, B, and N , and the desired
combinations in outputs C a nd S. Th e network shown in this figure is just
about as sim ple a design as you can get. if you're working only with A~D
gates, OR g a tes, and inverters. (The Texas Instruments SN74LS83 we
men tioned modi fies this a little bit by substitu ti ng other ki nds of ga tes- in
part icula r, an "AND-OR-inve rt" circui t that's very econom ical in t he TTL
fami ly, which we will !';ee in the chapter on integrated circuits.)
The network drawing in Pi_g11re 3-15 is cove red wi th road-signs
like a highway, to help you fi nd your way through it if you like. For
reference, each input combination in the truth table is identified by a
nu mber from zero th roug h seven, correspond ing to the binary number
formed by the combin ation. The AND function of a n input combination is
designated by a " P" wit h t he sa me number subscri pted, so that
P, = A·B·N an d P, = A·B·N, for inst ance .
.- N_..-e--- - - - - -- --- - -- -...-- - -- - -- -..0>-- N
(INCOMING N
CARRY)
/ B .--.-----1----+-------+---..i----I------"~- B
( B IT FR OM B
O NE NUMBER)
/ ' A - - -- - --i--4-----1-- ---+-- -i--+---l-4-- --1-.1--_.-+-1--- A
( BIT FROM A
OTHER NUMBER)
"AND" Gates
"RECOGN IZE" -
input combinations
s hown '
TRUTH TABLE
INPUTS
A B N c
0 0 0 0 0
0 0 0
2 0 0 0 P, + P, + P, + P, P, + P, + P. + P,
3 0 0
4 0 0 0
c s
5 0 0 (CARRY OUT To (ONE 81T OF
N EXT 1·81T THE SUM)
6 0 0
ADDER)
7
L Reference numbers for
input comb1nat1ons •
Figure 3-15. Truth t ahlr~ and poss·ihle network .fur a 1-bi:f fuJl adder a~ 1:n
preceding fi.g·ure
3- 16 U N LH:R ST ANDING DI G ITAL ELEC' TK ON ICS
~
3
BUILDING-BLOCKS THAT M AKE DECISIONS
===~
What have we learned about combinational building-blocks?
That just about covers the main, basic combinational building-
blocks you're likely to run into in digital systems: various kinds of codc-
conversion units, data-routing units, and add ers. There are endless
varieties and combinations of these t ypes of net works, but the concepts by
which they all work are pretty much as we have seen in this chapter.
The important, unifying thread that runs through all these
"decision-making" building-blocks is this: for every combination of signals
at the inputs to a unit, there's a certain, prearranged combination of
signals at the outputs. Furthermore, these input and output combinations
can be summarized neatly in a truth table. Boolean algebra provides a
convenient "shorthand" method of writing the logic (the r easoning) tha t
shows how to produce each output signal. This method uses symbols for
statements and for the three basic logic operations.
We've noted that the gate network derived directly from a truth
table is not necessarily the most economical. The network can possibly be
simplified by taking advantages of any "don't care" conditions in t he truth
table. Different gates can be substituted according to principles we
glimpsed in Chapter 2, to make best use of gates a vailable in the particular
integrated-circuit family being used. Also, as we saw in the adder, a
com bi national job can be handled in several steps if necessary to simplify
the network.
So as we said at the beginning of the chapter, we've don e
considerably more than just look over some bui lding-blocks. We've
deepened our comprehension of the principles of digital electr onics by
looking at things from the designer's viewpoint. All this background
understanding will serve you well as we continue our study of digital
building-blocks in the next chapter with sequential networks, and as we
proceed later on to a comprehension of how entire systems are put
together from building-blocks.
4
Building-Blocks
with Memory
In Chapter 3, we found out about "combinational" building blocks.
These a re digital units whose outputs depend only on t he inputs being
received at the present moment. For every combination of input signals,
th ere's a certain prearranged combination of output signals.
And now we're going to move on an d study t he other category of
building-block, the "seque ntial" type. These units can store infor mation
inside them. So the outputs do not de pend only on the present inputs, but
also on input signals received in the past - that is, on a sequence of inputs.
As we will see, this "memory'" capability calls for a set of additional rules
and thus adds complexity to the building-block and the system , in terms
of both design and operation.
In a later chapter, we will be looking a t si1bsyst.erni; called "mass
memories " that store r elatively large quantities of information. But right
now , we're talking about smalle r uni ts that are r egar ded as building-
b lock.~. When we study mass memories later on, we will see t hat t here are
several different techniques used for storing dig ital in for mation. But in
this chapter, we'll limi t ourselves to storage elements of just one very
important type. These are circuits called "flip-flops," which are made of
relatively simple assemblies of gates. Though gates a re combinational
units, t hey can be hooked up in a way that actually stores information. So
let's take flip-flops as our star ting point.
What's a simple example of a "flip-flop?"
To unravel the mystery of how a sequential circuit can be made of
combination al units (gates), let's begin wit h a very simple type of flip-flop.
Let's go back to the "latch" we looked at in general terms back in Chapter
1 (Figiire 1-19), and see how such a circuit can be made from gates.
To distinguish this circuit from a smaller one inside it that's also
called a "la tch," let's call the larger circuit a "gated latch." One way to
make it out of gates is show n in F igure 4- 1.
Externally, this circuit is a direct copy of the latch in Figure 1-19.
It passes signals from the "data in put" D straight through to the " tru e
output" Q whenever t he "gating input" G is 1. (The "complement output"
Q, pronounced "Q-bar," is t he complernent or opposite of Q, and is produced
as part of the internal operation of t he circuit.) When G is changed to 0,
t he outpu t is "latched," or held, in its present state, re,qardless of changes
in D, until G goes back to 1. Thus, one bit of data is stored while G is 0.
(" Data" means informa tion being processed, as opposed to control
information.)
U:<iIJ!:KSTANOING DIGITAL E LECTkO:-llC"S 4- 1
~ = = = == = = == ::-:= =B=U=l=
!.l=)!=N=
G-=B=1=,o=c=K=S =W=!=T=l-=M=E=,~=IO=R=\=·==4==
Incidentally, you should note that in most kinds of fli p-flops, a
signal that cau~~.!,Qrage to occur at a gi.ven time (such as the gating
signal G) is callea the "clock" signal. This is because such a signal tells the
time at which data is to be stored and r eleased. Clock signals synchronize
the changing of data in various parts of the system - meaning make it
happen at the same time. However, "gating" is a clearer word in this case.
r-------------------1
GATING NETWORK I
r----------------
PR1MmvE l
I FLI P-FLOP I
I
D I
R (R-S L ATCH ) II " TRUE " O UTPU T
I
I "RESET "
I
DATA I
I
INPUT I
I 5 D--4t-t--i.. Q
~--t,~.-.S~E~T-
.. -t-~~-f_~
_________ .... I
I " COMPLEMENT "
---------~------.J OUTPU T
GATING INPUT
0 ~ LATCH
G 1 ~ UNLATCH
7-SEGMENT
4-BIT DISPLAY
GATED LATC BCD-T0-7 SEGMENT
SN7475 DECODER-DRIVERS
Figure 4-2. Five 4-bit gated latches used to hold changing output of digital
voltmeter momentarily.(Circuitsfor decimal point and plils or minus
signs are not shoum.)
UNDERSTANDI NG D I GITAL ELECTRONICS 4-3
g:m Bl'll.J)l~li-B!.OCKS WIT H Mt:MORY
ID= == 4
A parallel register consists of a group of flip-flops with a common
gating (or "clock") signal. It's used to store information transmit ted and
received all togethe r, ra ther than one bit at a time. A g roup of bits
transmitted and received at t he sa me time like this is called " parallel
data."
How might a digital voltmeter use a parallel register?
In the highly simplified digital voltmeter system shown in Figure
4-2, the parallel data consists of voltage readings in digital fo rm. This data
is t ransmitted from the measuring circui t ry at the left in th e fo rm of five
decimal digits, each coded as fo ur binary bits. (As we know, t his method is
called "binary-coded decimal," or BCD.) Fu rt her toward the right, each
decimal digit is decoded into 7-segment code by five BCD-to-7-segment
decoder-dri vers of the type we studied in Chapter 3. These un its drive t he
fi ve-digit 7-segment display.
However, the measured voltage may be chang·i ng while it's being
read. During some measurements, the last t wo or three digits to the r ight
are likely to be just a blur of changing num ber s. So we have th e latches
ahead of the decode r-drivers, to hold the display constan t for a moment
every few seconds, so we can read it . The latching is cont rolled by a
regularly repeated gating sig nal to all th e latches. During t he intervals
when t he latches are "unlatched," we can see how fast t he voltage is
changi ng, by watching th e changing digits.
a. b.
PARALLEL REGISTER SHIFT REGISTER
Eac h pa rallel
PARALLEL DATA SERIAL DATA IN output follows
IN . . . AND OUT Outputs can change o ne c lock pulse
independently behind preceding
of each other
output.
--
- -
S IGNAi.
SER IAL CLOCK flflilIUlfLru
C LOC K S IGNAL DATA
Time OUT Time
Figure 4-3. D~jj'erence between parallel reg1:.ster and shift register. Each
little box represent.~ some sort offlip-flop . Wa·u~forms show pa.rallel outp u t s
"high" or "loii·" a.~ various data inputs a re received an d clock i:.~ pulsed
KEYBOARD
ENCODER Serial transmission
required because
only one hne
PARALLEL available
..- DATA
/ SHIFT REGISTER
Figure 4-4. Possible 11.se of shift reg1:sters to cmwert data j i·om parallel
to ser ial und from serial to parallel forms
UNDERSTAND ING D IGITA L ELECTRON ICS 4-5
~ ======================B=V=l =.n=I=~G=-=B=I.O=(=K'=s=\=V=IT=H=Y=l~=:~=IO=R=Y===~
=====
First, the four bits of a decimal digit are loaded in parallel into
the left-hand shift regist er. (We'll sec how this is done a little later.) Then
the two shift registers are shifted four steps by a common clock signal, so
that the four stored bits shift out of the left-hand register and into the one
on the right. There, the bits ar e read ou t in parallel again to the display
register. So you can see how this shift register on the right converts data
from serial form to parallel form.
How is this system synchronized?
Notice in F igure 4-4 how important it is for the parts on the left
to be synchronized with the parts on the righ t, to be sure the registers
shift in step together, and to get the parallel data into and out of the shift
registers on the right schedule. The simplest way to synchronize
everything is by a "common" clock or timing signal (one supplied in
common to all units), as shown in Figu.re 4-4.
You'll see this element of timing again and again in digital
systems. This example reminds us again why the "storage control" signal
to a flip-flop is called a "clock" signal.
While we're thinking about timing, there's an important fact to
consider. In shift registers and other similar situations, data must be
transferred from one flip-flop to another, with both flip-flops triggered by
the same clock signal. Shifting bits can be a tricky business when all the
flip-flop outputs change at exactly the same time. It requires flip-flops that
stor e t heir input signal before they change their output signal.
How can a flip-flop store before changing?
The most common way to make a flip-flop that can do this is to
build two little flip-flops into one bigger one. A "two-step" flip-flop like this
is called a "master-slave" type. Figu.re 4-5 shows one kind of master-slave
flip-flop. PRESET ( NORMALLY 0)
r----------
MASTER 1-- -----sLA°vE------- , OUTPUTS
True
s
(SET) 0
TRUE
Comp
R
(RESET)
a
COMPLEMENT
DATA
INPUTS
---------- ------------------
CK
CK C LEAR (N ORMALLY 0 )
( C LOCK)
Figure 4-5. How an "R-Smas ter-slave"fiip-f lop can be made from two
"clocked R-S"fiip-.fiops
4-6 UNIH:RSTANDING DIGITAL EU;CTHONICS
BUILDING-BLOCKS Wm1 ME~tORY u=m
= 4 = =[ti]j
This kind is called an "R-S master-slave flip-flop." It's made of
two identical units that we are calling "clocked R-S flip-flops" (shown
outlined), one called the master and one called the slave. Each clocked R-S
flip-flop is simply a gated latch as in Figure 4-1, but with two data inputs
rather than one input and an in verter. The "preset" and "clear" inputs are
additional features that we'll come to in a moment.
Note that the clock signal CK to the slave unit is the inverse of
the main clock sign'al CK, which is supplied to the master. This gives us the
"store-before-changing" action we want. Let's suppose that inputs Sand R
are connected to the Qand Qoutputs of another identical flip-flop
controlled by the same clock signal. When the main clock changes from 0 to
1, the slave holds one bit while the master accepts a new bit. Then when
the main clock goes to 0 again, the master holds the new bit while the slave
releases the old one and begins transmitting the new information straight
through from the master.
Thus, when this flip-flop is used with others in a shift register, all
the flip-flops "get ready to shift" when the main clock goes to 1, which we
call the "leading" edge of the clock pulse. And the flip-flops complete the
shift at the "trailing" edge of the clock pulse, when CK goes back to 0
again.
So that's how the "master-slave" idea allows bits to be shifted
from one flip-flop to another by the same clock pulse going to all flip-
flops. We can string together as many flip-flops of this kind as we need in
the form of a shift register.
What do the "preset" and "clear" Inputs do?
Now what about the "extra features" in Figure 4-5 that we
passed over earlier - the preset and clear inputs? These two inputs are
normally kept at 0 and have no effect on the operation of the flip-flop.
Putting a momentary "l" pulse into the "preset" input while the clock is 0
(between clock pulses) will store a 1 in the flip-flop. Similarly, a short "l"
pulse at the "clear" input between clock pulses will store a 0.
Not all flip-flops have these features. They can be particularly
handy in a register, where some systems need to "clear out" all old data
and leave only zeroes stored, or to "preset" the register to all ones. (Back in
Figure 1-9, we saw that our calculator has to be able to clear its registers.)
In such a case, the same preset and clear signals would go to all the flip-
flops in the register.
How can you load parallel data using " preset" and "clear"?
Another way in which the :Jreset and clear inputs can be useful is
in putting parallel data into a shift register. We saw a typical need for a
parallel-entry shift register in Figure 4-4. There, the keyboard encoder
puts four parallel bits at once into a shift register. Then the bits are
shifted serially through the sing le line.
[tl]j= == 4
Figure 4-6 shows one way to use the preset and clear inputs for
parallel data ent ry. (This method is used in the Texas Instruments
SN74165 shift register.) H er e we see two stages of a shift regist er made of
R-S master-slave fl ip-flops as in F igure 4-.5. Each flip-flop is shown as a
customary sy mbol. (As indicated in Figure 4-7, the peculiar ci rcle and
triangle symbols at t he clock input of each flip-flop a re to indicate t hat the
outputs of the flip-flop change when the clock goes from 1 to 0.)
"Loading" gates OPTIONAL PARALLEL INPUTS
on preset and \ P. - 1 P, ~ o
clear 1npu1s
B OLO LINES are "open " LOAD
IND ICATE "1 ..
CO NTROL
R-S
Master-Slave \
Fllp-Flop ~
as In
Preceding
OPTIONAL Figure
SERIAL
DATA -~---6------i TRUE
INPUT To
CK > DATA Other
Stages
R 0 COMPLEMENT of Shill
Register
CLOCK
IN PUT INTERNAL
CLOCK
LOAD
CONTROL LOAD
INPUT _ _....__.__ _ _ _ _...._ _ _ _ _ _.....__ _.,.
CONTROL
Figure 4-6. A way lo load parallel data into a. shift register by using
preset and clear inputs on the jf.ip:ffops (.~imilar to Tew s Jn.~ tr uments
SN74165)
Looki ng again at Fi.qure 4-6, note that whe n the " load-control"
input is 0, the circuit functi ons as a plain shif t register, receivi ng data
serially. But when t he load-control inpu t is 1 as show n in Figure 4-6,
parallel data is e nt er ed fro m the inputs above. The load-control signal
makes the "clock-o,·erride" gate hold the internal clock signals at O(w hich
is required for presetting and cleari ng these particular flip-flops). It also
"opens" the " loading" gates to the parallel data. A " 1" at a parallel input
such as we see at P , will operate the " preset" input of a particular fli p-
tlop. And a "O" such as at P 11 will be inverted to 1 (as shown for P 11 ) a nd
operate the "clea r" input. As soon as t he load-control input is returned to 0
agai n, normal shifting may begin once more.
Ther e are other ways to load parallel data in to a shi ft register.
But this µarticular me thod should give you a n idea of the kinds of extra
fea tu res t hat can he added to the basic shift register. By pro,·iding
appropriate control signals an d gating, you can even make a "bidirectional"
shift register t hat will shift either forward or backward.
4-8 l.'SDERSTAS Dl :\G DIG ITAL El.ErTROKICS
131'11.D ING-B LOCKS WITH MEMOllY g=g=i
4
= = =Ditd
What are some other kinds of flip-flops?
R-S flip-flops are relatively simple, economical units that work
just fine in man y applications - especially plain shift registers. However,
they have a peculiar quirk that's illustrated in the truth table shown in
Figiire 4-7. Note that a truth table fo r a clocked flip-flop like th is one shows
the input states before a clock pulse, and the "true" output after the next
clock pulse. (For example, the first line in t he table says that if Sand Rare
both 0 to begin with, then after the next clock pulse, Q will stay the same
as it was before.)
Triangle means " dynamic input"
(circuit responds only to a change). Subscript 0
I TRUTH TABLE means before
clock pulse.
s. A. 0,
0 0 o. Subscript 1
means after
t
L:::,. '":"".:,,. ,·
0 0 clock pulse.
1 0 1
" ?" means
•"ffi ··o··
(here. a change to "O" from .. , .. )
1 1 ?
" don 't know."
The peculiar quirk we're talking about is that when Sand Rare
both 1, then after a clock pulse, t he output could be either 1or0. There's ·1 w
telling what it will be. So you never let a clock pulse occur while Sand Rare
both 1.
Other kinds of flip-flops don't have this problem. There are t hree
other types commonly used, so let's take a qu ick look at them.
" D" flip- flops
Figure 4-8 shows t he truth table for all "D" flip-flops. (D stands
for data or delay. )The true output after a clock pulse is held in the state
main tai ned at the input, D, during the clock pulse. Note that the outputs
change only at the moment the clock goes from 1 to 0. (Changes at D have
no effect while the clock is 1, as in the gated latch of Fi,qure 4-1.) There are
any number of ways to make a D-type flip-flop. On the left in Figure 4-8,
you can see how to make one out of an R-S master-slave flip-flop and an
inverter. Preset and clear inputs could be provided, but are not shown here.
0 Subscript 0
TRUTH TABLE means before
o. 0, clock pulse.
0 0
Subscript 1
a 1 1 means after
clock pulse
TRUTH TABLE
T, T, 0,
s o----- 0 0 o.
0 1 0,
T CK
1 0 0,
R 0 --+-~-- 1 1 o.
Subscript 0 means before
T changes. Subscript 1
means alter T changes.
"J-K" flip-flops
F igur e 4-10 shows one way to make a "J-K" flip-flop out of an R-S
master-sl ave fl ip-flop like t he one in Figure 4-5. (Preset and clear inputs
are not shown.) The feedback patte rn h ere is li ke t hat in F igu re 4-9, except
that extra inputs a re provided to t he AND gates in the front e nd of t he
flip-flop. The " true" input is called J , and the "complement" input is called
K. (Some people say these letters come from the names of t wo me n who
developed this idea.)
As show n in the truth table in F igure 4-10 for all J-K flip-flops,
this building- block performs exactly like a clocked R-S fli p-flop (F igure 4-
7), except when clocked while both J and K a re 1. In t hat case, the outputs
simply toggle to the opposite st ates, like a T flip-flop . Thus, the f eedback
prevents t he troublesome "uncertain" condition from occurring. J -K fli p-
flops are very versatile, popular units, which we will shortly see in some
circuit appli cations. If a particular application calls for J or K to be the
AND function of seve ral signals, these sig nals can simply be brought in as
extra inputs to the AND gates in the front end of the flip-flop. These
multiple J and K inputs are called J" J ,, K., Kz, and so fort h.
4-10 UNDERSTANDl :--IG DIGITA L ELECTRONICS
4
~--- - ----------- - ---------- - - - ------ - -
•
I
J
DATA
INPUTS
OUTPUTS
R-S MASTER-SLAVE
CK --t--.r-4- - - ---f
FLIP-FLOP AS IN
: FIGURE 4 - 5.
L--------------------------------------
TRUTH TABLE
Several J and K inputs may be provided on input gates
Preset and clear may be provided as 1n Figure 4·5. J, K, 0.
0 0 o.
0 1 0
1 0 I
1 1 6.
Figure 4-10. A "J-K" fiip ~/lop is wired lo a11oid the "uncertain" state
of the R-S flip~/lop. while kee7n:ng I he u.sefulness of more I han one data
input
0 0
T T
INPUT
r o c B A
0
PARALLEL
OUTPUTS
0 0 3
0 0 0 2
0 0 0 QI
E
0 0 0 0 0 i=
15
0 14
Figure 4-11. A 11 asy11ch ro11011s Iii 110 ry 4-bil cu1111fl'I" 11/ade <f ·-r ..
.flip-.flop.~ . slw1ri11y
i11p11f and 1Jttlp11/ .,i_q11a /., d11ri11y part <!(c11u11li11y
i uence (.~i111ilur '" T e.ra8 f 11st n1111e11f., S1\i14.11.:AJ
s('<
A ~~--~~~~~~-e~~~~~~~---~~--<>--~~ A
8 8
c c
CONSTANT
1
J, K,
J K J K
0 CK O CK
PARALLEL
D c B A ___j OUT PU TS
(8) (4) (2) (1)
J , - K, A 0 0
B 0
J, = K, A·B 0 0
c 0
J ,, - K, = A·B·C 0 0
D 0
Fig ure 4 -12. Synch /'u 1w11s bi nu ry !,-hit cou 11ter..~hu1ci11g .'ia mp/e <f table
to hrlp.1i11/01r opr•ml iv11 (bold Ki_qnals cause chan,qe a.t ne.rl cluck pul.~ e)
[tttd= = = -
The input carrying pulses to be counted goes to t he
=of clock input
all four Rip-flops, wh ich g uarantees they all change a t the same t ime. The
particular state each Rip-flop goes to afte r each clock pul se is de termin ed
by the way the J and K inputs are connected. We say that t he in put
connections "steer" each flip-flop to the correct ne xt st ate. Note t hat the J
and K inpu ts of each flip- flop are t ied togethe r. As we saw in th e J-K truth
table in Figure 4-10, when both in pu ts are 0, t he fl ip-flop remains in its
present state. But when both inputs arc 1, it t.oggles at t he next clock pulse.
(You may wan t to trace the operation through each count, referring to t he
J- K tru t h table. A ta ble like the one show n part ially in Figure 4-12 will be
help ful.)
Notice the similarity between t he steering circuit ry and that of
the decoder -type networks we've seen in Chapter 3. Steering a flip-flop to
the correct next st ate is simply a matte r of decoding (recognizing) t he
state immediately before you want t he fl ip-ft op to change.
How can you make a counter count to other numbers ?
Not all counters count onl y 16 states - or 4, or 8, or 32, or some
othe r "powe r of t wo." For example, Fig11 re 4-13 shows one way to make a
synch ron ous counte r t ha t counts from zero to nin e and back to zero, using
binary code. It's called a "decade" counte r, or a " BCD" counter.
A ~--~~~~~~~----~~~~~~._~~~.-.~~ A
B B
c c
5 D
CON STANT
I
D c B A - - PARALLEL
(8) (4) (2) {1) OUTPUTS
COU NT REGISTERED .. 8 9 0 .
A 0 I 0
J, = K,-A · D 0 0 0
B 0 0 0
J c =Kc - A· B 0 0 0
c 0 0 0
J, = A· B · C 0 0 0
K, =A 0 1 0
D 1 1 0
Fig ure 4-13. Syn chronous decade (B CD ) connter, .~hv 1l'ing sample of faille
to help follow operation (bo ld signal;; ca use change at ne.rt clock pulse)
4-14 U=-' DERSTAJ\"lll1'G DIGITAL E LECTROl\iCS
\Vim M~;MOl<Y QVI
4 = : = = =tti]j
Hl!I LOING- BLO\KS
As you can see, this counter looks much like the synchr onous 4-bit
binary counter in t he preceding figure. However, the "steering" circuitry is
different. It sends the counter back to zero on th e count after "n ine." We
say that the counter's "modu lus" has been shortened from 16 to 10. The
modulus of a counter is the number of different states it counts through. A
counter with ten states like this one in Figu re 4-l S is called a "modulo-10"
counter. By using enough fl ip-flops a nd designing the proper steering
circuitry, you can make a counter with any modu lus you need for a
particular application. (Once again, Figure 4-J.'/ includes part of a table you
may want to make out to help you trace the operation of this counter
through each count.)
50-Microsecond 1-Second
Pulses Pulses
ACCURATE
20-kHz
OSCILLATOR
I MODULO
20,000
COUNTER
I
1-Hour
1-Minute
Pulses
Pulses
MODULO
12
\ MODULO
60
l MODULO
60
COUNTER COUNTER COUNTER
BINARY-TO-
7- SEGMENT
DECODER-
DRIVERS
•
•
•
• -- 7-SEGMENT
DISPLAYS
Why Digital?
Now that you have in your mind the main outlines of the
comprehensive picture we're painting of digi tal electronics, this is a good
time for us to pause for a wh ile and evaluate the nature of the digital
approach to building a system. In speaking of the only other general way
to build a system (in Chapter 1), we used the words "analog" and "linear."
So first, we have to explore these ideas and their meanings. This new
understanding will enable us to see more clearly why the digital approach
is used in certain situations- and perhaps more important, why it's not
used in other situations.
What is analog information?
All we have noted so far about the analog (or linear) method was
with regard to our discussion of the universal system organization back in
Figure 1-20. Figure 5-1 shows this organization again as it applies to
analog systems. We've shown that digital systems manipulate
information in digital form. That is, the information is made up of
separate parts, or bits. We added that another way to represent
information is by a method called analog.
This method of handling (manipulating or transmitting)
information is what makes analog systems different from digital systems.
"Linear" is a name sometimes used for the general type of electronic
circi~itry used to handle analog information. So let's see what's meant by
analog information.
INFORMATION IN
ANALOG FORM \
I -
SENSE DECIDE ACT
'---------11I
I I I I
I ,. - - - - - ---, I
I I . I I I
I •
I '- - -: STORE
·~ _JI
1
~---. :
L -- --- - -..1
Figure 5-1. A nalog systems are those which handle information encoded
in ancilog form, using circwits sometimes called "linear" circuits.
UNDERSTANDiz.;G DIGITA i. ELECTRONICS 5-1
liiJ
- ==--'-- ===== 5
WH Y DIGITAL?
-~~B~Y...,FLOAT~ _ Empty
Small
I SWITCH OPERATED
BY CAR IGNITION KEY
\ Res1slanc e
- Full PERMANENT
MAGNET
CURRENT METER
OUTPUT
(Pos ition
C1rcu 1try
of pointer
is called
or m11llamps
in circuit) 1---c.iL---+ - +-+-+-+-+-+-+--t ·'linear' · because
g rap h of oulput
0 -~
, ....i......i......i......i..~
l ....i......i.._._.-'!I versus input is a
0 10 20 smooth /me (no jumps) .
INPUT (G ALLONS (LITRES) OR LE VEL)
Figure 5-2. Cvncept of cu rre nl-a nalog i nf or mal ion in a pos.~ ibl e
a11 tumobilefuel gage syste m
IIi LowEA
CUMrn• /
/ are analog representation
"'"'P'=""''ooodwo~•l
MOUTHPIECE
Nf\JV'
Each surge of
electricity through - - - - -
Fluctuaung pressure electromagnet
ol sound waves pulls diaphragm.
varies resistance regenerating a
ol microphone element sound wave.
Figure 5-3. Telephone system uses analog information much like fuel gage
in preceding figure .
5 -4 lJN U~:RSTANUING DIGITA L ELECTRONICS
liJ
5 = - - = =Ill
WHY DIGITAL?
=
What's the difference between current and voltage analog?
In most of the other examples of analog systems that we'll study,
we'll be speaking of controlling the ·voltage of electricity rather than the
current. Thus, we will be using voltage an alog rather than current analog.
These two methods are so similar in concept that the difference need not
concern us here. Current is simply the amount or volume of electricity
flowing, while voltage is the pressure of electricity- the force that moves
the curre nt.
How do radio systems use "amplitude modulation"?
Although current and voltage are the basic workhorses in the
analog world, these methods are often used in some very special ways
known by diffe rent names-ways that make the analog method even more
useful. Let's look at a familiar example. This will be an AM radio
transmitter such as those used in citizens-band radios, "ham" radios, and
regular radio broadcasts. "AM" stands for "amplitude modulation," which
is one of the more advanced forms of analog information.
Figure 5-4 shows how this technique lets us transmit sound
waves (whose frequencies are relatively low, from 20 to 10,000 waves per
second) by using radio waves of a much higher frequency (say, 1
megahertz-a million waves per second). The transmitter simply
"modulates" (that is, varies) the "amplitude" (the height or strength) of
the radio waves in a pattern matching sound waves. That's what
amplitude modulation means. (To "modulate" something means to vary or
change it to fit a certain pattern. We could call current analog "current
modulation.")
Microphone converts Each electric wave in antenna
generates a radio wave .
\( ((nY
"GAIN
CO NTROL "
OSCILLATOR
-y matches sound
waves
(~ WAVES (1 M ILLION
WAVES PER SECOND)
'" ' " " ' ' " " '"'°"! ENCY /(!', !
from microphone , \
/
FREOUEN CY ' ' -
CONTROL
... , / ', ' - .,,,.
·"
,
OSCILLATOR iW\MA..J
FREQUENCY-MODULATED
(FM) OUTPUT TO
TRANSMITTING ANTENNA
===•
WHY DIGITAL?
5
As indicated in Figure 5-5, frequency-modulated electric waves
are produced by controlling the frequency at which an oscillator varies its
output voltage. If these waves are sent to an antenna, they produce
corresponding FM radio waves. FM signals are less subject to interference
by noise, because noise mainly affects the signal amplitude and thus does
not bother thefreq·uency signals. However, FM waves are more
troublesome to generate and receive. EXTERNAL
EXTERNAL I NTERNAL
SENSE ACT
(VARIABLE
(METER .
RESISTOR.
EARPIECE.
MOUTHPIECE,
ANTENNA)
MICROPHONE)
I
Percentage
amount of each
gas component
Sample of reported as
gas mixture voltages. one
to be .--~~~~~-. DIGITAL
at a time over PERCENTAGE
analyzed 15 minutes COMPO NENT
AMOUNTS TO
=1
GAS
ANALYZER ! COMPONENT
COMPUTER
INTERFACE ,__
C OMPUTER
__
" 2 UNIT
Takes 15 minutes
to analyze COMPONENT
each sample =3
1'~----~--.---
-1•--------.~e>-------<111--------i
I
5-10
5
WHY D IGITAL?
ADVANTAGES OF DIGITAL
1 . Systems can be easier to design.
2 . Information can be more precise.
3. Storage is no problem.
4. Information is sometimes processed faster.
5. Circuits can be fully integrated.
LIMITATIONS OF DIGITAL
1. The real world 1s mainly analog.
2. Analog processing can be simpler.
3. Information can usually be transmitted
faster in analog form.
:~r--
CALIBRATED
VOLTAGE METER
CALIBRATED
POTENTIO METERS.
EACH -
, ~r
TRANS MITTING
"2"
of ANALOG
MULTIPLIER
4 0000000
2 0000000
x
2.0000000
8-DIGIT
CALCULATOR
(Electrohydraulic
systems that
move ailerons and
e levators and rudder
are not shown.)
= =Ill
Let's look at an example-the phonograph amplifier depicted in
Figure 5-1 2. We've got weak analog signals carrying sound information
from the needle and cartridge (which are sensing the information from
the surface of the plastic record where it is stored) . The system's main task
is simply to nw lt iply t he height of these electric waves by a factor
depending on the loudness we desire, producing proportion ately taller
copies of the same waves to drive the loudspeaker.
As we have already discussed, multiplication can be handled wit h
pretty fair accuracy by an analog ampl'ifier circuit as shown in F igure
5-12. We can make a rather crude but workable amplifier using just one
transistor, with a few resistors and maybe a capacitor or t wo. Or as we've
mentioned, an IC power amplifier could be used here, ve ry economically.
MANUAL
CONTRO LS
NEEDLE &
CARTRIDGE
N\f'v
RECORD DISK Main task is just )
to mu ltiply i nput signal
by desired factor
Digital multiplication
factor from keyboard
controls volume . Numbers conve rted
back to voltages.
ODD Loudspeaker responds
ODD
I
A new number 10 "smooth average ..
is 1ransm1tted and DOD cu rren t waves shown
mul'.ipl1ed every DOD
100 microseconds. SERIE S OF
approx imating PRO PORT IONA 1 ELY
VARYING VOLTAGE LARGER NUMBERS
a nalog signal
~;\_(\
TRA NSMITTING
SOUND WAVES
ANALOG TO DIGITAL
NEED LE AND DIGITAL TO ANALOG
CARTRIDGE CONVERTER CONVERTER
N UMBERS CARRI ED
IN SEVERAL WIRES
= =Ill
To begin seeing why analog transmission is faster, look at the
example in Figure 5-14. Here, we're transmitting voltage-analog
television (video) signals from a remote surveillance camera to a monitor.
For the sake of simplicity, we're assuming that the information-handling
capabilities of the system are limited only by the wire between the units.
Let's say that the wire can't carry variations in voltage occurring any
more often than five million analog waves (or digital pulses) per second.
That is, the frequency limitation of the system is five "megahertz."
Furthermore, because the wire is long and not perfectly shielded from
outside interference, the voltage signals may be i naccurate by as much as
11128 of the full range of voltage.
Any transmission system is limited in these same two ways. A
communications engineer would say we have a "bandwidth" of five
megahertz, and a "signal-to-noise ratio" of about 42 "decibels" (which is
an equ ivalent indication of accuracy). Our wire is just barely capable of
carryi ng a decent te levision picture in both these respects.
REMOTE TV
SURVEILLANCE
CAMERA
I
Suppose tra nsmission
line can't handle
freq uencies higher
than 5 megahertz.
but can handle signal
0
0 0
variations as small TV MONITOR
as I 1 128 of full range.
which is needed for
good TV picture
Well, we have to figure out how many bits per second WO'Uld be
requ ired, if we were to transmit the very same information in t he most
efficient digital code, which is bi nary numbers. To do this, we have to
imagine a system as shown in Figure 5-15.
Her e, the analog signal from the TV came ra goes to a unit we're
calling an "analog-to-digital converter wit h serial output." Without
looking inside this unit, we'll just say that it measures the input voltage
ten million times each second, and converts it in to a seven-bit binary
number. These bits are fed t hrough the transmission line in series, as
digital pulses with a frequency of 70 m egahertz. At the other end of the
line, a "digital-to-analog co nve rter with serial input" puts out a
continuous analog voltage signal to t he TV monitor. This voltage is
proportional to the seven-bit bina ry number that the conver ter last
received. The broken line below the transmission line in the figure is to
remind us that if we actually bnilt a system like this, we couldn't depend
on the two converters to stay sy nchron ized with each other in handling t he
serial groups. We would need some sort of common clock pulses supplied to
both systems, as we learned in studying Figure 4-4.
I __ ____ _ _ _
{_ _ _ _ J
Ill= = =
Why do some systems use both digital and analog parts?
In t his chapter, beside showing you the alternative to digital
methods, we have surveyed quite a range of different kinds of electronic
systems. So now you can see why we have digital computers and
calculators-and other sorts of digital systems-but not digital
phonographs and radios and what-not. The reasons are based on a handful
of advantages and limitations of digital methods by comparison with
analog methods.
But more than that, you have seen that many kinds of systems
use both digital and analog techniques in various parts of the systems.
Indeed, t he most important issue that must be settled early in th e design
of most systems is which parts will use digital methods and which par ts
will use analog. In some cases the answer may be so obvious as to be a
foregone conclusion. But in many cases the answer may depend on careful
economic analysis of the trade-offs.
However-as time goes on, t he economic benefits of integrated
circuits are being applied more and more strongly to digi tal circu it ry. So
the balance in the choice between digital and analog is shifting further
and further toward th e digital side. As you proceed th rough this book, you
will come to appreciate more fully t he marvelous things that can be done
with the simple little switching circuits with which we are becoming
familiar.
•about 14 millimetre
b.
d. Eac h chip
packaged separately
Figu re 6-2 pretty well su mma rizes the most important steps in
creating these little regions in a slice. (The specific details here are for an
n-channel MOS integrated circuit as in Figure 2-11.) To begin with, the
slices are p-type silicon, because of a particular dopant substance
(typically boron) added to the s ilicon before it crystallized from a hot
liquid. The slices are ground flat and polished to a mirror finish. Then, as
shown in Figure (i- 2a, the slices are heated in an oven containing oxygen
and steam, causing a very thin layer of silicon oxide to form over the
whole sur face of the slice where the circuitry is to be created. The oxide
film is about 0.04 to 0.08 mil thick. (Remember, a mil is a thousandth of an
inch. We are dividing that into 100 smaller parts and speaking of only four
t o eig ht of those parts. This is a bout 1 to 2 micrometres.)
Then, as shown in Fi,qure fi-2h, a thin film of light-sensitive liquid
plastic called "plwtore13i13/" is applied to the surface of each slice. The liquid
is then dried to form a solid film.
Next (Figure 6-2c ), the coated slice is exposed to ultraviolet light,
except in thousands of tiny spots and strips where n-regions are to be
formed. To do this, the light is passed through a glass microfilm plate that
covers the slice, called a "photmna.~k . " The photomask contains a
photographically reduced pattern of very accurately-placed opaque (dark)
areas to shade the desired parts of the slice from t he light. Where the light
strikes, it quickly causes the photoresist to become very strong and tough.
6-2 UKDE R~T A:-JDIKG DIGITAL ELECTRONICS
===~==-- -===D=IG='l=T=A=L=l=N=TE=G=R=A=T=E=D=C=l=R=C=U=IT=S======================c:=== ~
Then, as shown in F igure 6-2d, the soft, unhardened areas of
photoresist are washed away with a solven t, like rinsing spots of jam from
a breakfast plate. (The hardened ar eas are left like d ried egg yolk on you r
plate.) Aflerwards, the slice is dipped in an acid bat h that etches
(dissol ves) t hrough t he oxide film where it's unprotected by t he hardened
plastic. The acid is a t ype that doesn't bother t he plastic or the silicon, but
it eats away the oxide film. A typical hole through the oxide mig ht be
a bou t one mil or 25 micrometres across. (The vertical scale in t he
drawings is stretched abou t ten times taller t han the horizontal scale.)
0 04 Liquid " photores1s1" plas11c
Oxide f1l.m MIL applied & dried " " '
g rown on s1l1con
P-TYPE p
SILICON SLICE
a b
ULTRAVIOLET L IGHT PHOTO· Soft plastic spot
ct::t:t:J......m:::t:t:l;J...~M~ASK washed away & hole
dissolved
L1gh1 lo ughens I
I
TY PICALLY
plasllc film except 1 M IL
w here opaque spots ACROSS
block light. (25µm)
c d
New oxide grown
Plastic removed & over hole
phosphorus d iffused in (2µ rn)
R10~
:: N
L_:__J e
M IL
DEEP
p
p p
g h
Figure 6-2. Steps 1:n crea.ting one of ma ny I iny n-reg ions at th e s111face of a
p-type silicon slice.for an MOS int egrated circuit. Pictures are cros8-sections,
stretched abou t ten times taller to show very thin features more clearly
UN OERSTAN lllNG DIGITAL ELECTRONICS 6-3
~=========================D=I=G=ITA= L=l=N=T=E=G R=A=T=E=O=C~I=RC=U=l=TS====~=====
Next (Figure 6-2e), the hardened plastic is removed by a stronger
solve nt than before. Then th e slice is placed in a very hot oven (around
2,000 degrees Fahrenheit, 1,200°C), where it's exposed to a gas
containing a subs tance (typically phosphorus) used as a dopant to make
th e silicon n-type. The phosphorus diffu ses (soaks) into th e silicon under
each hole through the oxide, chang ing the silicon from p-type to n-type.
The oxide blocks diffusion to all other areas. When t he phosphorus has
diffu sed to a depth of about 0.08 mi l or 2 micrometres (for n-channel
transistors), the slice is removed from the oven and the diffusion stops.
The creation of then -regions is complet ed as show n in F igur e
6-2f by an oxidation process as before, covering the bare silicon spots wit h
a fresh layer of electrically insul ating oxide.
As we will see later (Pig ure l!-7), some integrated circu its such as
the TTL family require more than one of t hese cycles of diffusion through
different holes in the oxide film, creating layers of n and p-reg ions.
Finally, one last set of holes is made through t he oxide as before, fo r
electrical contacts. The slice is coated with a t hin film of aluminum over
the ox ide, reaching down t hrough the holes to con t act the silicon (F igure
6-2g ). Then photoresist and acid are used one more ti me to leave the
desired pattern of metal strips for elect rical conduct ors (Figu re 6-2h ).
These conductors form the ci rcui t "wires" that we've talked about.
There, in a nutshell, is how hundreds of integrat ed circuit chips ar e
processed together by the sa me steps as part of the same sl ice.
How do patterns of p and n-regions make a circuit?
The question rema in s as to how p-regions a nd n-regions in an IC
chip ca n form an electronic circuit. For an exam ple, F igu re 6-3 answers
this quest ion with respect to then-cha nnel MOS inverte r ci rcui t we
studied back in Figure 2-14. The upper part of F igure 6-3 shows how t he
inverter would look (greatly simplified and magnified abou t 500 times) if
it were somehow cut away and lifted out of t he su rface of the IC chip. This
way, we can see all the parts below the surface of the chip.
You should be aware that t his drawing re presen ts a region in an
IC chi p only about six mils long (150µm). That 's just a little bit more than the
diameter of an a verage human hai r, which is about 4 mi ls. The tiny
specks representing grains in the metal strips would be about the size of a
t y pical bacterium or germ. You could fi t si x or eight of these inverters
into the period at t he e nd of t his senten ce. So this is truly a
microsco pically small circuit!
For your referen ce, below in F ig·u re 6- 8 is a slightly r earranged
and more complet e version of the schematic diagram from F igure 2-1 4,
laid out exactly as the circuit above is made. As is customary in schematic
diag ram s for integrated cin:u its, the circles a rc left off t he transistor
sy mbols. The bold lines represen t parts of th e circu it made of metal on t he
surface of th e chip. The res t of th e circuit is either n-type or p-type silicon,
as labeled on the schematic diagram.
6-4 U:>D J::RST.\:-ID l:-IG DIGITAL ELECTROSICS
: -: ~
:======D=I=G=IT=A=L=l=N=TE=G=R=A=T=E=D=C=I=RC=U=J=TS-- : ======================= ~
ABO UT 0.006 IN CH - - -- -- --t
OUTPUT (150µm)
INPUT
OUTPUT
METAL
METAL ME TAL META L
I· 10 VOLTS
7. Low COST
3. Speed-Power Product
Due to the nature of transistor switching ci rcuits, usually the
shorter a gate's propagation delay, the more power it diss·ipates. To see how
well a particular gate circuit achieves both short propagation dela y an d
low power dissipation, we look at its "speed-power product." This is just
the propagat ion delay multiplied by th e power dissipation. It is usually
expressed in units of nanoseconds times milliwatts, a combination called
"picojoules." ("Pico" is an abbreviation for 10-" , meaning 0.000000000001,
and "joule" is a certain amount of energy.)
6
4. Noise Margin
The noise margi n of a gate or an y othe r digital bui ld ing- block
tells how securely it transmi ts a nd receives in formation without errors, in
spite of " noise." Noise in t his case means un wanted, "st ray" voltag e
signals picked up by the various wi res eonnccted to the circu it. The main
design feature that's importa nt her e is th e difference be tw een t he voltage
t runsmitterl fo r each " logic state" a nd the voltage required at a11 ·input to
be accepted correctly as one of the log ic sl a tes . If t he transmitted high
and low rnlt ages arc 1 volt higher a nd lower t ha n would be barely
necessary to he correctly recognized, t he noise margi n is 1 volt. This is
because it would ta ke a noise sig nal grea te r tha n 1 volt to cause an error
in such a system. Obviously, we wa nt a syste m to have as wide a noise
ma rgin as possible.
5. Fan-out
The fan-out of a ce rtain gate in a network is the n um ber of
inputs to other gates that its 9utpu t is connected to. You wa nt g ates with a
high f an-out capability - gates that can dri ve a lot of other g ates. This is
an othe r wa y of sayi ng tha t you want gates t ha t can supply (or accept) lots
of current a t t heir ou t pu ts but don't requi re mu ch curre nt at t heir inputs
(either momen tary current to change states or cont inuous cu rrent to
mai ntain a state). Loading an output wit h too ma ny inpu ts red uces t he
n oise margin and speed of the gates invol ved.
6. Density of Circuitry
You want g ates that occupy a small area on the I C chip, so you
can pack lots of gates on each chip a nd thus ma ke the circuitry very dense
(or "complex"). The area a gate occupies on the average is measured in
square mils (thousandths of an inch) or in square micrometres. The
de nsity of an IC depe nds not only on the factors we've mention ed before
(the size of the t ra nsistors and other devices, how many are required
per gate, and the number of inputs to each gate), but also on the power
dissi pation. This is because devices that dissipate a lot of heat can't
be too small or too close toge ther or they would get too hot.
7. Manufacturing Cost
The cost to make a standa rd, mass-produced IC chip depends
mai nly on its size a nd t he number of processing steps required to produce t he
circuitry on the chip. Each processing step (especially each photom asking
cycle) costs a certain amount, of course. Bu t more t han that, each step
tends to introduce a certain num ber of defect.~ on each slice, due mostly to
foreig n particles a nd scratches on t he photomask. A single speck of dust
on a photomask casts a shadow on t he photoresist perhaps as big as a
t r ansistor, possibly makin g a n enti re chip wort hless.
-5 VOLTS - 1 7 VOLTS
Note: Surface
of chip is shown
as if oxide layer
were invisible.
Speckled areas
are metal
over oxide.
B
c INPU T
TRANSISTORS
ln--
A ~ ~~~e~~~~
~ metal ......_
pI p LOAD
TRA NSISTOR
/
Contact through
0 VOLTS hOle in OK ide
N
2.3 M1L s -I
(60µm)
PART OF
FUNCTION TABLE p p
A B c D a OUTPUT
H H L L H
0 VOLTS
----a
H H L H H
H H H L H
Note: P-Channel transistors are turned on
H H H H L by a negative ("'low "') gate voltage.
" High"' is about 0 volts
t
INPUTS OUTPUT
j
a
........
~~.....,.
/
, ~~~
I
- - --
...... from receiving gate
I
~
B OUTPUT B
N· TYPE
LAYER
N-P-N TRANSISTOR
ISOLA TION
I\
D IFFUSION
Bold lines
+ 5 VOLTS
~ LARGE
are metal \ I
I
' I
'
Base voltage , I 'vI
over 0.7 I p I
p I I
volts turn s I I
output I I
t ransistor I
p N OUTPUT
··on '"" "'-: I CON TROLi.iNG /
J C URRENT ''
N N \ I
\ COLLECTOR
Figure 6-7. Basic TTL positive NAND gate, showing simplified cutaway
m'.ew of one transi.~tor and a r esistor in a n IC chip
6-14 UN DERSTANDING DIGITAL ELECTRONICS
==~======D=I=G=IT=A=L=l=N=TE=G=R=A=T=E=D=C=I=RC=U=l=TS========================== ~
As shown at the transistor symbol at the lower r ight in Figure
6-7, an n-p-n transistor is turned on by mak ing the base voltage at least
0.7 volt higher than the emitter voltage, and then supplying a small
current to the base region. This allows a much greater current to flow
through from collector to emi tter , in proportion to the base curr ent. Thus,
the transistor acts a~ a current-controlled swi tch (or variable resistor, if
it's not t urn ed all the way on or off.) The main advantage of bipolar over
MOS t ransistors, as far as we're concerned, is that they can be made to
switch on and off much 11wre rapidly. They can also carry much more
current than an MOS transistor of the same size, and they have much
lower resistance when switehed "on."
There are several varieties of TTL circuits, but the one basic
featu re they all have in common is t he two-transistor arrangement shown
at the lower left of Figure 6-7, which is a positive NAN D gate. These
two n-p-n transistors give the family its name: transistor-transistor logic.
As you can see, one transistor has a separate emitter region fo r each input.
This means two separate n-regions in contact wit h the same p-type base
region. We'll see how t his circuit works in a momen t .
First, however, notice t he physical stru cture of a typical
transistor and resistor in a TTL chip, shown above in Figure 6-7. To
make a TTL slice, we start with a p-type subst rate, and use photomasking
and diffusion to creat e some very heavily-doped n-plus regions. These n +
regions (only one is shown) will wind up being huried beneath t he collector
region of each n-p-n transistor, providing low-resistance paths to help
these regions conduct electri city better. Then the oxide is removed and a
layer of lightly-doped n-type silicon crystal is g rown over the surface of
t he entire slice, from a hot gas containing silicon and phosphorus. This
process, and the layer, are called "epitaxial. "
Then three more diffusions ar e made. F irst, a very deep
p-di ffusion is made all the way down to t he p-ty pe substrate, at all places
where there will not be any devices for t he ci rcuit. This is to i solat e
(insulate) a separate n -r egionfor each device. It provides a sort of
" pocket," using t he fact that current can't pass from n top. Next, a
shallower p-diffusion is made into spots in each n-region, for transistor
bases, res istors, and the "p" parts of "p-n d iodes" (devices not shown
here) .
F inally, another heavy n + diffusi on is made into spots in the
base regions to provide emitters, and in the collector regions to pro\·ide
good electrical contact points. Afterwards, the desired pattern of metal
inter con nections is produced.
Obviously, t his TTL process is a com plicated and expensive one,
with many opportun it ies for at least one fatal defect to occur in any chip
on the slice. Even so, TTL is remarkably economical, with very good
pe rformance. This is what makes it the most popular single logic family.
I FUNCTION TABLE
IN IN OUT
L L H
L H H AL L INPUTS "'HIGH" 0
O NE OR M ORE INPUTS "'Low " 0
H L H
H H L
To
OTHER
+ 5 VOLTS
EXPANDER
GATES COMMON
- - - - - - - - - - - - - - - - - - . . / OUTPUT
~ RESISTOR
OUTPUT
INPUTS ~/"
--- - ............
', INPUTS
.,..... -..........
POSITIVE LOGIC:
'(-;~':-------.
i(
c \
\: i'
I A
N \ B ' ----~'
I
,'
C
D
D '
B - -'-
, -""
,
NI
,
,'
).,...... _____ _ EQUIVALENT TO:
I
I
'
I
I
I
~
T
(Oxide and
N + regions
not shown)
2.8
MILS
(71 COLLECTOR
µm) OUTPUT
l ·.·L-----~ EMITTER
:·: P BASE .•••·.· . .•. · • .. . . . OUTPUT
INPUTS
TO EMITTERS
Figure 6-9. Most compact form of TTL lo,qic: positive NAND "expander"
gates with common output resistor (2-input versions above, 4-input chip
layout below)
OUTPUT
l
\
',, .... _____ _ Unusual n- p-n symbol
...,,.,- indicates internal
"Schottky" modification
to prevent
Diodes prevent saturation and allow
retlection of laster turn-off
incoming voltage
waves from
external connections
CONNECTED TO SUBSTRATE -
"High" signal
at either input \ Base current 1s
diver1s c onstant I \
/ supplied to turn on
current to \ I / output transistor
---
\ I
left path I / . . only when constant
I
I I current is diverted
to ri ght- hand path.
I
I
I
I
A I
OUTPUT
----Q
B -:-.--t--.---t
FUNCTION TABLE
INPUTS
A B 0
"EMITTER COUPLING" -
L L H
L H L
Constant
current H L L
from either
right or left L H L
path above.
-5.2 VOLT ·' H" more positive t han -0 8 volts
Powrn Su PP Lv " L " more negative than -1 .6 volts
Same p-n-p
e mitter c an
1n1ect other
n-p-n g ates
( not shown )
N
\I I
I I p
Bold lines
are metal
SUBSTRAT E AT 0 Vo n s
~ EPITAX IAL
LAYER
+5
--,.---.......---~-.....-..--~
VOLTS
INPUT OUTPUT
r-- ' "A - - - -.,._.., j
IN~UT HI .,.,-.-,;;~---
H-- Q
s ---,--r-...: H
Transistor /
L
'"on'" when~ L
both inputs H
'" high "" r-~-'t~·P\'\
I
Transistor " off"
0 VOLTS
when at leas1
0 VOLTS one input '"low'"
TRUTH TABLE
-
s Fi Q 0
N OT
0 0 ALLOWED
5 MILS
( 127µm ) 0 1 1 0
n -p-n B ASE 1 0 0 1
INPUT CONT ACT
PRE VIOUSLY
I OUTPUTS 1 1 SET OR RESET
STATE
n-p-n COLLECTOR
OU TPU T CONTACTS d"'rli~~~J.;i:;;;;;:µ~~Q
Figure 6-13.S-R latch made of two 2-in put l'L positive N A N D gates,
showing current paths for "low" and "high" states and possible chip layout
6
Quiz for Chapter 6
1. The dense, accurate pattern 5. P-channel MOS circuitry
of tiny dark spots on a provides:
transparent photomask is a. Very short propagation
prepared by what method? delays.
a. Photographic reduction b. Large, complex chips.
from a larger version, as c. Low-cost processing.
with microfilm. d. B and C a bove.
b. Drawing actual size by 6. Complementary MOS
hand, with tiny ink-pens. circuitry is especially strong
c. Drawing a bigger version in the area of:
on a plastic sheet and a. Dense, complex circuitry.
shrinking it in an oven. b. Low-cost processing.
d. None of the above. c. Low power dissipation.
2. A speck 0f dust on a d. Very short propagation
photomask for an n-diffusion delays.
can spoil an entire: 7. Which family is t he most
a. Slice, by causing one commonly used, best
defect. all-around choice for a wide
b. Chip, by causing an variet y of g eneral
n-diffused spot. applications?
c. Chip, by preventing a a. P-channel MOS.
spot from being diffused. b. Complementary MOS.
d. Photomask. c. Transistor-transistor
3. Current is kept flowing in the logic.
right places in the silicon by: d. Emitte r-coupled logic.
a. Silicon oxide insulation 8. Which fam ily provides the
between transistors. shortest propagation delays?
b. The photoresist layer. a. P-channel MOS.
c. The fact that voltage b. Complementary MOS.
cannot easily force c. Trans is tor-t ransistor
positive charge from an logic.
n-region to a p-r egion. d. Emitter-coupled logic.
d. All of the above.
9. What advantages does
4. Generally speaki ng, the size integrated injection logic
of a chip and the number of offer?
processing steps required a. Short propagation delays.
determine: b. Density and complexity.
a. Noise marg in. c. Very low power
b. Fan-out. dissipation.
c. Cost. d. B and C above.
d. All of the above.
(A nswers in back of the book )
6-24 UNDERSTANDING DI GITAL ELECTRONI CS
7
MASS STORAGE IN D IGITAL SYSTEMS
Mass Storage
in Digital Systems
W.e began our study of digital electronics with a complete
system- the calculator in Chapter 1. Since then, we've narrowed our scope
dow n to individual part :; found in most digital systems-gates, flip-flops,
and building-blocks of various kinds. In due time, we're going to put all
our accumu lated understanding of the parts together and consider entire
systems agai n. But before we do so, there's another kind of part t hat we
need to take a look a t, which is "mass s torage units" in digital systems. So
that will be our subject for this chapter .
What is a " mass storage unit"?
Another name sometimes used for "mass storage unit" is "mass
memory," or sometimes just "memory." We're talking about a sort of
"reference file" where relatively large quantities of information are
stored, perhaps for a relatively long time. This general definition sets
mass storage units apart from build-ing-blocks that store information, such
as those we studied in Cha pter 4. You wouldn't call a single flip-fl op or a
coun ter a "mass storage unit." And a single register would not he
considered a mass storage unit unless it could hold a large number of bits,
as we will see later.
The difference between mass storage unit a nd other units that store
information will become more clear to you as we go along . However, it
may be helpful at this point to look at some exa mples in our calculator
system, shown in Figure 7-1.
Obviously, the microprogram memory subsystem is a mass
storage unit. As you wi ll remember from Chapter 1, t his unit con tains
many instructions, stored there when the IC chip was made, that the
controlle r refers to at each step in the calculator's operation.
Any one of th e six registers shown in Fi,gure 7-1 would not be a
mass storage unit by it:;elf However, in a t ypical calculator, the three
"number" registers (and perhaps even the flag register) would be made as
parts of a single storage urL'it that would qual ify as a mass storage unit. It
would be a fairly large reference file fo r information to be put into and
taken out of as necessary, and where information could be left for as long
a period as desired. These examples fro m t he calculator should give you a
general idea of what we're talking about when we say "mass" storage unit
or memory.
DISPLAY
SEGMENT
LINES
KEYBOARD
"' - - SC AN L INES
SC AN
GENERATOR
.....__ _ ___, ADDRESS
REGISTER
.
MICROPROGRAM
MEMORY
• DISPLAY REGISTER
ADDER·
SUBTRACTER
• OPERAND REGISTER
ROUTING
•ACCUMULATOR REGISTER CIRCUITRY~-------
How can shift registers provide " serial- access" mass memory?
Since shift registers are the only type of mass memory unit in
Figu re 7-2 that we're already fa miliar with, let's begin our study wit h
them. F irst, let's see how shift regist ers are typically m ade in to mass
memory un its, and t hen look at an application in a system .
UNDERSTANDING DIGITAL ELECTRONICS 7-3
~ MASS STORAGE IN DIGITAL SYSTEMS 7
~ ============================c=::====
You may want to refer back to Chapter 4 (Figure 4-3b) to remind
yourself of what a shift register is. It's a string of one-bit storage units
with a common clock . (In Chapter 4, the one- bit storage units were
flip-flops. We'll see another kind a lit tle later.) At each clock pulse, the
stored bits shift one step along the st r ing.
Now when a shift register is used for mass storage, it is usually
provided with a data selector and a "recirculation path," as shown in
Figitre 7-3. The bits in t he register are continually shifted to the right by
regular clock pulses, without ever pausing. When the "loading control"
input is at "O," each bit that's shifted out the right end of the register is
shifted right back into the left end. Thus, the output shows us every bit in
the register, one at a t ime, over and over again, like a Ferri s wheel going
around. Recirculating shift registers can be made in any length. Some
(like the Texas I nstrument.s TMS 3133) a re over a thousand bits long.
Data is loaded into this recirculating memory through the "serial
data input," by switch ing the loading-control input to "l." A new bit is
stored every time th e clock is pulsed.
It's obvious why t his is called a "serial-access" memory. It's
because the stored bits appear at the output in series. You can't access
(get to) a stored bit immediately to read it or change it, unless it happens
to be at the output at the moment. You have to keep count of the clock
pulses to know where t he bit is, and wait for the bit to appear at the
output at a certain time.
CLOCK
(Bits shift one
step to right r- --- - --- -------,
at every pu lse) ROUTING I
CIRCUITRY
SERI AL
D A TA Our
Data recirculates
t
Register can be any length
when control is "O'"
SERIAL
I DATA IN
I
I
I
I
I
I
I
I
I
l..- - - - - - - - - - - - - - -"
LOADING CONTRO L
0= REC IRCULATE
1 - L OAD
Figure 7-3. How a shi}I reg·i st.er can be used as a mass memory um:t by
recirculating data
================================= ~
What's a typical use for a serial-access memory?
Serial-access memory units such as recirculating shift registers
can be very efficient as mass memories in applications where the data
naturally needs to go in or out (or both) in serial form. A good example is
the three number registers in the calculator system of Figure 7-1.
(Remember, each register by itself would hardly be a mass memory. But
all three together serve as the calculator's mass data memory.)
F igure 7-4 shows why serial access can be useful in these
r egisters. It comes in handy when the two numbers in the display register
and the operand register are being added or subtracted. The binary-coded
decimal digits of each number go to the adder-subtracter one at a time in
the order in which they're stored. First, the two "least-significant digits"
(those on the far right) are added or subtracted, then the next digits to the
left, and so on.
In the next chapter, we'll see just how the four bits of each BCD
digit are added or subtracted. (It's somewhat more complicated than
adding pure binary numbers, which we learned about in Chapter 3.) F or
now, we'll just point out that as soon as two digits are sent to the
adder-subtracter, the adder-subtracter produces the appropriate "sum" or
"difference" digit. These resulting digits must be loaded into the
accumulator register in the same sequential order (least-significant digit
first). MOST LEAST Only one pair of 4 -bit
r
SIGNIFICANT SIGNIFICANT decimal digits can be
DIGIT DIGIT added or subtracted
0 0 0 0 0 0 7 6
4-BIT
OPERAND REGISTER BCD
0 0 0 0 0
ACCUMULATOR REGISTER
0 5 B
ADDER-
SUBTRACTER
"
4 -BIT
"SUM "
DIGIT
0 0 0 0 0 0 0 0
/
"Carry" (or " b orrow" ) bit is
stored to put 1n with next
pair of decimal digits.
S EQUENTIAL
S TEPS IN _ _ . , 3 2 l
ADDITION: ( 1) ( 1) (0) - CARRY FROM FLIP-FLOP
1 3 4 - To A CCUMULATOR REGISTER
Figure 7-4. Simplified, general picture of part of calculator system,
showing why digits need to move in ind out of number registers serially,
with the "least significant" digit.fin '
UNDERSTAN DING D IGITAL ELECTRON ICS 7-5
~ MASS STORAGE IN DIGITAL SYSTEMS 7
~===================================
As each pair of digits is added-say, the 6 and 8 shown in Figure
7-4-the adder-subtracter also produces a "carry" bit (which for 6 and 8
would be "l," along with a sum bit of 4). The carry bit is stored in a
flip-flop and added in with t he next most sign ifican t pair of dig its (in this
case, the 7 and 5). Similarly, a "borrow" bit is stored in the flip-flop during
subtraction.
Now our so-called mass memory in Figure 7-4 doesn't have to be
designed wit h serial access. In fact, there are many calculators that do not
have a serial-access mass data memory (because they're a type of
"microcomputer" programmed as calculators). But the point of this
example is that it would be very conveni:ent for the registers in Figure 7-4
to have serial access. So let's see how recirculating shift registers coul d be
used in t his "naturally serial" application
How can a calculator use recirculating shift registers?
As indicated in Figitre 7- 5, we would use four recirculating shift
registers for each number r egister-one for each bit (8, 4, 2, 1) in the
binary-coded decimal digits. All twelve shift registers are clocked in step
together , so that the bits for all t hree least-significan t digits show up at
the outputs (and the inputs too, of course) at the sa me time.
When the least-sign ificant digits appear at t he outputs, the
controller tells the adder-subtracter to begin adding (or subtract ing). And
t he controller tells the routing subsystem to route the adder-subtracter's
output digits to the accumulator-register input as shown in Figure 7-5.
The rest is automatic. All t he controller has to do is sit back and watch the
digits march out of the two upper registers in time with the clock pulses,
a nd watch each resulting "sum" or "difference" digit roll right into the
correct spot in the accumulator r egister at each clock pulse.
Right after all eight digits in our simplified calculator's numbers
have been added or subtracted, the controller tells the routing subsystem
to switch the accumulator register back to "reci rculate." And we've got the
new number (the sum or difference) rollin g around in the accumulator
register, in step wit h the two original numbers in t he ot her r egisters.
This example shows how handy a serial-access memory unit can
be. It can save the controller a lot of trouble (time and program steps)
when the data naturally needs to move serially, as in this exam ple. It
works just fine so long as the controller can so mehow be synchronized
with the memory unit, so the controller can start and stop processing with
the correct digits. In our fu t ure discussions of the example calculator, we
will assume that it uses recirculating shift registers as we have just seen
in Figure 7-5. (To be perfectly accurate, a calculator would mor e likely
use another type of mass memory called a "sequentially accessed
dynamic memory," similar to "dynami c RAMS" we'll see later. However,
such a memory behaves exactly like the recirculating shift registers that
we have just discussed.)
=======--==========~
q,3
OUTPUT INPUT
CLOCK q,2 DIGITS TO D IGITS FROM
GENERATOR
SEGMENT KEYBOARD
<J>l
DECODER
6 n
ENCODER All data paths
DISPLAY REGISTER
ru___$l_, / have 4 w ires
..
l1-ke_ t_h_1s_ _ _..
I I I I ~~~~1=12~~ !
-== i _ _ _: J : :
j
'-J.~ ADDER-
SU BTR ACTE R o--~-~
rd rnnTiTiH~~if~:~,i
.___ _-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-=._-:·- - - - - -' rs
0
I
ACCUMULATOR REGISTER : ROUTING
I SUBSYSTEM
I
I
¢2 CARRY-BORROW
B IT STORAGE
Figure 7-5. Possible use of shift registers for "serial access" mass data
memory in calculator from Figure 1- 6'. Paths in "routing" subsystem are
those for an operation being performed by the adder-subtracter.
J
" GATING "
¢2 T~;~!~~R ¢1 . _ CLOCK - ¢2 ¢1
__ J•~·~·~·L[>r--
! \ ] " MASTER" " SLAVE" : " MAS TER "
/ fl ::~~
-
I ~*~- i
-...l.-
Dynamic storage circuit L----=-~-- -- -
_ _L _
_______:-: _______ J
I
- -t2VOLTS
L - - - - - - - - - - - - - - - - - - - - -....~ TIME
MICROPROGRAM
MEMORY
CONTROLLER UNIT
( READ-ONLY MEMORY)
=======-==========================--== ~
Both the addresses and the instructions are in binary fo r m,
consisting of ones and zeros. A typical calculator might have 256
instructions, each consisting of 16 bits, for a total of 4,096 stored bits. To
coun t addresses from zero (00000000) to 255 (11111111), each add ress must
be eight bits long.
To begin understanding how such a memor y works, let's first see
the general way in which the storage units are arranged in all
random-access me mories- both the "read-only" types and others we'll
come to later.
How are storage units arranged for random access?
Figure 7-8 shows the general idea of how one-bit storage uni ts
(or "cells") of any sort would typically be arranged so that stored
information can be read out at random. (The same arrangement works for
writing too, as we'll see later.) For the sake of simple explanation, this
memory stores only 16 bits, as eight "words" of two bits each. A "word" is
a group of bits that arc stored together in a random-access memory, and
also processed together when possible. (For example, each 16-bit
instruction stored by the microprogram memory in Figure 7-7 is a word.)
00
01
ROW
DECODER
ACTIVATES 10
ONE
" ROW-LINE"
"
I
COLUMN /
SELECTOR /
/
/ ....., Data selector selecls
L---------------' " two column-lines for
A DDRES S ~ a two-bit word output.
REGISTER
......................... WORD OUTPUT
REGISTER
Figur e 7-8. A .~i mple random -access memory storing eight 2-bit words,
slwwing typical rectangular pattern and method of "accessing" by row and
column lines
UNDERSTAN DING D IGITAi. ~~LEl:T RONICS 7-11
~ MASS STORAGE IN DIG ITAL SYSTEMS
~ ==-~===--= 7
The one-bit storag e cells in Fig u re 7-i'J are arranged on th e chip in
a square pattern of four horizontal " rows" and four vertical " columns.''
Each cell is connect ed to one of fou r horizontal "row-lines" a nd one of four
Yertical "column-lines." The two cells for a g i\'en word are on the .~a me
rnw lin e. (By compari son, th e calculator ROM wou ld ha,·e 64 rows, each
storing fo ur 16-bit words.)
Addressing eight words requires thre< ' -hit add ress numbers,
running from zero to seven. (In Fi,q ure 7- 8, we 're addressing word number
five-101). Two of t he address bits go to a " row decode r,'' causing it t o
act ivate one of the four row-lines (in the figure, it's row number t wo, or
binary 10). Thi s makes all four cells in th at row transmit their bits in their
column lines. Of these four bits, t wo (one word) are selected by the
"colum n selector." This is a dat a selector con t rolled hy the remaining bit
of the address (l, in the e xample) . Thus, th e add ressed word ( 10) is placed
in the "word output regi ster."
Nearl y all random-access-t ype me mories use one rnri a tion or
another of this basic idea of a rect angular " ar ray" (arrangement) of
one-bit storage units. It allows the storage uni t s to he packed closel y
together, without an excessive amount of interconnecting wires.
With th is unde rstanding of random-access memories in general,
let's look in more detail at a read-only memory. This will be a particular
kind of ROM-on e t hat's made in a p-channel MOS integrated circuit, such
as a calculator chip.
================-==--~==========-- - :-==== ~
Each vertical line is a
long "p" region 1n chip.
p p p
I (COLUMN LINE) (GROUND LINE) ( COLUMN LINE)
I
r - ---- --,
1 TH ICK
I
Ox1or."" I•
...._.,-1-..,.:~ T :
IL_ _ _" O"
_ __ _ J•
-17 VOLTS -17 VOLTS
Two p -reg1ons
L OVOLTS _ , _
- (SUBSTRATE)
form column lines.
TL -s voLTs_Jf
!._ ''LOAD ' ' TRANSISTORS ~
._______--]
- --COLUMN SELE CTOR
COLUMN
LINE
Tiny area
ol th1n oxide
allows row line LINE prevents
to acl asMOS transistor
gale. storing " 1.. action.
sronng " O"
=================== ~
As we learned earlier in the case of shift registers, there are also
two general types of RAM: dynamic RAMS t hat store bits in the form of
electric charges, and static RAMs that store bits in flip-flops. Let's look
first at dy namic RAM s.
How do dynamic RAMs work?
Dynamic RAMs fit the general patte rn for all random-access-
type memories that we discussed in Figure 7-8. (Remember, we said you'd
see those general features in all memories with random access.) Electric
charges are put into the cells through the column lines and read out
through the same lines, using appropriate switching circuitry in the
"column selector" section. As in all dynami c storage units , the stored
charges decay in a fraction of a second, so they have to be ··refreshed'"
often by one method or another.
Figure 7-10 shows the general idea of one of many types of
dynami c RAM. Due to the exceedingly tiny size of each storage cell, this
one integrated circuit (perhaps 0. 16 inch or fou r millimetres square) can
s tore 16,384 bits in 128 rows and 128 colu mns.
/
One row-line al a
time is activated.
ROW
DECODER \
16.384
T~
WORO
Ab1tis!d~
o~---
as presence )
ADDRES S absence of c hange
on a capacitor.
- - f13
As with any kin<l of RAM, the challenge in designing a stati c
RAM is to make a storage cell that occupi es a small a rea and requires very
few electrical connectiow;. Let's look at just one of many different kinds of
static RAM cells, called a "diode-coupled" bipolar cell. This will give us an
idea of just how 8imple a.flip ~fiop can he.
The general idea of a bipolar RAM with d iode-coupled cells is
shown in Figu re 7-11 . Like certain other RAMs, this one has t wo
column-connections to ea,fh cell, called "bit-lines ." As ind icated in the logic
diagram of one cell (Figu re 7-lla), each bit-line is connected t o t he outpu t of
one inverter and across to the i np ut of another inverter. (The two "diodes"
act as one-way valves, as explained further in Fiy u r l' 7-1 l c. Thus, they
prevent all the cells in one column from interacting with each other. )
The row-line connection to each cell provides a ground connection
for both inverters. (A positive power-supply voltage is also provided to
each inverter, as show n.) As you can see in Figure 7- llb, t his is a pr et t y
sim ple, compact ci rcuit. It contains just two t ran sistors, two resistors, and
the t wo diod es.
POSITIVE
+ POWER
Row
LINES
t
/
ROW Ro w-line connection
DECODER provides g round terminal
for both inverters
A low voltage selects
OTHER Row s one cell in each column.
COLUMN SELECTOR
PLUS READ & WRITE CIRCUITRY
DATA Our
b. Schema tic diagram of cell.
A NODE CATHODE
C urrent easily flows
SYMBOL \ 111111 /
"forward" when anode
has more positive vo ltage, SEM1CONOUCTOR r;T";l
but current is blocked 1n CONSTRUCTION L.:.J....:J
" reverse " d irec tion whe n - - - - -
c athode is more positive. " FORWARD"
Fig ure 7-11. General idea ofa bipolar (static) RAM u.~ing a
"diode-coupled "flip-flop for each cell
======~=========== ~
A core is "read" by attem pting lo flip its field to the "O"
direction. If the core was already in the "1" posit ion, its magnetic field
will "flip over." The changing magnetic field generates an electric pulse in
the "sense wire" passing through all cores in t he plane. Then the core has
to be restored to its original "1" position, to keep the stored data the same.
This invokes te mporari ly storing the bit that was just read in a flip-flop,
and routing it back lo the core-drive circuitry, which immediately writes
t he bit back in to the same cor e.
Since only one cor e at a time can be accessed in a plane, each
bit of a word is stored in a different plane.
The r eason core memory units are non-vola tile is that it doesn't
take a ny power to keep the cores magnetized. In some systems, it's very
important for stored data to sur vive a power failure, without having to
provide a n emergency power supply. Because of this capability, cores will
probably con tinue to be used in certain systems, even though they cost
more and take up mor e space per bit than semiconductor memories.
FLIP-FLOP
ADDRESS
LI NES t
...__ _ _.......__ ___.._ ___....._~
+ y, S Output feedback
to restore sensed
0ATA IN DECODING AND core to original state.
" CORE-DRIVE" CIRCUITRY
Figure 7-12. In a typical core memory unit, thousands of cores are strung
on wires in a r ectangular pattern like this, called a "plane"
I I I I
I I I
PUNCHED I I I I
I I
CARD I Light sensor over
I I I I
each row of holes
to detect holes
Rows of Punched Holes
PAPER
TAPE
MAGNETIC
TAPE
Invisible magnetized Magnetic pickup
spots 1n rows called "tracks" & rec ording head
on each "track"
MAGNETIC
DISK
OR DRUM
================================= ~
One column of bits is sometimes r eferred to as a " byte" (maybe
because it's a bunch of bits that's "bitten off" together). "Byte" usually
refer s to several bits grouped together for convenience in transmitting
and receiving them. Usually, ii takes several bytes to make a word. As we
have seen, a word is a group of bits that are stored together in a RAM,
such as a binary number.
Since cards and paper tape are slow and comparatively difficult
to handle, and since the stored data can't be changed, these methods are
used mainly for getting information into and out of a system. A stack of
punched cards or a reel of punched tape is read into another memory in
the system, and then put back on the shelf. Occasionally, however , you'll
see a loop of paper t ape being used as a recirculating read-only memory.
More than
1000 bits per chip
I
50 to 100 thousand bits per chops
I
COST
PER 0.01¢
BIT
0.0001 ¢
Figure 7-14. Rough comparison of cost, speed, and capacity of several types
of mass memory as of middle to late nineteen seventies
7-22 UNDERSTAND ING D IGITA L E LECT RON ICS
~
7
MASS STORAGE IN DIGITAL SYSTEMS
================================== ~
Also written in on the chart are typical capaci ties of various
units, in terms of bit s. Generally speaking, the lower the cost per bit, the
more capacity you can afford in a given unit; so these two aspects are
closely related. The main point to notice is the very wide range among the
memory types in cost, speed, and capacity.
To give you an idea of what these numbers mean in terms of how
various memory types are used, let's consider a typical computer, shown in
ge neral block-diagram form in Figur e 7-15. F or the time being, you can
assume that this system works much like the calculator we've been
discussing all along. (Our adder-subtracter is a sort of arithmetic and logic
unit or AL U. Our number and flag registers are a sor t of main memory.)
INPUT - - - - -
Slow access PERIPJHERAL U NITS
low cosll bit
high volume Medium access
(more than t ime. cos t/bit,
MAGNETIC 100million & volume ( 50
TAPE b its) MAGNETIC million bits)
UNIT DISK
OUTPUT UNIT
=================================== ~
Quiz for Chapter 7
1. A shift register can be made 4. What is the principal
into a recirculating mass advantage of dynam ic shift
memory unit by: r egisters over static shift
a. Routing data to an register s?
adder-subtracter. a. They lose their data if
b ..\faking the register a shifted too slowly.
thousand bits long. b. They can be shifted faster
c. Providing a data selector to than any other kind of shift
load or recirculate. register.
d. Us ing dynamic storage c. They provide more bits in
uni ts. smaller area.
2. A serial-access memory unit is d . A and B above.
especially useful in 5. Addressing one or more RAM
appl ications where: cells for access requires:
a . Data consists of numbe rs. a. Selecting a row line, using
b. Short access time is part of the address.
req uired. b. Selecting one or more
c. Each stored word is column lines, usi ng part of
processed differently. the address.
d . Data naturally needs to c. Both of the above.
Aow in or out (or both) in d . None of the above.
serial form. 6. In a n MOS read-only me mory,
3. In a dynamic shift registe r, each column-line with its
what prevents data from transistors, neighboring
being lost due to leakage of ground line, and load
charge? transistor acts as:
a . Preventing all leakage a. A dynamic storage cell.
with good insulat ion. b. A static storage cell.
b. Renewing the charge with c . A shift register.
constant current. d. A logic gate.
c . At every shift, the stre ngth
7. In an MOS read-only memory,
of the charge representing
why doesn't the electri c field
a bit is refreshed by the
from a me tal row-line turn on
inverters.
"channels" between all the
d. Each bit is shifted all the column-lines and ground lines
way to the output of the it crosses over?
register before it has time a. The oxide is too thick
to lose all its strength. except where transistors
are desired.
b. The oxide is too thin except
where transistors are
desired.
UN DERSTANDING DI GITAL E LECTRONI CS 7-25
~ MASS STORAGE IN DIGITAL SYSTEMS 7
~ ===================================
c. No charge is stored on the 11 . What is the principal
row-lin e. advan tage of magnetic cores
d. The column-lin es a nd over se miconduclor RAM
g rou nd-lines are too far cells?
apart. a. They are much smaller a nd
more compact.
8. " Random-access me mory" or
b. They are much more
" RAM" usually refers to:
economical.
a. All memory t ypes with
c. A bit doesn't ha ve to be
random access.
re-written after reading.
b. Only those
d. Stored information
random-access-type
remains when the power is
memories that can be
turned off.
writte n into as well as read
from. 12. Why a re cards, tape, and disks
c. Only memories with considered to be serial-access
dynamic cells. rather than random-access
d. Only memor ies with static uni ts?
cells. a. To gel to a desi red part of
the stor ed informat ion,
9. What is t he main
you've got to pass by other
disadvan tage of dyna mic
RAMs? parts.
b. They don 't use
a. They can't be written in to.
semiconductor circuits.
b. They are addressed
c . They don 't store data in
seri ally.
rows and columns.
c. You have to read the data
d. Their access ti me is longer.
out before it decays due to
charge leakage. 13. How arc magnetic disks and
d. Normal operation must drums like reci rculating shift
include refreshing charges. registers?
a . They have abou t t he sa me
10. What feature of a static RAM range of capacity in
cell makes it a flip- fl op? number of bits.
a. Its storage of charge.
b. Their access times are
b. Accessing it by row and
about the same.
column. c. Their storage is
c. Two inverting gates non- volatile.
cross-cou pled as a latch. d. Stored data is available for
d. The use of current for reading over and over
" writing" and "reading." again, in t he sam e order.
8
DIGITAL SYSTEMS FUNCTION
How Digital
Systems Function
Befor e we go on, let's take t ime for a brief review. Figure 8-1
illustrates the high points of what we've learned about digital electronics:
Digital systems process information by putting it into the form of many
little pieces called "bits." These bits are processed by simple circuits called
"gates" and stored in several different ways-particularly in "ftip-ftops"
made essentially of gates. Gates and storage units can be put together in
any number of different ways to handle nearly any kind of information-
processing job. But there are certain ge neral patterns that have been
found useful as "building-blocks " to do certain jobs needed in a very wide
variety of systems. W c have learned to recognize several typical kinds of
building-blocks.
GATES ANO
S TORAGE
UNITS
INFORMATION IN
THE FORM OF B 1TS
=D-
0
I
0 0
I
0
1
I
0
1
D-
£t
0 0 0 0
K
-
B UILDING
B LOC KS SYSTEM S ANO S UBSYSTEM S
?.
Figure 8-1. The ne.rt log iwl qne .~ tion after seei ng how bnilding-blocks
work is, "Hm1• do entire .~y.~ f e m 8 and .~ubsystemsfunction?"
8
G -=------.:=====---==c - =
Now we're ready to move on to the next question, which is,
" How do en t ire digital systems function?" That is, how do the parts of a
system work together to perform the "function" (the job or purpose) of
the system? How arc digital systems designed? The same question also
applies to digital .mhsystems and any other major parts of systems which
have their own functions (purposes).
This is a pretly big question, because there are so many different
kind;, of digita l systems and subsystems. They range in size and
complexity from a simple digital vol tmeter a~ in F 1:.<)'llr e 4-2, to computers.
(Pigiire 7-75 is one example , but many computers arc much more
complex.) Information may flow in and ou t very rapidly as in the digital
television transm ission system that we envisioned in Figure 5-15, or as
slowly as you r fingers press t he keys of a calculator. Some systems such as
the autopi lot of Figure 5-11 do only one job, while others such as
computers can do many different jobs. So how can we hope to comprehend
so many different things?
Two
INPUT
REGISTERS
Result is a
t
......
SUM BITS 16 bit word
L EAST _.r
SIGNIFICANT -
......
FROM 1-BIT
A DDERS
ONE
which is then
stored 1n RA M.
I
BIT
OUTPUT
I
(LSB )
-- R EGISTER
t
I
1-, /.-
1 6 BITS
- LSB
--
SIGNIFICAN T
Bir
(MSB) '~
-
16-BIT
-
1
Two WORDS LSB _ = BINARY
16 B ITS
-- -
ADDER
TAKEN O NE v
AT A TIME
FROM RAM -
I
\
16 BITS
/
-........ -- -
.._ MSB
OUTPUT
CARRY OF " 1 "
INDICATES
MSB _ OVERFLOW
UJ
f-
<( UJ
CJ z I--
0
w
FUNCTION
8
: <;; ~ ~
/o ._ ~~
~ ~ _;;
CD
;.i
<
(\J
CD
(\J
(\J ;.i
<
::0
(")
:J
Cf)
CD u.
0
<J)
>-
(")
iii
< (") a:
z H :J
0 0
i= u..
Ci
0
.,;
<u. a: -
0 05_~5~
~ ""5 o .o .S
~ ti)~~ .,.....(:
Cl 3 cn - ~a
,_<( ..,. (.)UJ~:J.O
.i=.
~~-n_o
Cf)
CD
- c:>
"z
Ci
.<!1, .S c
w ..,.
0
w
a: < ..,.
Q H
':J
"'iii
<J)
0
Q
::0
0
[ ~ ro <J)
z
>-
iii a: ~ :a: ~-:;-
UJ UJ ,_ <(
CD
>-
CD
::0 ::0 t!: <!) z
a: :J :J :J z Cl
a:
<(
z z F ~us
(.)
0 0 \'.'..
Cl
z "'>- "'>-
iii iii
>-
a:
:i a:
0 a: a: ~ <(
:J :J (.)
0 0 0 H
_;; u.. u.. Cl
..,.~
z
6
(.) Cl
>-
:J
0
1-BIT FULL
CK
ADDER
CK
A
SHIFT REG ISTERS
B S HIFT REGISTER
C,
CK
CK
Figure 8-4. I dea of how binary nurnbers can be added in "'full serial"
fashion , using one 1-bitfull adder
--=== =
DIGITAL SYSTEMS F UNCTION
8
The two incoming numbers to be added, called A and B, are first
placed in two shift registers (by way of connections not shown in Figure
8- 4). The two registers are clocked in step wit h a third shift register that
receives the "sum" bit. The least-significant bits (LS Bs) go to the adder
first, and after 16 clock pulses, the 16-bit sum is in the output register. A
flip-flop clocked in step with the registers stores the "carry" bit from
adding each pair of bits, and passes it to the adder for adding in with t he
next pair.
(Incidentally, although the adders in this chapter perform t he
same function as those in Chapter 3, you'll see slightly different labels for
the inputs and outputs in Figures 8-3 and 8-4. These somewhat more
complicated labels match those you're likely to see in an in tegrated-circuit
catalog.)
Full-serial addition wouldn't be used in the arith metic and logic
unit of a computer, because it's far too slow. But it comes in very handy
when we don't need high speed but do need to save cost and space on an IC
chip. A good example is the "program counter" in our example
calculator-so let's take a look.
8
DIGITAL SYSTEMS FUNCTION
PRE SE 1 TO A o o 1
LSB
D Q
CK Least-s1gnif1can1bit
\ (LSB) and most-sign ifi-
cant bit ( MSB) are 1n
CK these positions at end
of each instru ction cycle
C, A B
a 1- BIT
CK CK FULL ADDER
D
''CARRY" FuP-FLOP
8
INCOMING O NE OF SEVEN 5 -VOLT
< : CARRY 81 T . ' NAND EXPANDER
POWER SUPPLY
GAT ES ..
I
{ c. - -
~ B
I v
r - - - - --- -- -,
I
rh
' SUBSTRATE
( GROUND,
0 VOLTS)
I
\ 81T: I
A ODED I
I
I AND .. GATE
l
I
WITH FOU R
I
I EXPANDER -GATE
I INPUTS
INPUTS
~-------~INVERTER
CIRCUIT LIKE
v
EXPANDERS
AT LE FT
OUTPUTS
t
.______.____ c
1
INVERSE OF
0U TG DIN G C AR RY 81T
A B C. C.., """"-
H IGH-SPEED .. AND " GATE
WITH T HREE
EXPANDER -GATE INPUTS
What does the logic diagram look like for the adder?
For your reference, F(qure 8-7 shows the logic diagram for the
schematic in Figure 8- 6 (assuming positive logic). Also shown is the truth
table, which happens to be the sa:rne whether positive or negative logic is
used. The basic part of the truth table is the same as we first saw back in
Figure 3-15. But the logic diagram in Figure 8-7 is different from the one
in Figure 3-15. This is to take maximum advantage of the simple, fast
"AND-OR-invert" combination, as explained in Figure 8-7.
The main thing you should note in Figure 8-7 is that each gate
can be recogn-ized in the schemat'ic diagram. Beside improvi ng your
familiarity with TTL schematic diagrams, this example is a reminder of
how complex even a simple one-bit adder can be. So you can see why we
want to avoid full-parallel addition if we can get away with it.
8
c.
B C,,,
A LOGIC DIAGRAM
(POSITIVE LOGIC)
TRUTH T AB LE
HAPPENS TO BE SAM E WITH
POSITIVE OR N EGATIV:O LOGIC
FOR
INPUTS OUTPUTS
REF .
A B c. c .. c ... "
0 0 0 0 1 0
0 0 1 0 1 1
0 1 0 0 1 1
0 1 1 1 0 0
1 0 0 0 1 1 n---- - - - c..
I
1
0
1
1
0
1 0 0
S1mple. las1"AND-OR-1nver~
"
1 0 0 comb1na11on p roduces inverted
1 1 I 1 0 I carry b11. To avoid further
propagalion delay 1n rippling
A B CC o f carry bils through chain
of adders. leave each carry
inverted as shown below.
A4 B4 A3 83 A2 B2 A1 8 1
To use 1nver1ed
carry b11s. bold
adders use negative ~--co
C4 ~4 ~3
Figure 8-7. Logic diagram and I ruth table for one-bit achier in preceding
fig ure, showi ng how seve ral o.f these adders can he u:oed lugeth er U'ithou t
n eeding in ·uertersfor the carry bits (e~tc ept at the end)
8
CK
l
----
DISPLAY REGISTER
CK
4-BIT
-,...___ '
-- BCD
ADDER
,...___
i---
-- ACCUMULATOR REGISTER
OPERAND REGISTER
0
2
!
0 -NINE
ADO: 0 0 0 -EIGHT
8
DIGITAL SYSTEMS F UNCTION
G = == Figure 8-10 shows how this method for BCD addition can possibly
be handled in a calculator. Inside the adder-subtracter would be two 4-bit
binary adders as shown. A little decoder network puts out a " l " when the
sum is greater than nine, and a "O" otherwise. I n the second adder , the
binary sum is added to a number consisting of "O" in the ones and eights
places, and the decoder output in the twos andfcmrs places. So this number
is six (0110) when t he decoder is recognizin g a number g reater than nine.
Again, it's a pretty simple idea, right?
What you've seen in these discussions of how t he addition
function can be performed is examples of different ways to group bits
together fo r processing . The quest ion of grouping comes up in the design
of various stages of processing in a system - not just for addition . And as
we've seen, the answer depends on careful considera tion of how fast the
function must be performed and how rnuch processing capacity can be
afforded.
So now we're ready to move on to the second of the three factors
that we said must be considered in design ing a "system func tion ."
l /"O"
IN COMING B, SUM
CARRY
B,
B,
C. Decoder gener. ates -::-
" 1 '' when sum is .. ..
greater than nine . 0 c. c~ .. .
this makes 0110 (six) =
at second adder . OUTGOING CARRY
CK
Figure 8-10. How two 4-bit binary adders u·it.h a sirnple decoder can
perforrn additions in BCD code in the adder-subtracter of a calculator.
(This tirne, term foal labels indicate the numerical significance of each
bit in a binary number.)
= = =G
What are "hard-wired" and "variable-programmed" control methods?
The second factor or alternative is whether to perform a given
sequence of functions by using "fixed" or "hard-wired" control on the one
hand, or "variable programming" on the other hand. A hard-wired system
(or subsystem) is one whose function or behavior is permanently.fixed, so
that the way it operates and the things it does cannot be changed. The
function is "wired" into the system, by the way the "hardware" (the
transistors, gates, components, wires) is connected together. But a
"variable-programmed" system (or subsystem)jollows instructions from a
memory unit in deciding what to do. So its operation can be changed by
changing t he "programs" in the memory. Such programs are called
"software," because they're different from the "hardware" involved in
hard-wired systems.
The difference is not that hard-wired systems don't have
programs. Many of them do follow steps in a sequence, and these steps are
often called a "program" The difference is that the program cannot be
changed in a hard-wired system.
To give you an idea of the difference between "hard-wired"
functions and "variable-programmed" functions, let's look at an example
of each kind in our calculator.
8
F U NCTION
G =~=
Basket 8, in turn, is where we would put a " l" to store a "minus"
(negative) sign for t he number. And basket 9 is for t he "decimal-poin t
digit" or DPD. The DPD tells how rnany steps from the right end qfthe
integer the decimal point goes.
Above the display in Figu re 8-11, we see t he baske t num ber for
the digit that's displayed in each of the nine character posit ions. (Not e
t hat the character position a t the far left is fo r a mi nus sig n or sym bols
indicating errors, overflow, etc.) The deci mal-poin t LED (lig ht-emitting
diode) for each character position is at the right of the digit. So t he DPD is
the basket number for the digit that's displayed in the character position
where the decimal point goes. As an example, notice that a DPD of 3 and
an integer of 00007426 in the display register ca use "7.426" to be shown in
the di splay.
Ba sket nu mb ers where each disp layed
d ig it is stored. Same as DPDs
repre se nt ing de cimal points at rig ht side
ot these chara cter p ositions. DISPLAY
L-. a
SIG N MSD
7 6 5 4 3 2
L~O / SEGMENT- LINE O UTPUTS '
-,
I. '-/ i:-, ,_,
'-
t s,t s,t
S,
t t t t t t
s, s, s. s, s, s,
SCAN LINES TO CHARACTER POSITIONS
(connections are simp lified )
I\
1
-
l 1
1
00
0
DISPLAY REGISTER
Re circulates once while e ach scan line is "on "
0
0010
0 0 1 0
0
1
0
1
-
abc d el gh
1
2 SEGMENT
- 0 0 0 0 0 1 1 0 1 - 4 DECODER
0 0 0 0 0 0 0 0 0 I
- 8 SUBSYSTEM
Lso~I
9 8 7 6 5 4 3 2 1 0
Basket 9 1s fo r t
decima.1-p.o int d igit
J Mso.....__ _ _......._ _ _ _,_, . <t>1
ASSUME REGISTER IS
8
You'll reme mbe r from Figure 1-.5 that one character position at a
t ime is illuminated wh en its scan line is "on." The scan lines (labelled S,
through S,,) are turned on one after another, from left to right. Every time
a new scan line is t urned on, the decoder subsystem must switch its e ight
outputs to the pattern for the dig it (and maybe deci mal point) to be
dis pla yed in this next character position.
Meantime, t he d isplay r egister makes one full recirc11/ation while
each scan line is "on." This constitutes one instruction cycle, th e time
during which one instruction is in effect. So du ring each instruct ion cycle,
th e decoder subsyst em has to pfrk out and store the integer digit that 's t o
be di splayed next. It also has to look at the DPD, decide whether it's going
to turn on the decimal point for the next character position, a nd reme mber
this decision. The d igit and dec imal-point signals th at it's curren tly
transmitting a re the ones it stored this way du ring t he preced·i ny
instruction cycle.
That's a summary of most of th e things the segment decoder
subsystem does. It has still other jobs to do, such as provi ding a minus sign
or error characters, and leaving out zeroes at t he left of a number. But just
the simplified fun ction of getting the correct d ig its an d decimal point into
the correct character positions is enough t o provide an illustration of the
idea of "hard-wired" control.
8
'-======-==
Enough labels and com ments a r e prov ided in Figure 8-12 for you
t o pick your way through the action of th is subsystem if you like. You will
find that t he sequence of control signals is based on a series of two
counters and a clock-s ignal input. This is because something different has
to happen whenever a new "basket" appears at the output of the display
register, and whenever a new scan line is tur ned on at the beginning of an
instruction cycle. In effect, the control circuitry counts baskets and scan
lines. Then it uses a decoder and some other combinat ional networks to
figure out what to transmit in the fou r control lines at each new step in
the cou nt. As we will see later, this general pattern of counters followed
by decoders and other combinational networks is typical of most
hard-wired systems and su bsys tems.
II
when B - 8 - S
?·SEGMENT
DECODER-DRIVER Signal to store
AS IN next decimal-point
Figure 3-8 bit from DPD - 8 - S
I comparison . when
I
DPD is transmitted
4-BIT /'------....J
L ATCHES MADE
OF " D" FLIP-FLOPS
'-..... ~--LI--
,. _~
_ _ . ..._
I /
B, - " 1 "
When
basket
" - - - - - ' - - - - ' ' - - - - ::= 9 be ing
transmitted
-,
I
I
I
being I
transmit1ed
DIGIT FROM
OUTPUT OF To VARIOUS
DISPLAY OTHER
REGISTER To SCAN SUBSYSTEMS
LINE
GENERATOR
J! 1 8 4 2
MOD -9
BASKET
NUMBER
0
I S" - NUMBER OF ~
: SCAN LINE Now . ON" 8 4 2 1
SUBSYSTEM'S "CONTROL" I MOD - 10 1 - -- - - --'- ¢1
SIGNALS (BOLD LINES) ARE GENERATED : ' B" = N UMBER nF BASKET \
BY COUNTERS. DECODERS. I BASKET N o w COUNTER
ETC IN THIS BLOCK - L ~~NE ~~A~~112i:? _ - - - -- - - - - - --- - --
-----1 ~" MASTER TIMING PULSE "
C o ntrol.of la. tches - - - - ' D FOR CONTROL NETWORK
C & 0 1s indefinite 7'j 1 y
due to rippling B _
8 _ S 1 1: 1 Latches C & D
in counters. COMPARISON nnr;--;--in C are clocked
~LIU ; ; UL ~ "CONTROL " in right se quence
1 1 SIGNALS by 9 2 & q.3
B• .JlJU::[J1_ D FOR LATCHES
I I
~
___s-L_ D
"TIMING " OF WHY TIMING SIGNALS
</>3 ~ c
SIGNALS ARE NEEDED IN ADDITION
FOR LATCHES
TO CONTROL SIGNALS
a..;= = =8
What's an example of " variable-program" control?
And this brings us to the other a lternative for controlling
seq uen ces of operations-wh ich we said earlier is called "variable
programming." This method will he easy to understand, because we've
already see n it in operation in the calculator. The fact is t hat the "master
cont rol" o\·er all th e va ri ous sections of the calculator (which ar c
the mselves "hard-wired"), is exerted by following inst met ions .~t a red in
the micropmgra 111 lilt:nwry.
Fig ure S-U shows a highly si mplified, general comparison of
vari able-program and seq uen ti al hard-wi red control. On the right , we sec
t he basic concept we studied in the decode r subsystem-a counter followed
by decode r networks, possibly with other information al so supplied. Note
that in some systems, the c:ounter can be preset to a beginn ing state that
may be required. The step-by-step control sequence is "hard-owired" into
the circuitry of such a sys tem.
VARIABLE-PROGRAM SEQUENTIAL
CONTROL HARD-WIRED CONTROL
I - COUNTER
II i----.-.--
MASTER TIM ING
INFORMA TION: I SIGN..
A-L _ _ _...__...__ _
------------ FLAGS,
KEYBOARD . I
INSTRUCTIONS ETC I
STORED IN I
M EMORY I
I
I DECODER
INSTRUCTION I NETWORKS
REGISTER I
I
CONTROLLER IL-
L--
(DECODER NETWORKS)
8
DIGITAL SYSTEMS FUNCTION
The picture on the left is just a rearranged ver sion of some parts
from the calculator block diag ram (Figure13 7-1or1-6). The controller loads
the fi rst address of an instruction sequence (a " rout ine") into the address
register. The program counter steps through the routine like t he
hard-wired counter at the right, unti l the controller interferes by stopping
the coun ting or loading a new address. Each address eventually gives rise
to a certain set of control signals, as does each coun ter state in the
hard-wired system. The controller consists main ly of decoder and other
combinational networks si mi lar in concept to those in the hard-wired
system. The big difference is that the control process in the programmed
system passes through the intermediate state consisting of stored
instructions. As we will sec in the next chapter, this makes all the
difference in the world.
The only serious drawback of variable-program control is that
it's generally slower, due mainly to the t ime required to fetch instructions
from a memory. In many cases, speed requirements prevent the use of
variable-program methods.
--== = =
is best performed in dedicated fashion. For example, the adder in the
program counter is a relatively insignificant part of the calculator chip.
But if you need a sizeable piece of hardware for the function, you'll get
8
Ordinarily, a very simple function requiring very little hardware
more for your money if you share it with other applications in the syst em.
This is why we don't stick in separate units for adding, subtracting, and
comparing. With j ust a little bit of extra hardware and programming
(which we call "software," remember?), we can make a subsystem that will
do all three jobs, which we call the "adder-subtracter. "
l
00000011
-J
>
-
-
~.
0-
z
w
0000001 1 ~ ~
'" to~ :r 000000 10 ~
~
- .-> .
"'g"ti';"' are inverted. causes correction of 1010 c. c ...
ii it's 0 and 0000 ii It's 1.
~ ~
... !;)
"COMPARISON" SIGNAL "O" - . _ O UTGOING BORROW B IT
TO CONTROLLER
;:l -
<Q ~
1 - M INUEND IS S MALLER
"'~ :-
R. 0 - MINUEND IS No t S MALLER " BORROW STORAGE U NIT
p "'· (Subtraction is correct only when '
'S.
-"'"' "'~
;:!
'ti ~
'
minuend is not sma ller l han subtrahend)
STAGE 2 STAGE 1
~ p "'·
t1
0-
~ ..
~ 1 INVERSE OF INCOMING B ORROW B rr
p
...
~
c
;:l
~
00000074 -
MINUS 00000035 -
0 0 0 0
1 1 1 1
1000 0
0 1 t I
1 1 O O
1 00 11
-01 0
0
1
1 0 0
0 1 0
1 1 1
M INUEND D IGIT
INVERTED SUBTRAHEND DIGIT
INTERMEDIAT E BORROW Brr & D IFFERENCE D IGIT
'-o o o o '- o o o o l.1
bd
0 1 0 C ORRECTION D IGIT
g; EQUAL S 00000039 -+- 0 0 0 O O 0 0 0 1 1 1 0 0 1 OUTGOING B ORR OW BIT & D IFFERENCE DIGIT
00 " COMPARISON" BIT ~ ~ ~
~
..... TO CONTROLLER 0 3 9 RES ULTING N UMBER IN AC CUMULATOR REGISTER
n How
8
DIGITAL SYSTEMS FUNCTION
How can "comparing " numbers help get the right an swer?
As indicated in Figure 8-14, the subtracter also performs the
function of a comparator, which we mentioned earlier. The "borrow" bit is
routed to the controller, telling it whether or not the minuend is smaller
than the subtrahend. This is our clue to getting the right answer when the
minuend is smaller ..
If the controller finds that the final borrow is "l" after first
trying a particular subtraction, its instructions tell it to try the
subtraction again, with the two incoming numbers crossed over the other
way by the routing circuitry. This time, the final borrow will be "O," and
the result will be correct.
....~
z not smaller than subtrahend
0
::i::
z ?1 FROM
COMPLETE 0
"Cl cl='
DISPLA Y
ADDE R-SUBTRACTER
~
t:l
3 c:r. REG ISTER
c;
c:r. SU BSYSTEM
>
r
4 c;;
~
- _.......' , ',/ /
.... -·-- - - - - - ----- 4-BIT ~
r
BINARY
t'l
r R. \ 1/ ADDER
if.I
"' ""er. I I\ "'~
(")
-!
~· _.... " ,,"'-' '............ -- 4-BIT
"'
"'z
0 ;:l _ .,., /
TRUE -
BINARY
:::
~ 'C> FROM
lcOMPLEMEN
UNIT AD DER "'
"'j
c::
"8 OPERAND
R EGISTER
I ~1 c . c .. , z
(")
-!
~ c. c .. , 0
z
~
ROUTING
'""
""i::>R. SUBSYSTEM
R. CARRY-BORROW
"'1 STORAGE UNIT
"'
!:t
.,
~
I: ~----4 - --- - - --
C LOCK
~ .......... 1-- - - - - -
"""
"'c-
!:t
To
ACCUMUL ATOR
A OO OR
SUBTRACT
- - C OM PARISON SIGN AL TO CONTROLLER
00
NJ
i:.o
I
~
G How
8
D 1c1TAL SYSTEMS F UNCTION
'-== =---=---===--=
How are three functions combined in the adder-subtracter?
As Fir;u re 8-15 shows, t he complete adder-subtracter subsystem
would rombine t he BCD addition, subtr action, a n-d comparison functions
from Figure:> 8-J(} and 8-14, using the same two 4-bit binary adder s. An
"add-or-subt r act" con trol signal from the controller causes t he "true-
complement" uni t to eit her pass through the incoming digit and carry-
borrow bit for a n addition operat ion, or i11 11erl t hese signals fo r a
subt raction operation. Similarly, the "correction decoder" generates either
the 0110 or 0000 required for BCD addition or the 1010 or 0000 required for
BCD subtraction. This, then , is how one multipurpose subsystem coul d
pe rform a ny of t hree differe nt fu nctions- digi t-serial BCD addition,
digit-serial BCD s11btra ction, or com parison of digits or whole num bers-
all under variable-prog ra m control.
8
DIGITAL SYSTEMS FUNCTION
a:
w
' 1-
u
a::
W<(
Ca:
c 1-
a: <C Ill
w ::::>
..J C> <J)
..J
0
a:
1-
z
0
(.)
I I
I I I J :::E
I......'- ---/ /.... CJ w
z-
____ ,. ,L - - -
.,,,.,,,,,,,.
//,/ /
---- --------
----: , => >- .....
Om
<n
I-
1-
<J)
I- a:
zO
<( I-
I- <(
<J) a:
c zW
O>
ii> oZ
UW
CJ
"''0"
M
Vi
~ ... 00 - o
ec "'
o- 0
0
o- -o 0
u o-
o -I
~ .. ;;:
~ .... 0
0 CJ a:
a: o6 0 a:
ffi 0 0:: 0 ;i: z ~
" .... z
<l
w
....
....
<( w
a:
.... oo
<("'
it 5w a: '!!
W<!)
0.. w
~
:i
::; "'
CJ
a: ~
a: u
Ow
"5z
a: Oa: :i w CD a:
a: ~
u a: w 0 :i
~ :; (_) 0
~
::;;
a:
0 w
~
....
lf
ffi
>
~
--===---====== 8
DIGITAL SYSTEMS F UNCTION
FLAG OPERATIONS
C}-e
I
~ ~ l oJ,~}) I
B----------------------
UN"
i~~t---+---+---+---+---+---<+---+--+---+----<t----H
a:
ROUTING
SUBSYSTEM
i~=-~--+---<>----+----+--+----+--+--:__
g
0.
0
' c- - - c.._....-"'--v"'-_
RECIRCULATION INPUTS
- - -~
Figure 8 -17. The .flag register could be two recirculating shi.fl registers
made as part of same unit containing the three number registers.
8-26 U NDERSTA NDI!\G D IGITA L ELECTRONICS
How R
8
= = =--=
DIGITAL SYSTEMS FUNCTION
8
DIGITAL SYSTEMS FUNCTION
• a:
a: w
w ....
o O
0 <
r-- - ------ -- - ----- -- --- -- --------
<{
- o
e:
Cll - - - - - - - - ,
>--~ I
I
I
I
I
I
I
I
I
I
I
I
I
I
L - - - - - - - - - -- - -
__ ____________ ...
a:
w
1-
111
aw
a:
>
<
....
Ii.
Ill
0
= = ='-= The "left-shift" path simply adds one extra stage to the shift
register, thus delaying the recirculating digi ts one step behind their
former positions. And the "rig ht-shift" path "short-circuits" the
recirculation path by one stage, by taking data from the next-to-the-last
stage of the display register. This advances the digits one position ahead
of the positions they had before.
There are some other details that must be attended to (such as
switching back to the normal "no-shift" path before the sig n and
decimal-point digits get shifted, and resetting the two "selectable" stages
to zero before cutting them into the path). But th is should give you a
general idea of how data in a recirculating shift reg ister can be shifted
right or left among the circulating digit baskets.
Where do we go from here?
In our process of studying how digi tal systems are put together
to perform var ious functions, we have pretty well explained how nearly all
of the parts of our calculator work. However, we know that the calculator
is a "variable-programmed" system, in which sequences of instructions
taken from a memory exert a "master cont rol" over various hard-wired
subsystems. We really haven't said very much about how stored programs
work yet, so we haven't discussed the calcul ator's operations that depend
on program1ning-such as how multiplication and division are performed,
and so forth.
These topics will be taken up in the next chapter, as we discuss
programmed digital systems. Our understanding of how the calculator
works will lead us directly to a comprehension of microprocessors and
computers, wh ich are in many ways the most sophisticated of all digital
systems.
8
G = = ==
Quiz for Chapter 8
1 . The more bits you process at c. In a "synchronous" system,
on e time, t he faster t he job gets most actions must wait for
done, but: t he ri ght clock sig nal.
a. The lower the accuracy. d. All of the above.
b . The more ci rcuitry required. 5. In a typical "variable-
c. The more total bi ts you h ave programmed" system, what
to process. part provides the step- by-step
d . The more separate steps
sequencing an d therefore
r equired. corresponds to cou nters in
2. The operation of a "hard- hard-wired systems?
wired" system or su b- a. The stored inst ructions.
system is determined by: b. The decoder networks of the
a. The way the hardware is put controller.
together. c. The instruction register.
b . The way the hardware is d . The program counter.
controlled by instructions
6. What is the main advantage of
stored inside the unit.
variable-program control over
c . The software in the unit.
hard-wired control?
d. All of t he above.
a. It's typically faster.
3. Typically, the subsystems or b . It's easy to change the
parts of a variable-programm ed program by storing a
system are t he mselves: different set of inst ructions.
a. Variable-programmed. c. The system is typically
b . Hard-wired, subject to smaller.
master control. d . All of the a bove.
c. Completely independent of 7. If a sizeable piece of hardware
maste r control.
is needed for a certain function,
d. All of t he above.
you'll get more fo r your money
4. What is illustrated by t he if:
exam ple of having the decoder a . The hardw are is dedicated to
subsystem's two latches one job.
dependent on different clock b. The hardware is sha red
phases for their operation? a mong several jobs as a
a. "Control" signals can't "multipurpose" unit.
always be depended on to c . Bits are processed in smaller
say exactly wh en an act ion is groups.
to happen. d . Variable-progr am med
b. The exact timing of a master cont r ol is used.
controlled action can be very
important.
(Answers in back of the book)
Programmed Digital
Systems
In lhe last chapter, we were introduced to the idea of
"programmed" digital systems. We learned that such systems are made
of a number of "hard-wired" subsystems, which work together under t he
cont rol of a "variabl e program." Thus, the "hardware" can he made to do
any of a number of different jobs, according to the design of the
"softwar e," meaning the stored instructions that are followed one at a
ti me, ste p by step.
In t his chapter , we will learn more about programmed systems-
how they work, how various kinds differ from one another, and how t hey
can be used in a wide variety of applications. The reason we're spending
an entire chapter on th is subject is t hat mor e and more digital
systems are using variable-programming rat her than being completely
hard-wired. It seems that programmed systems are the wave of the
future in digital electron ics.
Why are programmed systems " the wave of the future"?
The reason why more and more digi tal syst ems are using t he
variable-programmed approach is summarized in Figure 9-1. This figure
shows several stages in the evolution of digital semiconductor circuit ry,
beginning in the early 1950's with circuitry made entirely of "discrete"
(separate) devices.
By the early nineteen seventies, it became possible to put the
main dig ital circuitry of complete systems in just one integrated circuit.
(Large systems might instead have each subsystem or major part in a
si ngle IC.) This level of integration is commonly called "very-large-scale
integration " or " VLSI," as opposed to earlier small, medium , and
large-scale integration . These levels of complexity are explained in
Figure 9-1.
However, no two systems are exactly alike. So unless you're
going to make and sell a syst em in very large quantities (say, several
hundred thousand systems), it typically won't pay to cram all its main
ci rcuitry into a single highly specialized IC. This is because it would cost
a great deal to design t he IC and put it into p roduction. Thus, integrated
circuits aren't economical unless they're mass-produced in large
numbers.
Ml= = = 9
Figure Y-1 indicates this fact for the ea rly 1970's. On the
one hand, we see tha t t here will be a few systems sold in large enough
q uantities to use specially-designed VLSI circuits. But on the other hand,
an increasing number of systems will use standard, mass-produced I Cs
(or sets of just a few I Cs) of VLSI types t hat can be programmed to iierve
a wide variety of systems. For example, the same IC could possi bly be
programmed as t he mai n circuitry of either the d igital a utopilot t hat we
saw in F igure 5-11, or of a calculator. (Differen t accessory units would
be used in each application, of course.)
"DISCRETE"
EARLY 1950' 5 DEVICES
(Transistors)
"'SMALL-SCALE
INTEGRATION ' "
EARLY 1960'5
(Up to about 12 gates)
""MEDIUM-SCALE
INTEGRATION''
MIDDLE 1960' 5 (Up to about 100 gates:
Bu1ld1ng -blocks such as
counters. adders. etc .)
LATE 1960'5
EARLY 1970'5 :
D ""VERY LARGE-
SCALE INTEGRATION"
( More than about 1000 gates
Complete system or
SPECIAL ICs MADE JUST several subsystems) ICs THAT CAN BE PROGRA MMED
FOR ONE SYSTEM DESIGN TO SUIT MANY DIFFERENT SYSTEMS
" MICROPROCESSORS"
9
!Ml=-=--==-==--==-=
The fi rst example we'll look at is mu.ltipl'ication of num bers.
We'll spend quite a bi t of time on t his example, in learning t he basic
concepts of programming. Then we'll quickly consider a couple of
add itional examples.
What's an "algorithm," and what does it have to do with multiplying?
The firs t th ing to understan d about solv ing any numerical
problem - including multiplication-is the "algorit hm" used for the
process. An algorithm is a logical plan for solving a problem by a series
of steps. It's the idea of a way to break a "big" problem in to "smaller"
problems. Although we h aven't used the wor d "algorithm" before, we
have al ready seen algorith ms at work in t he way hard-wi red logic
networks add and subtract numbers. F urthermore, t he methods we
learned in grammar school fo r adding, subtracting, multiplying, and
dividing are "algorithmic" methods.
The algorithm our example calculator uses for mu ltiplica tion is
based on the ordinary algorit hm for multiplyi ng decimal nu mbers wi t h
pencil a n d paper. Figure .9-2a shows how this algorit hm work s in t he
example of multi plying 23.1times9.64. (You may remem ber from
ele men tary school that 23.1 is t he "mult iplier " and 9.64 is the
"multiplicand.") As you know, this customary algorithm involves
calculating three "partial products," one fo r each d igit of the mul tiplie r,
other t han zeros. These partial products are t hen added to get the final
product.
a. b.
CUSTOMARY MU LTIPLICATION BY
PENCIL & PAPER ADDI NG & SHIFTING
MULTl PLICATION
DECIMAL DECIMAL
POINT STE PS POINT
NUMBERS TO LEF T INTEGERS D IGITS
~ ,-./'-....
'"P~~~AL t I
4 -{ 0 0 0 0 0 9 6 4
TOTALS { O 0 0 0 9 6 4 0
s~ o 0 0 0 9 6 4 0
28 ::
AS Q
} Aoom
A CCUMULA TOA
PRODUCTS "'
0 0 0 9 6 4 0
0 0 0 REGISTER
AT { 9 6 4 0 0
1928
w:;:-- 0 0 0 9 6 4 0 0
222.684 3 0 0 2 2 2 6 8 4 3 ACCUMULATOR
R EG ISTER
Ml= = =9
How would the multiplication algorithm be programmed?
The best way to understand the working of a program for any
system is to look at a "flow chart" of the program. Figure 9-3 is a type of
flow chart that outlines the general procedures for carry ing out the
calculator multiplication algorithm we have been discussing. As you can
see, a flow chart is a sort of "road map" that shows various procedures as
blocks, with arrows indicating the paths the system may take in going
from one procedure to another. This chart is just a d iagram of the
algori thm as we discussed it, except that the DPD of the product is
calculated at the begi nnin g rather than the end , and we are including a
block for some "final details" that need to be attended to.
Figure 9-3 will be useful for reference in studying a more
detailed flow chart shown in Figure 9-4. Here, each block represents an
actual i nstruction stored in the microprogram memory. For the sake of
_illustration, we're supposing that these instructions are stored at
addresses number 62 through 77, as you see written above the blocks in
F igure 9-4. Wr itten in each block is a short description of what the
instruction makes the calculator do.
BEGIN
FINAL DETAILS
F INISH
ADDRESS '!:: 63
ADDRESS # 71
ADDRESS = 76
M l == =9
This group of instructions represents a particular t y pe of
program called a "microprogrammed routine" (or "subroutine"). The
prefix "micro" means that this is a type of program that's stored
permanently in some sort of ROM (read only memory ). (We'll come back
to this fact later.) And a "routine" (or subroutine) is a sort of "small"
program which is part of a larger one. For example, you may remember
that in Chapter 1, we spok~ of the "idle" routine," the "add" routine, and
so forth. What Figure 9-4 represents is the calculator's multiplication
routine (in simplified form). Whenever the con t roller must do a
multiplication, it is sent to instruction number 62 to begin the routine.
What facts must be recalled to understand this routine?
In follow ing the operation of this routine, remember that as we
first noted with respect to F igure 1- 7, each inst ruct ion that the
controller draws from the microprogram memory governs what happe ns
during one "instruction cycle." This is the period of time (about 100
microseconds-100 millionths of a second) during which one scan line is
active, and during which the number and flag registers complete exactly
one recirculation.
Also remember that during one ins truction cycle, all the digits
in two number registers can be passed to the adder-subtracter for
addition, subtraction, or comparison (Figure 7-5 will remind you of how
these parts fit together.) Also, all the digits in a register may be moved
to another register during one instruction cycle. Or the "integer" digits
in a register may be shifted one step to the left or right. Or instead, th e
controller may perform one of the "flag operat ions" we noted in Figure
8-17, either changing or "testing" one or both of a pair of flag bits.
Furthermore, keep in mind that the adder-subtract er's
operations can be performed only on certain digits in the registers. For
example, a new decimal-point digit (DPD) can be inserted into t he
accumulator register without touching t he sign or integer digits. The
controlle r would cause this to happen by recirculati ng t he accumulator
register until the DPD appears at the output, and t hen quick ly switching
t he right data selectors to load a digit from, say, the output of the
adder-subt racter. After this new DPD is loaded into the accumulator
register input, the register would be switched back to "recirculate." All
this takes place in one instruction cycle, and is ordered by ce rtain bits in
the coded instruction being followed.
Similarly, the integer in a register may be shift ed right or left
without shifting _the DPD or sign digit. The con t roller does this by
switching the "shift-control" selector (Figure 8-l R) to one of the "shift"
positions only while the integer is passiny through.
=-=-=~=-== Ml
Finally, you should he aware that even though the routine in
Figure 9-J,. may look complicated, it's actually highly simplijied for
purposes of instruction. For one th ing, a complete multiplication rout ine
would also include instr uctions t o check for whether the product has
become too big t o be handled. If that happens, it's called an "overflow"
problem. Further processing must be stopped and an "overflow" symbol
must be illumin at ed in the calculator display. The re are seve ral other
possible problems that could arise that must be provided for by
appropria te additional branches. But the simplified routine we ha ve seen
should be sufficient to introduce you to the main ideas of programming a
system.
Ii.ii -==-=~=-=
What aspects of programming have been illustrated?
The principles illustrat ed in our microprog rammed
multiplication routin e apply to the programming of any system that has
the capabil ities of conditional and uncon ditional jumps or branching.
This includes microprocessors and computers.
First, you've seen the idea of a routine (or su broutine) that is
called into action by some other part of the OYerall program. You've also
seen the idea of a "loop," consisting of a series of instructions that is
followed over and over agai n until so me condition is met that branch<'8
the system out of th e loop. (Ou r routine has an "add ition" loop a nd a
"shifti ng" loop. The actual addit ion and shifting instructions at
addresses 65 and 70 are shown in bold ty pe in Fig11 re 9-4 fo r emphasis.)
Perhaps most important, you've had a look at the kind of.fi ne
details that must be considered in designing a program to do a certain
job. Algorithms that look sim ple at first glance may turn out to require a
surpris ing number of instructions with all manner of branches and loops.
Of course, t he reason for the fine detai ls is that an electronic
system can't think for itself The soft ware designer must do all the
t hinking that's required-a nd a/t 1:n advance. Every possible situation
t hat could occu r must be though t about and prov ided for by proper
instructions. There are so many thi ngs t hat can go wrong in even the
simplest programs that they typically don't run right the first few tim es
they're tried. They've got to be carefully "debugged" (made correct).
Furthermore, as you can well imagine, the program must be
efficient in terms of the tim e and number of inst ruction cycle.~ that are
involved in following it. Our example routine (which is not intended to be
very efficient ) takes sevent.y-n ine instruction cycles just to perform t he
example multiplication. (You ca n count the instruct ions in the left
column of Fig ure .9-5.) As we have noted before, time is the big
limitation of a programmed system's capabilities. It takes more time to
do a big job as a series of steps than al l at once. The fewer the steps
required, t he faster the job gets don e.
And finally, a program must be efficien t in terms of the
nu mher of instruct ions it con t a ins. After all, in the case of our example
calcul ator's microprogram me mory, there is a definite limit t o th e
number of instr uctions it can hold.
These, then, are some im portant things that nea rly all prog rams
have in common . You should keep them in mind as we proceed to study
other calculator routines, and later on as we look into microprocessors
and computers.
a.
CUSTOMARY b.
PENCIL & PAPER DIVISION BY
"LONG DIVISION" SUBTRACTING & SHIFTING
23
46 /1058 1 058 D IVIDEND IN DISPLAY R EG ISTER
138 - - -
{= :~ }
- 46 i
3 SUBTR ACTIONS OF SHIFTED
DIVISOR IN OPERAND REGISTER
0 0 23 - ouol!ENT IN
ACC UM ULATOR RE GISTER
Ml= - = = =
Each lime we shift and start subtr acting from t he remainder
again, we shift the acc1mmlator register one place to the left, giving us a
new LSD of 0. That way, we begin counting su btractions again with
a nother least-significant digit. The subtracting-and shift ing process is
stopped when a remainder of zero is produced, or when the accumulator
register has been filled up all t he way to the left end with "counter"
digits. These digits, then, are the "quotient" we want. The decimal-point
digit for the quotient would be figured out by a process that involves
subtracting DPDs ra ther than add ing as we did for mu ltiplication.
Even in simplified form, a flow chart fo r a division routine
would be more complicated than we would want to tackle, so we will not
go into further details. What you've seen should l>e e nough to g ive you
t he general idea of what's involved.
How are approximations used for more complicated calculations?
You're probably aware that many calcul ators can, at t he press of a
key, make calculations other than the "basic four" of addi t ion,
subtraction, mul tiplication, and division. F or example, t he re are the
mathematical "functions" of the squa re root of a number, the sine of an
angle, and many others. Calculators and other programmed systems
often pe rform such "higher mathematical " operations simply by the
appropriate programmed .~e qiiences uf the basic four operations t hat we
have already learned about. These sequences involve calculating closer
a nd closer appro.rimat ion:; of t he desired number, until the result is as
accurate as it can be expressed by the lim ited number of digits used in
the system fo r each number.
Figure 9-7. An algorilhrn for finding the square root ofa n'umber, which
can be programmed as a roiitine in a calculator or execiaed by the operator
uf a calm lat.or
9-14 UN Dl: RSTAND l ~G DIGITAL EL f:CTl!O NICS
9 •"""'""""'""' s"""' ~
=-=========---='-=Ml
For example, F igure .9-7 explains an algorit hm that finds the
square root of a number by a se ries of closer and close r approximations.
(The square root is what you would multiply by itself to get the number.)
You begin with any number as an approximation of t he square root-say,
the num ber 2. Then you find a number tha t's a closer approximation of
t he square root by following the four numbered steps listed in Figure
9-7. By repeating this series of four steps, you can get as close to the t rue
square root as t he length of your calculator's num bers will allow. The
example of Figil're 9-7 requires doing t he steps 5 t imes on a calculator
th at handles 10 dig its.
For another example of a series-of-approximations solution of a
fu nction, F igure .9- shows one of several possible ways to calculate the
1rine of an angle. TLis fig ure will remind you of what the sine of an ang le
is (namely, t he lengt h of th e side of a right triang le opposite the angle,
when t he hypoten use is 1).
Rather than describing an algori t hm for this method, F igure
9-8 shows a series of algebr aic terms that form the approximate answer.
(A "term" is something add ed or subtracted.) This series is called the
"Maclaurin series" app rox imation for the sine of an angle. Each term
(beginning at the left wi th the angle, Z, in r adi ans) is just the term to its
left multiplied twi ce more by Zand divided by the next two higher
integers (1 ,2,3,4, etc.), wit h t he sign changed. F our terms are shown, but
t he ser ies is theoretically "infinite," meaning you can add and subtract
as many terms as you need for accuracy in approximating the sine.
(Event ually, the terms g et smaller and smaller.)
G RAPH OF S 1NE Z
T
SINE OF
ANGLE Z
I
3r. 4tr
"
ANGLE Z IN RADIANS
Angle Z is measur:d
- in " radians." (There ( .. ,, .. 1s " p1 ... the circumference
are 2" radians in o f a c ircle divided by
a full c irc le o f the diameter, or approximately
360 degrees.) 3. 14 1592653 )
Ii.ii= -==9
Where do we stand in le arning about programmed systems?
By studying methods used by a calculator for mathematical
operations beyond addition an d subtraction, we have gai ned a general
idea of how flexible and versatile a programmed system ca n be. W c have
seen some pretty impressive examples of the fact that just about any
mathematical operation can be perfor med as a programmed series of
simpler operations. We have seen how a stored program can put a system
made of our familiar buildi ng-blocks through an incredible var iety of
d ifferent performances, much as a musical score makes t he inst r uments
of an orchestra play anything from Beatles to Beethoven.
However, as we noted earlier in this chapter, our calculator is
not as versatile as the "general-purpose programmed systems" that we
called the wave of t he future- namely, computers (includi ng mini and
microcomputers) and their integrated-circuit cousins, microprocessors.
This is because the calculator's circuitry was svecijically designed for a
rather basic calculator . So to complete the picture of programmed
systems, let's look into a truly general-purpose programmed system. This
will lead us into an understanding of microprocessors a nd computers.
<f)
"'w
0::
0::
w
0 >-
0 <J>
<t -
0 ('.}
0:: w
o CI'.
~
\
a:
w
..J
en ..J
:::) 0
1-
<t >-
a:
1-
1- a: z
en o 0
a: :E (.)
Ow
(!) :E
<t
...
..J
-z
_, I-
<t
a: :::)
I- (!)
zz
w-
o :E
j::
Ii.ii= = =
How do the "ALU" and its registers compare to the calculator?
First, the calculat or's adder-subtracte r is just a sim ple form of
the "arithmetic and logic unit" or ALU in F igure .9-.9. (" ALU" is
pronounced by spelling it, like A-L-U.) Most AL Us can do more th an just
add a nd subtract two inco ming binary numbers a nd compa re them for
whether or not a cert a in one is greater than the other. T hey can also
perform an y of several logic ,gating oper a t ions on bi ts in the two binary
numbers coming in- includ ing the AND and OR operations. They a lso
perform a wider range of com pariHon operations, such as
"less- tha n-or-not" and "equal s-or-not," and these co mparisons can be
applied to individual bits in the two input numbe rs. These additional
ALU capabilities g ive t he syst em much more flexibil ity tha n t he
ca lculat or.
Furthermore, t he regi.~ters t hat the ALU gets its inputs from
and to whi ch it routes its out put number are indi1•idual parallel
registers, called "workin g registers," rat her t han shift registers as in t he
calcula t or. (Only three work ing registers a re shown in F igure .lJ-[},
labeled A, B, and C, but there ar e typ icall y more than this.) The binary
numbe rs involved are consider ed to be "wor ds," as we discussed in
Chapter 7. The length of these words ran ges fro m 4 hits in some
microprocessors to 64 bits in some comput ers.
Various ki nds of routing circui t ry arc typically associated with
AL Us (perhaps in a config uration as shown in Fi,q11 re .9-!J) to move the
words in various paths a mong the registers, the AL U, a nd the " main
memory." As a n exampl e, the broken lin es shown in side t he t wo
"routi ng circuitry" blocks indicate that words fro m registe rs A an d B
are being fed to the ALU, whi le t he resulting word from the ALU goes
into register C and then (in a later step) to the mai n memory.
How does the " main memory " unit compare to the calculator?
The main memory unit, in tu r n, is a random-access mass
memory, with a sepa rately-addressed storage loeation fo r each word. The
controller causes words to he moved in to the memory from the \\"O rking
r egist er s or the "input unit," a nd out of t he memory to the v.1 ork ing-
regi ster~ or t he "out pu t unit." The memor y add ress for each word
involv ed is provided by th e eonlroller by way of' the " mai n address
register. "
As you ca n sec, the t hree recircula t in g number registers in our
calculator (F igure 7-.5) serve t he pur poses of both !hr main memory mul
the working register.~ in the general system (Fi1111 rv !J-!J}. In effect, the
fi rst a nd last stages of lhe shift registers serve as worki ng reg isters,
si nce they commun icat e directly wit h the adde N ;ubtracter, through the
routing circuitry. The remain ing eight stages of caeh shift reg ister,
th en, may be considered a sort of main mass memory, wh ieh is .~erially
accessed by shifting rathe r than by random addressi ng .
9-18 lJNDEllSTAND IN\. DIG ITAL ELl:CTltONIC~
~
=9
P ROGRAMMED D IG ITAL SYST EMS
= =Ml
How do the "input" and " output" units compare to the calculator?
The "input unit" and t he "outpu t unit" in F igure 9-9 represent
funct ions that vary widely among specific programmed systems. These
blocks are in cl uded in the figu re t o ind icate t hat typically some sor t of
processing a n d control m ust be exerted on information moving into a nd
out of t he system. In our calculator (Figure 1-6), the keyboard and
keyboard encoder act as a n inpu t unit, and the segment decode r and
dis play act as an output unit.
The pathway labelled "direct or status inputs" in F igure !J-.<J
indicates that typ ically, certain extern al information is suppl ied directly
to th e cont roller, for it to use in deciding what to do. In t he calculator
(Fig u re 1-fJ). t his pathway corresponds to s ignals from t he keyboard
encode r that tell t he con t roller when cert ain keys are pressed (as we
discussed in Chapter 2). The calculator's "idle rout ine" causes it to look at
each of the wires fro m the encoder, one at a t ime, and load the
t ransm itted bit in t o the condition latch. After each of t hese
"input-checking" steps, a conditional-jump instruction branches to an
appropriate rout ine if the condition latch says the key was pressed.
In some systems- especially compute rs-the direct in puts to t he
controller a re considerably more co mpl ica t ed than in the calculator. But
t h e general principle remains the sa me.
How does the system's programming compare to the calculator's?
Together with the random-access memory, the main feature
that sets the general system in Fig u re 9-.<J apart from ou r calculator is
t his: The controller is not governed only by the routines stored
pe rmane ntly in the microprogram memory as in the calculator . In
addi t ion , the con troller dr aws i:nstrncf ions from a "main program"
stored in t he ma in memory, by way of th e "mai n instru ction reg ister" in
Fiyu re !J-.9. The main program operates on the same principles we've
see n fo r l he microprogrammed rou t ines, by t he cont roller's selecting a
series of stored instruct ions to follow. Typically, however, one "main
inst ruction" makes the controller go through an entire miauprogra111111ed
rout ine, before the next main instruction is selected.
Probably the best way to t hi nk of this is in terms of a
pro_qm 111 mn/1/e mlculator, wh ich is a calculator in which t he operator can
ston' a ''jrrogra,mmed" series of /ceys l rokes. (Some programmable
calculators even allow you to store unconditional and condit ion al jump
inst ructions.) In running a program in one of t hese calculat ors, th e
stored ins tructions "press the keys autom atically," in effect - accordi ng
to t he pattern you keyed into sto rage earlier. Each keystroke (whether
finger-p ressed or programmed) typically triggers a miaoprogra 111111ed
routine or series of routines. At the end of this microprogrammed
process, the n, t he controller goes t o t he next ma in instruction it has
selected, rath er than to an " idle" routin e as we discussed in Chapter 1 for
our calcul ator.
L':-.-01msTA1'DI1'G D IGITAL E 1.F:CTRON1Cs 9-19
PROGRA~IMED DIGITAL Svsn:~1s
9
Notice in Figure 9-9 that the t wo registers associated with the
microprogram memory a re now labelled "miaoaddress reg ister," and
"microinstruction register." The purpose or use of these registers is t he
same as we learned for our calculator. But the prefix "micro" is added to
disti nguish them from the main address and instruction registers. So we
say that the microprogram memory stores microinstructions in locations
identified by microadd1·esses.
Thus, as you can see, a general-purpose programmed system
typically has t irn "levels" of pror;ra 111111 ing. the main program and the
microprogram levels. And as we haYe seen, the microprogrammed
routines, in turn, exert control over subsystems and parts whose
function s a re hard-wired into their ci rcuitry. So counting this lowest
hard-wired level, we see three lrn:e/s of control in all.
Each of these levels has its own general field of supervision,
somewhat li ke fields of govern ment at the local, state, and national
levels, or perhaps more li ke t he administrative, tactical, a nd strategic
levels of command in an army. The hard- wired level is t he circuitry
itself, with its basic, unchangeable capabilities. The microprogrammed
routines con trol fine, petty details of the system's operation - detai ls
such as the many instructions t hat must be followed to perform
multi plication and division. Since such details are handled t he same way
every t ime (say, for every multiplication or division), the microprogram
memory is usually a read-only type as in the calculator, althoug h it may
be a type that can be progr ammed by the user such as a PROM or
EPROM, so that program changes can also be made at this level.
As you can see, the microprogrammed routines make life much
easier for the person who develops the ma·i n software for a syst em. He
ca n jus t throw in an instruction that says something like, "Multiply
numbers from so-and-so addresses and put the a nswer in such-and-such
address." At this, the microprogrammed routines take over and cycle the
system through dozens or even hu ndreds of microinstruction cycles to
do the job specified by just one main instruction.
We could go on and on in discussing this subject of
programming: But let's stop with t his in troduction and move on to see
how computers and their smaller counterparts, microprocessors and
microcomputers, compare to t he ge ne ral picture of programmed syst ems
in Figure 9-9 .
= = =IMI
How does microprocessor circuitry compare to this general picture?
There are any number of different IC chips and sets of chips on
the market that can be called "microprocessors," and these systems differ
considerably from one another. Furthermore, the nam e "microprocessor"
is a very loose one, without a formal definition. Some systems called
microprocessors would contai n all the parts shown in Figure 9-9 . And
others would include only those in the large box in Figu re !J-9, which is
typically referred to as the "central processing unit" or CPU
(pronounced by spelling, like C-P-U).
Some microprocessors do not use microprogrammed routines,
while others use a microprogram memory on a chip apart from the
controller. And some microprocessors are completely microprogrammed
like our calculator, without any r eadily-changed main program. Finally,
the routing and interconnections of words among the main memory,
working registers, and ALU vary considerably among various
m1cropressors.
One of the main features that distinguishes microprocessors
from systems called "computers" is that the words are shorter. Most
microprocessors use from 4-bi t to 16-bit words, while "computers"
(including "minicomputers") have word lengths of 16 to 64 bits. We'll see
other differences when we come to comput er s a little later in the chapter.
9
Ii.ii= = - - = = =
"'0z
;::
UCL
UJ
"'
-
Z I
zo
0 CJ
Oz
_, 0
0::;
g: <{
z
0
0
>- >-
::i ::i
~ 0 ~ 0
~ ~ '.,'; ~
0 0 0 0
a: a: a: a:
a: a: a: a:
0 0 0 0
o;i aJ aJ aJ
>-
a: >-
a: >-
a:
>-
a:
a: a: a: a:
<{ <{ <{ <{
~
a:
0 0 0 0
_J
a:
::::> 0
aJ -
>- m
>- :::l
..J
I i :::l
..J
<
<(
a:
< (') Ul
a:
"'
0
zffi
....._ _ __, "'>-
a: !!!
r - ol'J
---
......
~ ~ ~
Ul
>-
in
..,.
Ul
t:::
aJ
"
= = =Ii.ii
How can a microprocessor be used in a calculator?
On the other hand, a single 4-bit microprocessor chip that
contains a.ll t he parts shown back in Figure 9-9 could be
microprogrammed to provide the main circuitry for a calculator. Since it
would ha ve provisions for a "main program" in addition to a
microprogram, the calculator could be the programmable type.
The ALU would work on one pair of 4-bit BCD digits at a time.
These digits would be drawn one at a time from the main memory and
placed in working registers for processing by the ALU. The resulting
"sum" or "difference" digit would then be shuttled back into the main
memory. Eight cycles of this process would be required to add or subtract
an 8-digit decimal integer. (The ALU would contain a one-bit latch like
that in our calculator's adder-subtracter, for holding a carry-borrow bit.)
The microprogramming of such a n 8-digit addition or
subtraction would be considerably more lengthy than in our example
calculator, because of additional microinstructions for moving each digit
to and from the main memory. (Our calculator handles such movement
automatically, by means of its recirculating registers.) But the
microprocessor chip after it became standardized would probably be
more eco1w111ica/ because it would be made in larger quanht ies for a
much wider va·r iety of appl'icatfons.
To summarize what we've learned about microprocessors, we
can say that they arc a sort of programmable building-block, for use
either singly or in groups. They can be used to make small computers or
calculators or they can be programmed to serve in many other kinds of
systems. Thus, they provide the opportunity to use a high functional
density chip for many uses and get the cost advantages of high-volume
production.
9
Ii.ii= = - - = =
Typically, however, we can say that a computer uses words of at
least 16 hits (many use 32 bits, and some use 64 bits). Its ALU has a
wider va riety of functions to select from t han a microprocessor's AL U.
Some very fast, large computers have ALUs that even perform
multiplication and di vision in a one-step, hard-wired fashion. And
fi nally, most computers have a much larger main memory than
microprocessors t ypicall y use-say, at least 65,536 words (2 to t he
sixteenth power), which is called a "65K-word" memory. Furthermore,
outside the "main frame" (represented in F igure 9-9), there may be all
man ner of "peripheral" memory uni ts, as we discussed with respect to
Figur e 7- 15. And t here may be any numb er of peripheral "input-output"
units such as card readers and punching units, CRT terminals with
keyboards and "television" screens, and so forth. This will become more
clear to you as we discuss applications of computers in the next chapter.
However, regardless of all these complications, t he main frame
of any com puter works very much as we have discussed with respect to
F igure 9-9. In this respect, it is very similar to t he example calculator
with whi ch you have now become fam iliar. Therefore, you should have a
pretty good general idea of how a computer is put together from the
building -blocks we learned about in Chapters 3, 4, and 7, and according
to principles we discussed in Chapter 8. As a result, we have now seen the
unifying principles of all digital systems, at work in the simplest and
most complicated applications.
What's next?
And speaking of appl ications, that's the next main area for ou r
discussion. Our learning so far has been pretty heavily oriented toward
how digital systems work, without looking very hard at where they work.
Now it's time to broaden our view and see how t he things we have
learned are applied in a variety of systems. That will be ou r main topic
for the next chapter.
9
8. Which parts of the exa mple c. The ALU, maybe with some
calculator correspond to the registe rs.
working registers in a gene ral d. All but the input and out put
programed system'? units.
a. The output stages of the 12. One of the main features that
number registers. distinguish microprocessors
b. The input stages of the from computers is:
number regist ers. a. Microprocessors always
c. The flag register a nd its ha ve fewer of t he parts
control unit. shown in F igure 9-.9.
d. A and B above. b. Computers are never fully
9. In a general programmed integrated.
system, wha t typically causes a c. Words are usually shorter in
microprogrammed routine to microprocessors.
begin? d. Words are usually longer in
a. External inpu ts, such as microprocessors.
from a keyboard. 13. Microprocessors can be applied
b. Another microprogrammed to make:
routine. a . Calculators.
c. It's repeated a utomatically. b. Computers.
d. An instruction in the main c . Many other kinds of digital
program. systems.
10. How many levels of control d. All of t he above.
operate in a general 14 . Figure 9-9 re presen ts the main
programmed system , counting frame of a co mputer, provided
hard-wired control of some that:
parts? a. The main memory is
a . One. reasonably la rge (say, 65 k
b. Two. words).
c. Three. b. The words have a t least 16
d . Four. bits.
11 . Judging by the discussion of c . It can handle many varieties
microprocessors, wh ich parts in of peripheral equipment.
the general programmed d. All of the a bove.
system in Figure 9-9 are the
minimum a set of chips should
have to be called a
microprocessor?
a. The CPU, maybe without a
microprogram memory.
b. All the parts.
(A nswers in back of the book)
9-26 U :-1nF.RSTANDING D1G1TAL F.u~CTRuK1rn
=~===~
====D==IG=I=TA=L=E=L~E~C=T=RO=N=I=C=S =T=O=D=AY==A=N=D=IN==T=H=E~F~U~T=U-R_E_ _:==========~
Digital Electronics Today
and in the Future
As we noted at t he beginning of Chapter 8, there are so many
d ifferent kinds of dig ital systems that we can't hope to compre hend
them all in just one book. That's why we have depended on just one
system (a calculator ) for most of our examples in study ing digital
electron ics. This a pproach has worked very wel l, because the calculator
co ntain s examples of most of the kinds of part s found in digital syste ms
in ge neral, put toget her in ways that ill ustrate important design fact.ors.
However, our understanding has now advanced to the poin t that
we can zoom the picture out and look at many kinds of present-day
digital systems. So the first part of this chapter will be a survey of t he
applications of digital technology, as of the late nin eteen-seventies.
Of course, as we have e mphasized t hroughout this book, digital
technology is cha ngin g rapidly, mainly because more gates and more
storage capacity a re being squeezed into integrated circuits.
Consequently, the applications of digital methods are g rowing by leaps
an d bounds. And so th e last part of the chapter will be a survey of t r ends
for the fu t ure in digital electronics.
What are the main categories of digital applications?
In Chapter 8, we simplified the picture of system functions by
studying three main design factors. Similarly, in this chapt er we will
simplify the picture of system applications by defining three main
cat egories of applicat ions, as listed in Figure 10-1. There are any n um ber
of ways t o categori ze dig ital appl ications. In this particular breakdown,
we are grouping together systems that ty pically have certain design
features in common, based on simila rities in the jobs the systems do.
..
~ TERMINAL
"BUS: "
Etf
LINE
D ~
'
( 100 M ILLION (50 MILLION
BITS) BITS)
PERIPHERAL OR
~6'
~
"INPUT 10UTPUT" (110)
UNITS. INCLUDING
PERIPHERAL MEMORY TAPE CARD
UNITS All units UNIT DISK READER
include " interface buffers"
to relay words to and
UNIT
f rom the main memory
~ ~
VARIOUS
CONTROL SIGNALS
TO 110 UNITS
MAIN
MEMORY .___ CPU
I
(65.536 CON-
32· B IT TROL LER I
W ORDS
2.097 .152
B ITS)
k: ADDRESSES I VARIOUS
FOR WORDS STATUS SIGNALS
IN & OUT FROM t / 0 UNITS
OF M EMORY
MAIN FRAME
The longer words are used for numbers, including sign (plus or
minus) and decimal-point information. On the other hand, eight-bit
words provide a method of representing "characters" (letters, numerals,
symbols) to be printed or displayed, together with "control characters"
that provide special sig nals to an output device (such as blank spaces,
carriage returns, and so forth). Figure 10-3 shows a popular code for th is
purpose, ca11ed "ASCII" (A merican Standard Code for Information
Interchange; rhymes with "pass-key"). This code uses seven bits for each
character , leaving the eig hth bit of a word free for other handy purposes,
such as a "word mark" to show that the character is the first computer
word in a g roup th at is read together. ASCII is especially useful in the
commun ications field, which we will co me to later.
With these general computer capabilities in mind, let's consider
each of t he subcategories of general-purpose data processing as listed in
Figure 10-1.
"ASCII" (American Standard Code
for information lnlerchange)
B IT POSITIONS:
7 0 0 0 0 1 1 1 1
6 0 0 1 1 0 0 1 1
5 0 1 0 1 0 1 0 1
4
3
J
! 2
t 1
NUL OLE 0 p p
Ex amp/es: 0 0 0 0 SP @
'
0 0 0 1 SOH DC1 I 1 A 0 a q
100 0011 ~c ,.
0 110011 -3 0 0 1 0 STX DC2 2 B R b r
10 10000 - p 0 0 1 1 ETX DC3 3 c s c s
0 11 0000 = 0 (ZERO)
0 1 0 0 EOT DC4
"'
$ 4 D T d t
0 1 0 1 ENQ NAK % 5 E u e u
SAMPLE OF CONTROL 0 1 1 0 ACK SYN & 6 F v f v
CH ARACTERS (BOLD)
0 1 1 1 BEL ETB 7 G w g w
STX = Star1 of tex t 1 0 0 0 BS CAN ( B H x h x
EO T =End of
y
1 0 0 1 HT EM
.
) 9 I y
I
Jransmission
C R - Carriage return 1 0 1 0 LF SUB j z I z
SP -Space
VT ESC + k
0 1 [
''
HT - Horizontal 1 1 ; K
tabulation FS < I
1 0 0 FF L I
1
1
1 0 1 CR GS - - M
"
1 m )
1 1 1 0 so RS > N /\ n
-
1 1 1 1 S1 us I ? 0 0 DEL
-
Figure 10-3. A code used /Jy some computers .for representing character s
f.o be printed or displayed. cons·ist·i ng c!f se1;en bits for each chara.ct er
10-4 U NDERSTANDI NG D IG ITA L E LECTRONI CS
=l==o=
==D=IG=l=T=A=
L=E=L=E=CT=RO=N=l=C=s=T=o=D=A=Y=A=N=D=l=N=T=H=E= F=U=T=U=R=E== === = ~
What's involved in " business" data processing?
"Business" data processing includes most of t he present
computer applications that affect t he everyday life of the average
person. It's the kind of processing used ii;i maintaining records of great
volumes of information , and in so rt ing, rearranging, and printing the
information (or displaying it on a CRT screen) in useful ways. Typi cal
applications include a business's records for accounting and bookkeeping,
payroll, personnel data,.inventory, and so forth .
For example (Fi,qure 10-4) , you r bank's daily records of
transactions and balances for your checking account might be stored as
numbers and characters in a short segment (perhaps a few inches) in a
reel of magnetic tape. The rest of the reel would consist of simi lar
r ecords for other accounts, arranged in order according to account
number.
TOD AY.S
DAILY UPDATING PROCESS
C HECKS.
DEPOSI T
a
SLIPS, ETC .
TODAY' S UPDATED
"CURRENT C HECKING
ACCOUNTS '' FILE
(SAVE FOR TOMORROW)
65/\~
NEW " CURRE NT
CHECKI NG ACCOUNTS"
FILE WITH CURRENT
PERMANEN T " C USTOMER
FILE WITH NAMES & '-"Q'\/ A CCOUNT BALANCES
ADDRESSES FOR EACH 0 BUT No TRANSACTIONS
ACCOUNT NUMBER S HOWN YET
~
1--.~
I ~ A G RAPH SHAPE D A CC ORDING
TO THEORETICAL
COORDINATES /""'
r oRMULA BEING TESI ED
OF EACH P OINI
IS DRAWN so AS TO
CALCULATED
F1 T SCATTERED POIN TS
FROM EXPEPIME NT AL
AS WELL AS POSSIBLE
MEASUAE'1ENTS
Figure 10-5. Genet"f1/ ideu 1f ..dato n:d ul'f i1111 "rr nd ··cu 1·1·,,_1; II i11r,.".fiir
'" rpl'rimenla l rPsearc!t 11was11re1ne11fg. ifl/(;;fruling a lypif<ll ··11'C'lt11 ir-rrl
com put.al iun" pro/ile111
-'
w
-'"'
-' >-
~ m
«
(l_
c
LLI
Cl ..J
,Z LL1 ..J
- - Cl 0
~~C< a:
1-
- LL1 Z a:
Qu<o z
co
a:
l-
(/)
0
u
a. Cl
~
LLI
m
:E
LLI
a: a: I-
wo I/)
r VJ
>-- z >
(/)
a: 0 w
LLI
a: (/)
0 LL
..JU r LL
<::J u O
!::: SJ - - z'
>--
£! z ~o
C<
a:
I-
a: >- VJ
O «z 0.~ <
w
z ::;; z
0 -
...I
"'z
:ii
Ww
a:
........
o er
::Ew
Wi-
er cc
3: ::E
w w
a.. c
0 ,_
~ ::E ..
er ,_
-
,_ en
Cf)
0
...I
"'::E
z ,_~
..u..
(.)
er er 0
w
.... :i:
....
er
u 0
,_
LU:
2 :::>
I
m ~-
.
-=~
.. <-'
I
·,-_. co~ 1~
er
!..w
~ I
~ ~
c( =
I i :U
- "':.: I
iii 1..;m I
L_:__ _J.._ _ _ _ _J
@ w ....
a.. -
"'z
.... :::>
@ ::J
a..
u
o~
er "z
,_ w
5~ ::E
<JCf>
VJ VJ
::0 ~
...erz"'
~ ~ ~
"'
,_ iJ5 ::E
..J
rJ)
,_
oo
(/)
>
... a: z er
-0
~~
C\J
"'::E
::Ew
(")
:E
F igure 10-7 Simpl~fied /Jluck diu.gram qfthe u.~e ofa peripheral and
control proce:;:;or in a. comp uter .~ ys tem . as a.n example of a d igi tal
su bsyst e m.f'or commun ications con t rol
10-12 UNDERSTANDING DIGITAL E LECTRONICS
=~===~====D==IG=IT=A=L=E=L=E=.cr= RO=N=I=C=s =T=O=DA=Y==-A~N=D=I=N =TH==E=F=U=T=U=R=E============ ~
And fourth, transmitting data back and for th between
independent systems (such as the main frame, the P&CP, and each
peripheral unit) requires the use of definite rules called "protocol." This
involves making sure everything is ready before sending one or more
characters (words, bytes, etc.), and afterwards making sure the data was
received properly.
You can see that communications control can be a very
important and complicated matter, different from t he first two
applicat ion categories that we defined.
What have we learned about applications of digital electronics?
This survey of digital applications has not exactly been t horough
enough to turn you into a system designer. But it should give you a
general idea of the ways in which the basic principles you learned earlier
are put to use for a variety of purposes. Keep in mind that many systems
may fit into more than one category.
What's the general direction of progress in digital electronics?
Turning now to look at the future, we can expect t he most
important changes to be continuations of trends we ha ve already noted
in three particular areas: increasing cornplexity of integrated circuits in
general, new developments in high-densi ty mernories, and wider
application of prograrnrned circuitry. The resulting expansion of digital
electronics will provide capabilities for data storage and processing,
control, and communications in areas that were only dreamed of before.
We are seeing this revolution in process now.
Let's consider each of the three areas of expected progress
(complexity, memories, and programmed circuitry), beginni ng wit h
complexity.
How can integrated circuits become more complex?
Logic gates and bit-storage cells have already become so t iny
and so closely-packed in integrated ci rcu its that you may wonder how
integrated circuits can possibly become rnore complex. But the fact is
that we have a long way to go before we reach the th eoretical limits of
complexity for digital circuits formed at the surface of a semiconductor
chip. Progress is mainly a matter of working the bugs out of various
advanced manufacturing techniques. These techniques are becoming
more and more sophisticated and expensive to work out and put into
production. But the resulting I Cs are expected to sell in quanti ties t hat
increase fast enough to support this further development.
There are two main areas of research and development toward
greater circuit complexity. The first pertains to methods for creating
smaller diffused regions and metal patterns, and improving t he
accuracy with which t he various diffusion patterns and metal patterns
line up with one another on the same slice.
} 0 VOLTS
- 12 VOLTS
Nocharge . /
In this / N SUBSTRATE
bucket
</> 3 - - - - -- - - - - - - - - - -- - - 0 VOLTS
-------4-------+--------+-- - 12 VOLTS
0 VOLTS
</> 3 - - - - - - - - - - - - - - - - - - - - - 12 VOLTS
} 0 VOLT S
"High" p ulse
N
._ _ _ _ _ _____________ ______, isfromreadbucket
out
N N N
FLAT
PERMANENT....,.... r A LUMINUM CONDUCTORf
MAGNETS s s OVER SILICON s
I
ABOVE & BELOW L - - - - -- -- - - - - - - - - - V OXIDE FILM OVER
INDUCE SIMILAR j "REVERSE "
MAGNETIC FIELD '-. l YIG
BETWEEN THEM ........I ~~~~~~~~=::i~~~-,.
-I
I ; .~ ··.·
I
I
EPITAXIALLY
DEPOSITED N
MAGNETIC FILM
(YTTRIUM·IRON t
GAR NET ~ " YIG " ) l-----'--->.---11'
Pulse of c urrent
through hairpin
5 turn gene rates a
A magnetic bubble is a cylindrical magnetic field in
NONMAGNETIC region in YIG film, magnetized in direction opposite
CRYS TAL d irecti on opposite main field. main fie ld. This
SUBSTRATE It lasts until destroyed by an creates a magnetic
(GADOLINIUM- electric current and can move around. bubble in YIG fi lm
GALLIUM _,-r.__ _ _ _ _ _ _ _ _ _ _ _ _ _ _~ u nder the loop .
GARNET
~ " GGG" )
N N N
l
FLAT -
PERMANENT
MAGNET t t
s s s Arrows
with "N" for
north and
" S" for south
indicate
magnetic
field.
Garnet chip
CURRENT
with 2 sets of
coils is sandwiched
between 2 perma-
nent magnets
(not shown)
TIME
~-
Weak magnetic fields generated by
"sawtooth" alternating currents
1, and t, in coils around chip
make main field from permanent
magnets (not shown) " wobble" 1n
a conical pattern.
Top view of chip Wobble caused
shows pattern of by coils makes
magnetic iron-nickel effective field
strips over silicon in plane of chip
oxidehtm. rotate clockwise.
----
Rotating fi eld
scoots bubbles
along under heads
of magnetic
'T" bars in
directions shown.
one "T' " per
revolution.
We can only begin to imag ine what kind of changes will result
in digital electronics. Programmable integrated ci rcu its will perform
ded icated (built-in) functions t hat we're not even aware of in new
data-processing, control, and communications appl ications. Chances are
that each home will have at least one computer- perhaps con nected to a
public data-communications system an d in communication with
progra mmed circuitry in equi pment such as intercoms, doorbells, ai r
conditioner s, garage-door openers, washing machines, t ypewriters,
burglar alarms, telev ision sets, telephones, and who knows what else?
Consider ing t he g reat volume of storag e that will be available, such an
integrated electronic net work would go far beyond home computer tasks
we can now envision, such as bookkeeping, storing recipes, etc. The
possibilities are truly mind-boggling .
Where do you go from here?
Now that we've surveyed the various types of dig ital system
applications and looked at the direction of progress in this field, we can
say that we've finis hed the job of understanding digital electronics.
Alt hough you may not feel confident enough to design your
own system yet, you can probably understand the general oper ation of
nearly any digital system you may read about . And more than that, you
can probably g rasp t he reasons for various features of that design. This
being so, you're not very far from creating your own systems, because
much of the other information you need is a matter of reading the
specifications of integrated circu its in manufacturer's data sheets and
catalogs.
Where you go from here is up to you. Many other books are
available for your furth er learni ng from Texas Instrum ents Learn ing
Center, others may be found in li braries as well as bookstores and
electronic supply stores. In addition, courses in this subject are available
in many schools.
However, regardless of whe t her you pursue this subject fu rt her
or move on to something else, you can be satisfied w ith having gained
insight into the technology t hat , more t han any other in histor y, is
extending the mi nd and hands of man.
Glossary
Access Time: The average time it takes fo r a bit or word to be read at random in a
memory unit. In a serial-access unit, this is half t he t ime to go from one end of t he
stored data to t he other.
Addend: A number added to another. (See " Augend.")
Adder: A bui lding block capable of providi ng a sum and a carry, if required, when
adding two numbers electronically.
Address: A binary number designating a particular location where information
may be stored in a memory unit.
Algorithm: A plan for performing a job as a series of smaller jobs, typically
speaking of a numerical calculat ion. More generally, a set of procedures by wh ich a
given result is obtained.
ALU: Arithmetic and Logic Unit. A subsystem that can perform any of a number
of arithmetic and logical operations on words sent to it, such as addition,
subtraction, comparison, and AND and OR functions of certain bits.
Amplitude: The height or strength of waves or pulses in an electric circu it or other
trans mission medium such as radio.
Analog: Electric analog information is informat ion represented by a variable
property of electricity, such as voltage, current, amplitude of waves or pulses, or
frequency of waves or pulses. Analog circuitry, also called "linear" circuitry, is
circuitry that varies certain properties of electricity cont inuously and smoothly over
a certain range, rather than switch ing suddenly between certain levels.
AND Gate: A device or circuit wi th two or more inputs of binary digital
informat ion and one output, whose output is 1 only when all the inputs are 1. The
output is 0 when a ny one or more inputs are 0.
Array : A group of elements arranged in a pattern.
ASCII: A code representing letters, numerals, punctuation marks, and control
s ignals as seven-bit groups. It is used as a standard code by the U.S. for t he
transmission of data. The letters are an a bbreviation fo r United States of American
Standard Code for I nformation Interchange.
Asy nchronous : Refers to circuitry and operations without common clock signals.
Augend: A number to which another is added. (See " Addend. ")
BCD: BCD Code: See "Binary-Coded-Decimal Code." BC D Counter: See " Decade
Counter."
Binary-Coded-Decimal (BCD) Code : A binary numbering system for
representing each digit of a decimal number in groups of fou r bits. The binary value
of these four bit groups is from 0000 to 1001 which code the decimal digits from "O"
through "9".
B inary Numbe r System or Code: A method of writing numbers by using two
numeral digits, 0 and 1. Each position for a bi t in a binary number represents
1,2,4,8,16,32, and so forth. Examples: 1000 =eight, 10101 = t wenty-one.
Bipolar: A bipolar transistor is an n-p-n or a p- n-p transistor, as opposed to an
MOS t ransistor. In a bipolar transistor, a small current through t he "base" terminal
controls a proportionately larger current through the "emitter" and "collector"
terminals. A bipolar integrated circuit is one using bipolar transistors rather tha n
MOS t ra nsistors.
G
Bit: The s mallest possible piece of information. The s implest statemen t that can be
made. A specification of one out of two possible alternat ives. Usually thought of as
a statement of yes or no. Bits are written as 1 for "yes" and 0 for "no". These
symbols are the same as those used in binary numbers, so a bit is also a binary digit.
(See "Binary Number System.")
Borrow: When a minuend digit is smaller than a subtrahend digit, 10 is added to
the minuend digit and 1 is subtracted from the next more significant minuend digit.
This procedure is called "borrowing" from the next more significant digit. The
"borrowed" amount (1 or0) is called t he "borrow bit" or s imply t he "borrow." (See
"Carry.")
Boolean Algebra: A simple system for writing combinations of logical statements
(statements that can be either true or false). See Figure 9-5.
Branch: A program is said to "branch" where either of two possible instructions
may be selected for execut ion next.
Buffer : A digital circuit wit h one input and one output. The output state is the same
as that of the input. Used to "strengthen" a "weak" signal.
Building Block: In the field of electronic systems design, a combination of circuits
or subsystems that can be used with other building blocks in many different
combinations without redesigning. The si mplest digital bu ilding blocks are logic
gates.
Bus: Two or more conductors running in parallel used fo r carrying information.
(Sometimes commonly used for power distribution conductors.)
Byte: A group of adjacent bits, usually a group form ed for convenience in
transmitting and receiving data (such as to and from a magnetic tape unit ). Usually
it takes more than one byte to make a word.
Calculator: A machine specially designed to perform arithmetic and computat ions
which require numerous entries by t he person operating t he machine.
Capacitor: A device that stores electric charge in a n electric or electronic ci rcuit.
Carry: When the sum of two digits is equal to or grea ter than 10, t hen 10 is
subtracted from this sum, and 1 is added to the next more significant digit of t he
sum. This procedure is called "carrying" to the next more significant digit. The
"carried" a mount (1or0) is called the "carry bit" or simply the "carry. " (See
"Borrow.")
CCD: Charge-coupled device. A means for very dense ser ial-access stor age of bits
as tiny packets of electric charge moving along the surface of a semiconductor chip.
Channe l: In MOS transistors: the conducting portion between the main terminals,
formed by the gate signal. In electronic systems: a path along which signals can be
sent, such as data channel.
Character: A symbol whose image is formed by a display system for
representation of information. Examples are numerals, letters, decimal point,
punctuation marks, and special symbols indicat ing status of an electronic system.
Examples are overflow or errors in a calculator.
Circuit: Strictly speaking, a circuit means a path for electricity from one terminal
of a power supply (imagine a battery) t hrough wires and usually through electrical
or electronic devices, and back to the other terminal of the power supply. "Circuit" is
also used to refer to a group of electric or electronic devices connected together to
perform a certain job or fun ction.
Clear: (See "Erase") To remove data and return all circuitry to an initial condition,
usually "O"
G-2 UNDERSTANDING DIG ITAL ELECTRONICS
G
GLOSSARY
Data: Another name for information. It may imply information being transmitted
from one place to another, or information being processed as opposed to inform ation
used for controlling the processing of the other informat ion.
Data Selector: A combinational building-block that routes data from one of several
inputs to a single output, according to control signals. Also called "multiplexer."
Two or more such one-bit selectors operating in parallel would be called a "two-bit
data selector," etc.
Decade Counter: A modulo-ten counter, counting fr om zero to nine in BCD code.
Decimal Number System or Code: Also called " Arabic" num er system. A method
of writing numbers by using ten numeral digits. The "decimal digi ts" are 0, 1, 2, 3, 4,
5, 6, 7, 8, and 9. Each position for a digit in a decimal number stands for a place
value of 1, 10, 100, 1000, and so forth.
Decoder: See "Code Converter." Loosely speaking, "d ecoder" may be the name
used for a combinational building-block receiving several parallel inputs, which
"recognizes" one or more combinations of input bits and puts out a signal when
these combinations are received.
Dedicated: A dedicated system (say, a computer) is one that 's limited to one
particular job by the way it's built into a larger system (say, a process controller).
Demultiplexer: A combinat ional building-block that routes data from one input to
one of several outputs, according to control signals.
Digit or Numeral Digit: One of the numerals or symbols used in a number system.
Digital: Symbolic of data in the form of pieces, i.e., bits or d igits.
Diode: Any electronic device with two electrodes (terminals). Usually means a "p-n
junction diode," which is a rectifying device (passes cu rrent only one way)
consi sting of a p region and an n region touching each other in the same
semiconductor crystal.
Dividend: A number divided by another. (See " Divisor.".)
Divisor: A number divided into another. (See "Div idend. ")
Dopant, Doping: A substance added to sem iconductor material to make it p-type
or n-type is called a "dopant ''. Adding this substance is called "doping''.
Driver: A circuit that provides digital signals with enough power to "drive "
(operate) something other than a few nearby g ates, such as LEDS in a display,
magnetic cores in a memory, etc.
Dynamic Storage Circuit (or "Unit"): An electric circuit t hat stores one bit in the
form of an electric charge in a capacitor (or in part of a circui t that acts as a
capacitor). Two s uch circuits may be connected together to store a bit in
master-slave style.
ECL: Emitter-coupled logic. Also, called "current-mode logic." General design
principle for a bipolar logic gate that achieves fast propagat ion delay by diverting
internal current from one path to another rather than switching saturated
transistors on and off. A family of integrated circuits using gates like this.
Electric: Something that uses electricity. Some elect ric devices and circuit s and
systems are also "electronic."
Electronic: Something that uses electronic devices. Electronic devices are
"vacuum" tubes (including gas-filled electron tubes) and solid-state sem iconductor
devices.
Encoder: See "Code Converter."
Instruction Cycle: The period of time during which a programmed system obeys a
particular instruction.
Integer: A "whole number" not containing a fraction, decimal point, etc.
Integrated Circuit ("IC"): A small package with electrical terminals, containing a
chip of silicon. The surface of the silicon is processed to form hundreds or thousands
of transistors and other de\·ices. These make up an electronic circuit.
Inverter: A binary digital building-block with one input and one output. The output
state is the inverse (opposite) of the input state.
J-K Flip-Flop: A clocked Aip-flop with two inputs called J and K which acts as a
clocked R-S flip-flop, except that when clocked while both J and Kare 1, it toggles to
the opposite state rather than an unknown state like an R-S flip-flop.
Latch: A one-bit latch is a ci1 ~uit with an input and an output for digital
information, and a third input for a control s ignal. The control signal makes the
output either follow the input or be held in its present state. Several latches used
together with the same control signal to each (say four of them) would be a type of
reg'i.~ter called a 4-bit latch. Also, see "R-S" Latch" and "S-R Latch."
G
Noise: Any signal that isn't supposed to be there. Elect rical noise may be caused by
small, irreg ular sparks when a switch is opened or closed. Or it may be caused by
radio waves or by electric or magnetic fields generated by one wire and picked up by
another.
Noise Margin: See page 6-5.
NOR Gate: A binary digital buildi ng-block t hat acts as an OR gate foll owed by an
inverter.
NOT Gate: Occasionally used to mean "i nverter."
Numera l or Numeral Digit: See "Digit."
OR Gate: A device or ci rcuit with two or more inputs of binary digi tal information
and one output, whose ou tpu t is 1 when any one or more inputs are 1. The output is 0
only when all inputs are 0.
Output: An informat ion sig nal going out of a system or a part of a system. Can also
mean the wire that carries this outgoing informat ion. (See also I/ 0.)
P-Type Semiconductor Material: Semiconductor material (such as s ilicon)
containing a very small proportion of certain other elements (such as boron),
causing any current through the material to be conducted mainly by the movemen t
of positi:ve charges ("holes" among "bound" electrons).
Parallel Circuit Connection: Two or more electrical devices (such as switches or
transistors) are said to be connected " in parallel" when two term in als of each device
are connected to the same two points, so t hat current can pass fro m one point to the
other through any of the dev ices.
Parallel Data Transmission: Two or more bits of a g roup are said to be
transmitted "in parallel" when they are all transmit ted at t he same time (as in a
group of wires) from the same source to the same destination .
Parallel Register: Two or more flip-flops (or dynamic storage un its) with a
common clock sig nal, used to store bits transmitted in parallel.
Peripheral: In a computer system, "peripheral" units or equipment are those
outside the main frame, includ ing disk and tape units, printers, keyboard term inals,
etc.
Phase: The time interval fo r each clock "cycle" in a system may be divided into two
or more "phases" (like the phases of the moon). The phases are defined by pulses in
a separate network of wires for each phase. During a particular phase, t he signal in
that clock network is in t he state defined as " active" (let's say the "hig h" or " l"
state) . The clock cycles are repeated over and over again, phase by phase. The phases
provide a method of maki ng several things happen in the proper order during one
clock cycle.
Photomask: A transparent g lass plate carrying an int ricate, very precise pattern
of microscopically small opaque (dark) spots photographically reduced from a larger
pattern. The opaque spots represent areas on a semiconductor slice into which a
dopant will be diffused, or a reas of metal that will be etched away.
Photoresist: A liquid that, when spread in a thin film and dried, quickly hardens
into a tough plasti c substance where struck by ultraviolet light. When the
unhardened areas have been washed away, the material beneat h is exposed fo r
etching by an acid. The hardened areas "resist " the acid.
PLA: Programmable Logic Array. An MOS read-only memory used as a network of
logic gates.
G
Positive Logic: In electronic binary digital circuits, this means the decision to let
the "higher," more positive of the two voltage levels represent 1 and to let the
"lower," more negative level represent 0. Positive logic is always assumed in this
book unless "negative logic" is specifically stated.
Potentiometer: A variable resistor with three terminals, normally used for
transmitting a manually variable voltage ("potential") part-way between voltages
supplied at two main terminals of the device.
Power Dissipation: See page 6-8.
Product: In arithmetic, the result of a multiplication. In Boolean algebra, the AND
function of two or more variables.
Program: In a programmed system, any group of instructions that are
"programmed," meaning planned so that one instruction leads to another.
Program Counter: In a programmed system, the parts that provide a method for
adding 1 to the address of the current instruction. May consist of the address
register and an adder.
Programmed System: A system that operates by following a series of stored
instructions. Also called "variable-program" system, since the instructions can be
changed.
PROM: Programmable read-only memory. An IC memory chip whose stored data
can be read at random. The data is stored permanently by the user after the chip is
manufactured, and cannot be changed afterward. Storing data in this fashion is
loosely called "programming" the memory.
Propagation Delay: See "Switching Speed," page 6-8.
Quotient: The result of a division.
RAM: Random-access memory. A memory with a number of storage locations,
where words may be "written" (stored) or "read" (recovered) in any order at
random.
Refresh: To refresh a dynamic storage unit means to restore its charge to the
desired voltage level.
Register: A certain type of temporary storage uni t for digital information. (See
"Shift Register" and "Parallel Register.")
Relay or Electromechanical Relay: A mechanical switch with a moving contact
called an "armature" that is moved by a magnetic field generated by electricity in a
coil of wire.
Reset: To "reset" a stored bit means make it a "O."
ROM: Read-only memory. A memory unit containing data permanently stored
when the unit was manufactured. Usually an IC chip with each bit stored as a
permanent electrical connection of some sort, which can be read at random.
Routine or Programmed Routine: A series of instructions followed by a
programmed system in doing a particular job. Usually contained within a main
program. It may occur over and over again. The instructions are "programmed,"
meaning planned so that each instruction leads to another. A routine can even be
one instruction followed over and over again.
R-S Flip-Flop: Any of several kinds of flip-flops, in which a momentary 1 at the R
(reset) input changes the "true" output to 0, and a momentary 1 at the S (set) input
changes the "true" output to 1. Varieties include clocking and master-slave features.
R-S Latch: A simple kind of R-S flip-flop. Two NOR gates cross-coupled, with the
output of each forming an input to the other.
UNDERSTANDING DIGITAL ELECTRONICS G-9
G
GLOSSARY
S-R (S-Bar, R-Bar) Latch: A simple kind of flip-flop. Two NAND gates
cross-coupled, with the output of each forming an input to the other.
Schottky Diode: A type of rectifying (one-way) diode formed simply by a metal
terminal contacting a lightly-doped region in a semiconductor crystal. Its low
"forward voltage drop" and quick response to pulses make it useful in improving the
performance of TTL circuits.
Segment: In this book, "segment" means one of the seven bars in a rectangular
figure-8 pattern in a "7-segment" character display.
Semiconductor: "Semiconductor material" is various solid substances such as
s ilicon, germanium, and gallium phosphide. When made in nearly pure crystal form,
these materials conduct electricity in very special, useful ways. A "semiconductor
device" (or just a "semiconductor") is a transistor or diode (or other similar things)
made using semiconductor material.
Sequential Building-Block or Network: One or more flip-flops or dynamic
storage units, typically with one or more logic gates, and typically with several
inputs and several outputs. The combination of bits at the outputs does not depend
only on the combination at the inputs at the present moment, but on past history of
a sequence of input combinations over a period of time.
Serial-Access Memory: A memory in which the stored data is accessible for
reading or writing only in a definite, fixed order rather than at random.
Serial Data Transmission: Two or more bits of a group are said to be transmitted
"in series" when one at a time is tran smitted through the same wire. Such
transmission is called "serial" transmission.
Series Circuit Connection: Two or more electrical devices (such as switches or
transistors) are said to be connected "in series" when they form a chain from one
point to another, so that t he same current flows through all of them.
Set: To "set" a stored bit means make it a "1."
Shift: A movement of stored data right or left.
Shift Register: Two or more flip-flops (or dynamic storage units) with a common
clock signal, connected in series so that stored bits shift one stage during each clock
cycle.
Signal: A word used in describing the operation of electric or elect ronic circuits. It
means electrical voltage or current or waves carrying information, or the
information itself.
Software: The stored instructions (or "program") that control a programmed
system, as opposed to the "hardware" of which the system is physically constructed.
Speed-Power Product: See page 6-8.
State: The "logic state" of a conductor in a digital ci rcuit means its condition as to
whether it is carrying a 1or0.
Static Memory: An IC memory whose storage elements consist of flip-flops rather
than dynamic storage units.
Stored Program: A set of instructions in memory determining the order of the
problem solution.
Substrate: Literally, "underlayer." The semiconductor material of a slice or chip
that lies beneath the diffused and epitaxially deposited regions.
Subroutine: A routine that is part of another routine. (See "Routine.")
I
storage, capacitor, 5-5, 5-9
Index storage, delay-line, 5-7
in telephone syst em, 5-4
Addition: voltage analog, 5-5
bit-parallel, digit-serial, 8-10, Analog-to-digital converter:
8-11 in control system, 10-8
full parallel, 8-3-8-5 in digital autopilot system, 5-15
full serial, 8-5-8-9 in "digital phonograph," 5-17
introduction, 3-13, 3-14 in digital television
(See also BCD numbers, Binary transmission, 5-20
numbers, Decimal numbers) AN D gate:
Adder: in Boolean algebra, 3-7
carry-look-ahead, 8-5 p rinciples, 2-4- 2-7
four-bi t , 3-13-3-16 AND-OR-invert circuit, 3-16, 8-9
one-bit, 3-15, 3-16, 8-5, 8-8 - 8-10 Application categories for digi tal
Address: systems (See Digital methods:
in calculator's microprogram system application categories)
memory, 1-9, 7-10 Arit hmetic and logic u nit (See ALU)
in random-access memory, 1-11, ASCII (American Standard Code for
7-12 Information Interchange),
Algorithm, definition, 9-4 10-4
ALU (arithmetic and logic unit): Asynchronous data t ransmission (See
in computer, capabilities, 9-24 Transmiss ion of digital
defined relative to calculator, information: asynchronous)
9-18 Automatic control syst em, 10-8-10-10
sixteen-bit addition, 8-3 Automatic designing by computer, 10-7
relat ive to mass storage, 7-24 Bandwidt h, 5-19
AM (See Analog methods: amplitude BCD n umbers:
modulation) addition, 7-5, 8-11, 8-12
Amplifier: definition, 3-14
as amplitude modulator, 5-6 subtraction, 8-20-8-23
as analog building-block, 5-10 table, 1-21
in analog storage buffer, 5-9 BCD-to-7-segment decoder (or
in charge-coupled device, 10-15 decoder-driver):
differential, 5-14 definition, 3-3
gain, 5-6 t ruth table, 3-5
integrated power, 5-14 in voltmeter, 4-3, 4-4
operational, 5-14 Binary, definition, 1-22
sense amplifier in core memory, Binary-coded deci mal (See BCD)
7-19 Binary numbers:
transistors to amplify, 5-10 addition, 3-14, 3-15
video (wide-band), 5-14 definition, 1-21
Amplit ude, 5-5 Bipolar transistors:
Analog methods: n-p-n, 6-14, 7-17
amplitude modulation (AM) , 5-5 p-n-p, 6-21
analog computers, 10-7 B it:
compared to digital, 5-10- 5-22 analog information
current analog, 5-5 measurement, 5-19
decisions, 5-10 definition, 1-20, 1-22
definition, 5-2 Boolean algebra, 3-6-3-8
frequency modulation (FM ), 5-6, Borrow (in subtraction), 7-6, 8-20
5-7 Branch in program, 9-9
in fuel-gage system, 5-2 Buffer, 3-10
general, 1-1, 1-24 " Business" data-processing, 10-5, 10-6
multiplication, 5-6, 5-10, 5-12
I
Byte: Capacitor s:
in computer system, 10-12 analog storage, 5-8, 5-9
definition, 7-21 construction, 5-9
in dynamic RAM, 7-16
Calculator, imaginary example: in dynamic shift r egist er, 7-8
accumulator register 1-15 1-17 Carry (i n addition), 3-15, 7-6
"add" routine, 1-16 ' '
Cathode-ray-tube terminals (See CRT
adder-subtracter, 1-16, 7-5, 8-24 terminals)
address register, 1-11, 7-10, 8-6 CCDs (cha rge-coupled devices), 7-22,
cha~acte r positions in dis play,
10-14, 10-15
1-7 Central processing unit (See CPU)
clock generator, 1-12 Character:
clock signals, phased, 1-12, 8-16
in calculator display, 1-7
computer, how similar to
code in computer (See ASCII)
9-16- 9-20 '
9h arg~;coupled d~vices (See CCDs)
conditi-0n la tch, 8-27, 9-9 Clear input to flip-flop (See Flip-flop)
connections to IC, 1-4 Clock signals:
controller, 1-11 definition, 4-2, 4-6
decimal points, 1-17, 8-14 phased: in calculator 1-12 8-16
definition, 1-4 in charge-coupled devic~.
display register, 1-13 1-15 10-14
di vision, 9-13, 9-14 ' . in dy namic shift reg ister, 7-8
flag register, 1-14 1-16 8-26 timing versus control s ignals
9-10 ' ' ' 8-16 '
"idle" routine, 1-13, 1-15, 9-19
instruction cycle, 1-12, 9-8 (See also Transmission of digital
instruction register 1-11 7-10 information: asynchronous;
instructions, 1-11, 7~10 ' synchronous)
keyboard encoder 1-14 CMOS integrated circuits 6-12
2-2-2-20 ' ' Coincidence detector 2-4 '
keyboard inputs, 1-5- 1-7 Code~con~erter building-blocks , 3-3
microprogram memory 1-11 7-10 com bmat1onal building-block s:
"multiplication" routin~ ' definition, 3-1
9-4-9-12 ' design procedures, 3-4-3-11
Communications control systems,
negative numbers handling
8-24 ' ' 10-11-10-13
"Comparison" operation:
number registers: construction,
by adder-subtracter in
7-6, 8-26
calculator, 1-19, 8-24
sh ifting right or left, 8-27,
8-28, 9-8 by comparators in segment
decoder subsystem in
sign and decimal-point digits,
8-13, 8-14 calculator, 8-17
operand register, 1-15 instruction in flow chart 9-9
program counter, 8-6, 8-7 subtracting to accom pli;h, 8-22
routing subsystem, 1-15, 1-16, types of, by ALU, 9-18
3-12, 7-6, 8-22, 8-25, 8-27 " Complement" signals, 3-9, 4-1, 8-20
scan generator, 1-13 Complexity of IC, 6-9, 9-1, 9-2, 10-13,
scan lines, 1-5 10-14
segment decoder, 1-13, 3-3, Complementary MOS !Cs , 6-12
8-13- 8-17
segment-line outpu ts, 1-7- 1-9
si ne function, 9-15
square root, 9-14
I
Computer: Dedicated f unctions:
adder for, 8-3-8-5 p rog ra mmable I Cs to perform,
definition rela t ive to other 10-20
systems, 9-23, 9-24 vers us mult ipurpose funct ions ,
general-purpose, 10-2- 10-7, 8-19
10-12 Demultiplexer, 3-13
as general-purpose Density of ci rcuitry in IC, 6-9, 9-1, 9-2,
programmable system, 9-3 10- 13, 10-14
mass memory units in , 7-23 Diffus ion in IC manufactur e, 6-4, 6-15
microprocessors in, 9-21 Digital methods:
(See also ALU , Mass memory) advan tages versus analog,
Conditional jump in prog ram, 9-9 · 5-10-5-14
Controller in programmed system: with a nalog inputs & outputs,
in calculator, introduction, 1-11, 5-15
1-12 definition of "digital," 1-21
general concept, 8-19 definit ion of "dig ital system,"
Core memory, 7-18, 7-19 1-26
Cost to manufacture !Cs, 6-9, 6-10 li mitations versus analog,
Counters: 5-15- 5-22
asynchronous binary, 4-11- 4-13 "secret of success," 1-15, 1-24,
decade or BCD or modulo- IO, 3-15
4-14 system applica tion categories,
in hard-wired control, 8-16-8-19 10-1- 10-13
modulus, 4-15 Digital- to-analog conver ters:
synchronous binar y, 4-13, 4-14 in cont rol system , 10-8
in watch or clock, 4-15 in d igital autopilot system, 5-15
CPU: in "digital phonograph," 5-17
in computers, 10-2, 10-11 in d igital TV transmission, 5-20
defi nition, 9-21 Diodes:
made of microprocessors, 9-21 , p-n junction, 6-15, 7-17
9-22 Schottky, 6- 18
Cross-coupling of logic gates, 4-2, 7-18 Division , 9- 13, 9-14
CRT terminals: "Don't care" in truth t able, 3-4, 3-10,
with computers, 9-24, 10-2, 10-7, 3-11
10- 12 Dopants and doping, 6-2
s hift registers for, 7-7 Driver, 3-10
Current meter, 5-3 Dynamic input to building-block, 4-9
Dynamic storage, defin ition, 7-9
Data, definition, 4-1
(See also Shift register: dynamic,
Data-logging systems, 10-10
RAM: dynamic)
Data- routing building-blocks,
3- 11 - 3-13 ECL, 6-19
Data selectors: Electron beams for more complex !Cs,
in calculator, 3-12, 8-27 10-14
design, 3-11 , 3-12 Emitter-coupled logic (ECL), 6-19
Dec imal numbers: Epitaxial layer, 6-15, 6-21
addition, 3-14, 3-15 EPROM (eraseable PROM) , 7-14
definition, 1-22 Exclus ive-OR gate, 8-4
Decoder: Expander gate, 6-16, 8-9
in adder-subtracter, 8-24
Fan-out, 6-9, 6-18, 8-9
in BCD adder , 8-12
in " ha rd-wired" con trol , 8-16,
8-18
(See also Calculator, imaginary
example: segment decoder)
Chapters: 1 2 3 4 5 6 7 8 9 10
Questions
1 c d b b d a c b d d
2 c a c c c b d a b d
3 d c b a d c c b b a
4 d a b b c c c d d d
5 a d a b a d c d c c
6 d b 'ct a b c d b d c
7 d a b a d c a b d d
8 b b c c d d b d c
9 d d d b d d d d d
10 c b d c c c b
11 d d b c d a c
12 a a c d a c d
13 d d d a d d c
14 c a d d
15 b c
16 b
17 c
18 d