Beruflich Dokumente
Kultur Dokumente
I I .I I I .I V
SCIENTIFIC
DEVELOPMENT
CORPORATION
Watertown
Mass.
MINIVAC
601
S C IE N T IF IC D EV E LO P M E N T CO RP.
W A TE R TO W N , MASS.
EX LIBRIS ccapitalia.net
C opyright ( c ) 1961 by S cie n tific Developm ent C orporation, 372 M a in Street, W atertow n, Massachusetts
CONTENTS
BOOK II: WHAT IS A DIGITAL COMPUTER?
Preface
1.
2.
IN TR O D U C TIO N
BASIC COMPUTER FUNCTIO NS A N D M IN IV A C 601
The Basic In p u t Function
The Basic Storage Function
The Basic Processing Function
The Basic O u tp u t Function
3. EXPANSION OF THE BASIC FUNCTIO NS
In p u t M edia and Codes
Storage M edia and Codes
Processing Techniques
O u tp u t M edia and Codes
4. C O M M E R C IA L COMPUTER EQUIPM ENT
In p u t U nits
Storage U nits
O u tp u t U nits
5. COMPUTERS OF TO M O RRO W
APPEN D IX: D ig ita l and A nalogue Com puters
1
5
5
7
12
15
16
16
21
24
25
27
27
30
29
30
32
35
1.
35
35
38
39
41
42
43
43
44
44
44
44
47
48
49
50
50
54
57
60
63
2.
3.
4.
BASIC OPERATIONS
The O peration " A N D "
The O peration "O R "
The O peration " N O T "
The O peration "EITH ER BUT N O T B O T H "
RELAYS FOR MORE FLEXIBLE T H IN K IN G
The Relay A N D c irc u it
T he Relay OR c irc u it
The Relay N O T c irc u it
The Relay EITHER BUT N O T BOTH c irc u it
T H IN K IN G A N D D E C IS IO N -M A K IN G
Boolean A lge bra
D ecision-M aking w ith In s u ffic ie n t In fo rm a tio n
S im ulation
Thoughts A b o u t T h in k in g
SOME COMPUTER PROBLEMS
A M in d Reading Program
Q u a n tity Recognition
A Problem Involving Three G irls
The Farmer, the Goose, the Corn and the W o lf
The Television Problem
i
67
67
68
71
73
73
74
74
75
76
77
78
78
78
79
79
80
81
81
82
82
83
84
84
85
86
87
BOOK II
What is a Digital Computer?
PREFACE
This is the second in a series of books using M IN IV A C 601 to explore the w orld o f "e le c
tro n ic b ra in s". In w ritin g th is book, the authors have assumed th a t the reader is fa m ilia r w ith
the in fo rm a tio n contained in the firs t book o f th is series and understands the operation o f the
components o f M IN IV A C 601.
The basic question which th is book was w ritte n to answer is " W h a t is a d ig ita l com puter?"
In order to answer th is question it is necessary to exam ine the functions and form s o f modern
high-speed d ig ita l com puter systems. This book describes the m ajor characteristics o f modern
com puter systems and compares the functions perform ed by the components o f the M IN IV A C
601 w ith those perform ed by s im ila r parts in a large scale d ig ita l com puter.
I. IN TR O D U C TIO N
In order to fu n c tio n as a d ig ita l com puter a m achine or com bination o f machines m ust be
able to handle in fo rm a tio n or " d a ta " in an orderly manner. It m ust be able to receive in fo rm a
tio n as " in p u t " fro m the outside world. Once received, th is in fo rm a tio n m ust be "processed" by
the com puter, and the result o f the processing must be "rem em bered" or "s to re d " fo r fu tu re
use. A fte r an answer has been obtained, it m ust be com m unicated back to the outside world as
" o u tp u t." Thus a general purpose d ig ita l com puter is made up o f fo u r basic units:
The
The
The
The
in p u t u n it
processing u n it
storage u n it
o u tp u t unit.
(1)
Data: The numbers or coded in fo rm a tio n to be used in calculation are called input data.
These numbers m ay represent physical measurements, m athem atical relationships, or
conditions o f a " lo g ic a l" decision-m aking problem.
(2)
I N P U T -O U T P U T
AND
SECONDARY STORAGE
STORAGE
AND
PROCESSING
IN P U T -O U T P U T
AND
SECONDARY STORAGE
OUTPUT
IN P U T
AND
OUTPUT
IN P U T
O U T PU T
SECONDARY
STORAGE
STORAGE
AND
PROCESSING
IN P U T
IN P U T -O U T P U T
M IN IV A C 601
The fo llo w in g two experim ents illu s tra te com m unication to M IN IV A C in Binary and Deci
m al. Each experim ent uses the relays to store (remember) the in fo rm a tio n com m unicated to the
com puter.
EXPERIMENT t | B IN A R Y IN PU T
This experim ent uses M IN IV A C 601 to dem onstrate how a d ig ita l com puter receives binary
in p u t data and instructions. The bin a ry num ber " o n e " is given to the com puter by pushing a push
button down. The bin ary num ber " z e ro " is given to the com puter by leaving a pushbutton up. The
instruction to fo rg e t a ll previous data (to " c le a r " the memory) is given to the com puter by pushing
pushbutton 6.
The program and c irc u it draw ing fo r this experim ent are:
1-
2-
1 X /2 X
2 X /3 X
3 X /4 X
4 X /5 X
5 X /6 Y
6 Z /6 +
6 Y /5 H
5 H /4 H
4 H /3 H
3 H /2 H
3-
2 H /1 H
1Y /1G
1G /1 C
1F / 1
2 Y /2 G
4-
2 G /2C
2 F /2
3 Y /3 G
3 G /3C
3F /3
5-
4 Y /4 G
4 G /4C
4 F /4
5 Y /5 G
5G /5C
1. T u rn power ON. Push pushbutton l and release. This transm its a "o n e " to section 1 o f M IN I
VAC . The "o n e " is remembered by relay 1. Relay lig h t 1 comes ON to indicate th a t a "o n e " is
being remembered (stored). Data has been communicated from the operator to M IN IV A C 601
by pushing B IN A R Y IN P U T pushbutton 1.
2.
Do N O T push pushbutton 2. T his leaves a " z e ro " in section 2 o f M IN IV A C 601. The "z e ro "
continues to be remembered by relay 2. Relay lig h t 2 remains OFF to indicate th a t a " z e ro " is
being remembered (stored).
3.
Do N O T push pushbutton 3. T his leaves a " z e ro " in section 3. Relay lig h t 3 remains OFF to
indicate th a t a " z e ro " is being remembered.
4.
Push pushbutton 4 to tra n s m it a " o n e " to section 4. Relay lig h t 4 comes ON to indicate th a t
a "o n e " is being remembered by section 4.
5.
Push pushbutton 5 to tra n s m it a " o n e " to section 5. Relay lig h t 5 comes ON to indicate th a t
a "o n e " is being remembered by section 5.
The bina ry num ber 10011 (19) has been com m unicated to M IN IV A C 601 by using the B IN A R Y
IN P U T pushbuttons. This in p u t data is now being remembered (stored) in the firs t five sections o f
the com puter.
6.
Push pushbutton 6 and release. T his action instructs the com puter to fo rg e t all previous data.
A ll relay lights go OFF, and the previous num ber is forgotten ("c le a re d " fro m the memory).
7.
The com puter is now ready to receive another binary num ber from the operator. M ake up an
other num ber yourself and com m unicate it to the com puter by using the B IN A R Y IN PU T
pushbuttons.
EXPERIMENT 2: D E C IM A L IN PU T
T his experim ent demonstrates how M IN IV A C 601 may receive decim al in p u t data and in
structions. A decim al num ber is com m unicated to the com puter by tu rn in g the D E C IM A L IN PU TO U TPU T knob to the desired num ber and pushing pushbutton 5 to in struct the com puter to re
member the selected num ber. A n other in struction to forget a ll previous data is given to the
com puter by pushing pushbutton 6.
The program and c irc u it diagram fo r this experim ent are:
1-
2-
1 H /2 H
2 H /3 H
3 H /4 H
4 H /5 H
5H /6 Y
1.
3-
6 Z /6 +
6 Y /5 X
5 Y /D 1 6
D 1/1G
1 G /1 C
IF /1
D 2 /2 G
2 G /2C
2F /2
D 3/3G
4-
3G /3C
3 F /3 D 4/4G
4 G /4C
4 F /4
5-
D 5/5G
5G /5C
5 F /5
T u rn power ON. T urn the D E C IM A L IN PU T-O U TPU T knob to num ber 4 and push pushbutton
5. T his tra nsm its the num ber " f o u r " to the com puter. Relay lig h t 4 comes ON to indicate th a t
a " f o u r " is being stored. Data has been com m unicated from the operator to M IN IV A C 601 by
tu rn in g the D E C IM A L IN PU T-O U TPU T knob to the desired num ber and by in stru ctin g the
com puter to remember the selected num ber by pushing pushbutton 5.
W hen decimal data is remembered by the com puter, the relay lights have a d iffe re n t meaning
tha n when binary data is being remembered. W ith binary data, the lig h t ON represents a data
" o n e " and the lig h t OFF represents a data "z e ro ". W ith decim al data, the num ber being remem
bered corresponds w ith the section (1-6) which has a relay lig h t ON.
2.
Push pushbutton 6 and release. T his action instructs the com puter to fo rg e t all previous data,
and relay lig h t 4 goes OFF. The com puter is now ready to receive another decim al num ber
(1-5) fro m the operator. Select another num ber yourself (between 1 and 5) and com m unicate
it to the com puter using the D E C IM A L INPU T-O UTPU T.
The Basic Storage Function
Three types o f storage are used in most high-speed data processing machines. These are:
Interna l storage
Secondary storage
External storage.
Internal storage, w hich is fo r our purposes the most im p o rta n t, is storage available in a storage
u n it connected d ire c tly to the processing u n it o f the com puter in such a way th a t the processing
u n it has "im m e d ia te access" to the in fo rm a tio n . Secondary storage refers to storage units in
which the in fo rm a tio n is available to the processing u n it but in which, due to the nature o f the
storage u n it, it is available only a fte r some delay. The difference between internal and secondary
storage in thus the diffe re nce between im m ediate and delayed access to inform ation.
External storage refers to storage in a media outside the com puter system. External storage
is thus accomplished by com m unicating the in fo rm a tio n to be stored out o f the com puter as " o u t
p u t" and then saving this in fo rm a tio n in "e x te rn a l storage" on the o u tp u t media.
Human Storage Functions
The storage fu n c tio n can be cle arly seen in the analogy o f the hum an being w ith pencil and
paper. In this case, the paper is the external storage system, and the pencil is the output device
through w hich in fo rm a tio n is com m unicated from the hum an being to the external storage me
dia. Internal and secondary storage are d iffic u lt to distinguish in the hum an case since we as
hum an beings have only one storage system available fo r our use the hum an brain. In form ation
retained in the brain w hile the problem is being worked is probably best th o u g h t o f as held in in
ternal storage.
M IN IV A C 601 Storage
M IN IV A C 601 is equipped w ith internal storage in the form o f the six relays which also
serve as a p a rt o f the processing u n it o f the com puter. The processing u n it o f M IN IV A C does not
have direct access to external storage. The hum an operator can supply external storage by w rit
ing in fo rm a tio n down on a sheet o f paper when it is com m unicated to him through the ou tp u t de
vices o f M IN IV A C and later return th is in fo rm a tio n to the com puter through the in p u t devices as
it is required.
Before exam ining the storage units o f M IN IV A C 601 and larger d ig ita l computers in more
d e ta il, it is necessary to consider the general form in which in fo rm a tio n is stored in a d ig ita l
com puter.
The Binary Nature of Storage
Just as in fo rm a tio n is com m unicated to the com puter and processed by it in a binary form ,
it m ust be stored in binary form .
The reason fo r th is use o f the sim ple tw o-character (0 and 1) rather than the more com
plicated ten-character (0-9) decim al system in the com puter can be realized by exam ining the
decim al in p u t device. Using the rotary switch mechanism involves m any d iffe re n t physical posi
tions w hich m ust be com m unicated by the sw itching system to the com puter. The mechanism used
to do th is involves physical m otion and several moving parts. In addition, the rotary switch sys
tem requires more th an a second to go from zero to nine.
In contrast to the decim al system, the bin a ry in p u t button involves only one m oving p a rt and,
since it has only two physical positions, is sim pler in construction and can be moved from one po
sition to another in a fra c tio n o f a second.
Thus, fo r the reasons o f sim p licity, e fficie n cy and speed a p tly dem onstrated by the com
parison between the decim al inp ut switch and the binary in p u t button, large com puters handle all
processing and storage using a binary system. Thus the basic elem ent o f storage in a com puter
is a bin ary " b i t " w hich m ay have the value o f 0 or 1.
The Structure of Storage
In any storage system, the bits are arranged into words consisting o f a specified num ber o f
bits. Storage w ith in the com puter is handled in words. Each storage location called a "re g is te r"
contains one word o f data and has a location num ber associated w ith it so th a t it is possible to
id e n tify a register and store in fo rm a tio n in or c a ll in fo rm a tio n from th a t register.
The storage system o f a large com puter m ig h t be th o u g h t o f as a large num ber o f boxes w ith
each box id e n tifie d by a num ber in d ica tin g its location in the series o f boxes, w ith each box just
the rig h t size to hold a specified num ber o f bits o f data. The actual form o f these storage registers
varies w ith the machine.
Secondary Storage: Slide Switches
The six slide switches o f M IN IV A C 601 are used to supply secondary storage. These switches
are operated m a n u a lly and are used to store b in a ry in fo rm a tio n according to the convention:
switch rig h t = 0
switch le ft = 1
The follo w ing experim ent illustrates secondary storage in M IN IV A C .
EXPERIMENT 3: SECONDARY STORAGE
This experim ent uses M IN IV A C 601 to dem onstrate how a d ig ita l com puter remembers in
fo rm a tio n which is not required im m ediately by storing the in fo rm a tio n in SECONDARY STOR
AGE. The slide switches are used as secondary storage fo r M IN IV A C 601. The operator transfers
data to the SECONDARY STORAGE by m anually operating the slide switches.
1S
1T
1.
T u rn power ON. M ove slide switch to the left. L ig h t l comes ON to indicate th a t a "o n e "
(binary data) is being stored in SECONDARY STORAGE, Section 1. The SECONDARY STOR
AGE slide switch continues to remember "o n e " u n til it is instructed to remember a " z e ro " by
the operator.
2.
M ove slide switch 1 to the right. L ig h t 1 goes OFF to indicate th a t a "z e ro " (binary data) is
now being stored in SECONDARY STORAGE, Section 1.
M ost large d ig ita l com puters a u to m a tica lly transfer data a t very high speeds to secondary stor
age. M odern com puters m ay use punched cards, punched paper tape, m agnetic tape, and other
special devices fo r secondary storage.
Secondary and external storage are required by d ig ita l computers because there is not enough ca
pacity in the storage-processing u n it to store a ll the in fo rm a tio n required by some problems. Ex
cess in fo rm a tio n which is not required im m ediately is transferred to secondary or external stor
age. External storage fo r a d ig ita l com puter is s im ila r to the file cabinet which some people keep
in the basement. Some papers m ay be throw n away, but there is not room enough in the desk up
stairs to keep a ll items which m ust be file d . " A c tiv e " info rm a tio n , which is used frequently, is
kept close at hand in the desk and "d e a d " in fo rm a tio n , which is used in frequen tly, is kept in a
file cabinet in the basement. Secondary storage in th is case would be in fo rm a tio n required only oc
casionally, but im p o rta n t enough to be kept close by. This in fo rm a tio n m ig h t be kept in the back
o f a desk drawer, or perhaps in a cabinet several steps from the desk.
Internal Storage Relays as Memory
Before going on to the more com plicated form s o f storage used in large computers, we w ill
tu rn again to M IN IV A C 601 and exam ine the storage system used to provide m em ory fo r this
sm all com puter. Storage or "m e m o ry " fo r M IN IV A C is supplied by the 6 relays. These relays can
be used to store or "re m e m b e r" six binary bits. As indicated above, a large com puter may have
storage capacity fo r 36 bina ry bits in each o f its storage registers. Thus the storage capacity o f
M IN IV A C 601 w ith its 6 -b it register is one-sixth th a t o f a register in the 3 6 -b it machine.
As noted above, in a large com puter each storage register is id e n tifie d by a location number.
In the case o f M IN IV A C 601 it w ill not be necessary to consider this problem o f m em ory location
id e n tific a tio n , since we are dealing w ith only one storage register.
W ith the exception o f the distin ctions noted above, the basic fu n c tio n in g o f the storage
system in M IN IV A C 601 exactly duplicates the fu n c tio n in g o f the storage system in a larger
com puter. Thus, the larger com puter m ay be th o u g h t o f as sim ply an extension o f m any M IN I
V A C 6 0 1's lined up in a row and interconnected. To d uplicate the storage capacity o f the IBM
7090 com puter system, fo r instance, w ould require 192,000 M IN IV A C 601 Computers in com
bination.
In the discussion o f the operation o f the relay in Book I, the relay was used as a switch op
erated by a pushbutton. It was noted th a t the relay could be used to indicate the two-valued binary
code by considering the relay OFF to be storing or rem em bering a ' 0 ' w hile the relay ON was th ough t
o f as rem em bering '1 '. The relay lig h t could be used to indicate when the relay was storing a M '
(lig h t on) or a '0 ' (lig h t o ff). T his sim ple c irc u it m ay be th o u g h t o f as a m anual memory: as long
as the pushbutton is being held D O W N , the relay remembers a one. W hen the pushbutton is re
leased, the relay forgets the one and starts rem em bering a zero. The relay in th is c irc u it is a
memory element controlled by the pushbutton.
1 + /1 Y
1 + /1 H
1 X /1 C
1 / I F
1 G /1A
1 B/T
M A N U A L RELAY M EM O RY C IR C U IT
A more e ffic ie n t m em ory u n it would be achieved if it were possible to m ake the relay remain
in the D O W N or 1 position once it was signaled to go to th is position by the pushbutton. Such a
c irc u it would enable the relay to remember a 1 once it had been signaled by pushing the pushbut
ton to " fo rg e t 0 and s ta rt rem em bering 1".
The m anual m em ory relay c irc u it above can be easily m odified to achieve this by using one
o f the switches o f the relay to continue to supply current to the coil o f the relay a fte r the pushbutton
has been released. M a k in g use o f this relay switch, the pushbutton w ill in itia lly supply current to
the relay. Once c urre nt is supplied to the relay coil, the relay w ill close and a second path fo r the
c u rre n t w ill be supplied through the norm ally open switch o f the relay. W ith this c irc u it wired, the
relay becomes "s e lf-lo c k in g " in the 1 position.
7- f - / l V
74-/1H
1 X /1 C
1 / I F
1G /1A
IB /1
1 C /1A
SELF-LOCKING RELAY M EM O R Y C IR C U IT
10
The evident d iffic u lty w ith th is self-locking relay m em ory c irc u it is th a t, although the relay
w ill now remember a 1 once it is told to remember 1, it cannot forget 1 unless the current to the
com puter is turned o ff. The next step in bu ild in g a usable m emory u n it is obviously to m o d ify the
c irc u it so th a t the relay can fo rg e t 1 and sta rt rem em bering 0 again.
As an in itia l step in the direction o f program m ing such a c irc u it, a second pushbutton m ay be
used to supply a means o f disconnecting power from the relay c irc u it. Using th is c irc u it, push
b utton 1 w ill be used as in the self-locking m emory c irc u it to supply cu rre n t to the relay coil and to
cause the relay to stop rem em bering 0 and sta rt rem em bering 1.
Pushbutton 2 w ill be used to cause the relay to stop rem em bering 1 and begin rem embering
0. As indicated below, this program uses the norm ally closed contacts o f pushbutton 2 and the
n o rm a lly open contacts o f pushbutton 1. The self-locking connection used in the previous c irc u it is
retained.
T W O -B U TTO N RELAY M EM O R Y C IR C U IT
The tw o-button or "tw o in p u t" m em ory c irc u it provides a workable m em ory elem ent which
satisfies the condition th a t it be able to remember a 1 or a 0 on signal. The weakness in this c irc u it
is th a t a d iffe re n t signal is required to te ll the m em ory c irc u it to forget 0 and to begin rem ember
ing 1 than is used to te ll it to fo rg et rem em bering 1 and recommence rem em bering 0. Pushbutton 1
serves as the "fo rg e t 0 remember 1 " signal and pushbutton 2 provides the "fo rg e t 1 remember 0 "
signal.
It w ould be p a rtic u la rly desirable if we could obtain a memory c irc u it which would respond to
a single signal such th a t, if the c irc u it were rem em bering 1, it would forget 1 and s ta rt rem ember
ing 0. In short, it would be desirable to have a "s in g le -in p u t memory c irc u it" .
The Single Input "Flip-Flop"
Before program m ing M IN IV A C 601 fo r a single-input memory c irc u it a com m ent on
term inology is in order. A n exam ination o f the operation o f the tw o-button relay m emory c irc u it
w ill show th a t as the contents o f the m em ory are changed, the relay goes firs t ON and then OFF,
changing fro m one position to another. The sw itching m otion o f the relay has caused engineers to
refer to th is type o f c irc u it as a " flip - f lo p " and the tw o-button relay m em ory c irc u it above is
known as a "tw o -in p u t flip -flo p " .
So, the c irc u it which we are now seeking is a "s in g le in p u t flip - flo p ." The c irc u it and program
below are fo r a single in p u t flip -flo p . Once this c irc u it has been program m ed on M IN IV A C 601,
pushing one pushbutton w ill signal the com puter to remember a 1 or a 0. If the relays are re
m em bering a 1, pushing pushbutton 1 w ill signal them to "fo rg e t 1 and s ta rt rem em bering 0 " . If
the relays are rem em bering a 0, pushing pushbutton 1 w ill signal them to "sto p rem em bering 0
and s ta rt rem em bering 1 ". L ig h t 1 w ill be ON when the flip -flo p is rem em bering a 1, and w ill be
OFF when the flip -flo p is rem em bering a 0.
1/IB
1 / 1 C
1A/1E
1 E /2 G
1F/2F
1H /1 F
1 G /1Y
1Y /1 +
I X / 1J
1J/2H
2J /2E
2E /2A
2 B /2
2 /2C
In Book IV, the single in p u t flip -flo p w ill be used to provide the m em ory necessary to enable
the com puter to count and to perform various m athem atical operations. For the purposes o f this
discussion o f com puter storage, it is necessary only to note th a t this single in p u t flip -flo p has the
characteristics o f the basic elem ent o f a com puter m emory system. It is able to remember a 1 or a
0 and to change its m in d " when signaled to do so.
The Basic Processing Function
The detailed operations of the processing u n it are discussed in Books III and IV. In this dis
cussion, it is s u ffic ie n t to note th a t the processing u n it perform s two basic kinds o f operations.
(1)
It controls the flo w o f in fo rm a tio n w ith in the com puter. The processing u n it "d ire cts
t r a f f ic " w ith in the com puter, sending in fo rm a tio n fro m the in p u t u n it to storage, fro m storage to
the various ca lc u la tin g units w ith in the processing u n it, and from processing to o u tp u t or storage.
In one sense, the processing u n it m ig h t be th o u g h t o f as the bookkeeper o f the com puter. It keeps
tra c k o f and handles the placem ent o f a ll data.
(2)
It does a ll calculations. The processing u n it is the ca lculator o f the com puter. In the
processing u n it a rith m e tic data is m odified and "d e cisio n s" are made. Instructions to the com puter
d ire ctin g it to perform operations on data are carried out. A ll other units o f the com puter are used
to fa c ilita te transm ission and storage o f in fo rm a tio n . O nly the processing u n it actively m odifies or
uses data. The other units o f the com puter are passive w ith respect to the data.
Human Processing
The fu n c tio n o f the processing u n it can be visualized in term s o f the division problem dis
cussed earlier. Once the hum an operator has the divisor and dividend w ritte n on paper and has
been given the list o f instructions fo r perform ing the division, his actions are analogous to those
o f a processing unit. He w ill fo llo w the instructions, a ctin g upon his data, u n til he reaches the
fin a l answer.
The processing u n it o f a com puter acts just like the hum an operator ju st m entioned after re
ceiving both instructions and data. In a sense then, the processing u n it is the w ork center o f the
com puter.
M IN IV A C 601 Processing
Processing in M IN IV A C 601 is accomplished using logical circu its to d uplicate a rith m e tic
and decision functions. Relays are used as sw itching devices and th e ir operation is controlled by
instructions com m unicated to M IN IV A C by means o f the program wired on the com puter console.
D uring the "e x e c u tio n " o f a program , the processing section o f M IN IV A C 601 controls the opera
tio n o f the com puter. The program w ired on the com puter console indicates to the processing sec
tio n w hat operation it is to perform and the processing section controls the other units o f the com
12
puter o b ta inin g in fo rm a tio n when it is required from in p u t sources and com m unicating the fin a l
answer to the o u tp u t units.
The fo llo w in g experim ents illu s tra te some of the basic functions which a com puter can per
form , using the processing u n it in various ways.
EXPERIMENT 4: CONTROL
T his experim ent uses M IN IV A C 601 to dem onstrate how the processing u n it controls the
com puter's operations. The rotary switch is controlled by the Processing U nit.
5 + /5 Y
5 X /5 C
5 F /5 5 + /5 H
5G /6C
6 F /6
6 + /6 H
6G /D 17
D 1 8 /M -
T u rn power ON. Push pushbutton 5. T his energizes relay 5 (turns it O N) and causes current
to flow through the switch contacts o f relay 5 to relay 6. Pushbutton 5 controls relay 5. Relay 5 in
tu rn controls relay 6. Relay 6 controls the operation o f the motor.
The m otor is controlled by relay 6 w hich is p a rt o f the Processing U nit. Relay 6 is controlled by
relay 5 o f the Processing U nit. Relay 5 is controlled by Binary In p u t pushbutton 5. The operator
supplies the Input by pushing pushbutton 5. The program w ired on the com puter console gives the
instruction:
If pushbutton 5 is D O W N , tu rn relay 5 ON.
If relay 5 is O N , tu rn relay 6 ON.
If relay 6 is O N , tu rn m otor ON.
In a more com plicated program , the relay could be controlled by other relays or switches as
the result o f some ca lcu la tio n or series o f events.
This a b ility o f a d ig ita l com puter to control its own operations perm its the com puter to auto
m a tic a lly m ake a whole series o f calculations a t high speed w ith o u t d ire ct operator command.
EXPERIMENT 5: DECISION M A K IN G
T his experim ent uses M IN IV A C 601 to dem onstrate how the Processing U n it o f a com puter
can m ake decisions based on rules given by the program m er. Two b inary num bers are compared
and the com puter decides w hether or not the numbers are equal.
1 + /1 H
1H /1 L
1L/1X
1 Y /1 C
IF /1
1 X /2 X
2 Y /2 C
2 F /2
1J/2H
2 J /2 K
1 K /2 L
2 K /3 C
3 F /3
13
1. T ra nsfer the decision rule to the com puter by w irin g the program onto the console. Pushbuttons
1 and 2 w ill represent the numbers to be compared. Relay 3 w ill indicate the com puter's decision.
If the numbers are equal, relay 3 w ill come ON. If the numbers are N O T equal, relay 3 w ill go OFF.
(N ote: a pushbutton UP represents zero; a pushbutton DO W N represents 1.)
2.
3.
Push pushbutton 1. Relay 3 goes OFF because the numbers are no longer equal. (The firs t
num ber is now 1; the second num ber is 0. )
4.
Push pushbutton 2 w hile holding down pushbutton 1. Once again the numbers are equal (both
are 1) and relay 3 comes ON.
5.
Release pushbutton 1 w hile holding down pushbutton 2. Relay 3 goes OFF because the num
bers are not equal.
This decision rule can be program m ed w ith o u t using relays 1 and 2, in which case the push
button contacts perform the processing fu n ctio n . Since the relays have tw ice as m any contacts as
the pushbuttons and can be e le ctrica lly operated, they are considerably more versatile than the
pushbutton contacts. For this reason, relays are used to perform the processing fu n ctio n in a ll but
the sim plest programs.
EXPERIMENT 6: A R IT H M E T IC
This experim ent demonstrates how the Processing U n it o f a d ig ita l com puter m ay be used to
perform a rith m e tic calculations. Two numbers (0 or 1) are added together and the answer is in d i
cated by the Binary O u tp u t lights.
1 + /1 H
1H /1 L
1L/1Y
1 Y /2 Y
2 Z /2 C
2 F /2 1X /1C
IF /1
1G /2 G
2 H /2 A
2 B /2
1N / 2 K
1 K /2 N
2 L /1 A
IB /1
1. T ran sfe r the rules o f a ddition to the com puter by w irin g the program onto the console. Push
buttons 1 and 2 w ill represent the numbers to be added. L ig h t 1 ON w ill represent an answer o f 1;
lig h t 2 ON w ill represent an answer o f 2; NO lights on w ill represent an answer o f 0.
(N ote: a pushbutton UP represents 0; a pushbutton D O W N represents 1)
2.
3.
Push
4.
Push
5.
14
1R / D l
1S/2S
2 R /D 2
2 S /3 S
3 R /D 3
3 S /4 S
4 R /D 4
4S/5S
5 R /D 5
5 S /6 S
6 R /D 6
6S /D 19
D 18/D 16
D 1 6 /M
D 1 7 /6 X
6 Y /6 +
1. Set all slide switches in the RIGHT position. The slide switches w ill represent the num
bers 1 through 6. T o place a num ber in secondary storage, the appropriate slide switch w ill be
15
moved to the LEFT position. Pushbutton 6 w ill be used to give the com puter the instruction:
Indicate num ber in Secondary Storage using Decimal O u tp u t rotary switch.
2. T u rn power ON. Move slide switch 4 to the LEFT position. This places the num ber 4 in
Secondary Storage.
3.
Push pushbutton 6. This instructs the com puter to com m unicate the contents o f Sec
ondary Storage to the operator. The rotary switch turns to 4 on the Decimal Input-O utp ut dial.
The num ber 4 is the Decim al O utput.
4. M ove slide switch 4 to the RIGHT position and select another num ber to be placed in
Secondary Storage. A g a in , push pushbutton 6 to instruct the com puter to com m unicate the con
tents o f Secondary Storage through Decim al O utput.
3.
16
these switches is s im ila r to the operation o f the decim al input switch on the M IN IV A C 601 Con
sole. To com m unicate a decim al num ber to the IBM 650, the appropriate switches are turned so
th a t the desired decim al num ber is indicated by the switches.
17
PRINTED
BY THE 2 6
PRINTING
CARD PUNCH
0123456769
ABCDEFGHIJKLMNOPQRSTUVUXYZ
II
II I
III
II
III
tilpS o d
I I
I
11
222
000
M
tt
11
2 22 2
3 3 3 3 | jj
33333
33
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 31 3 3 3 3 31 3 3 3 3 3 3 3 3 3 3 3
44444|
4444441)
444
44
44 44 4 44 4 4 4 4 4 4 | 4 | 4 4 4 4 44 44 4 44 4 44 44 44 4
5 5 5 5 5 5| I
5555555
55 5 5
555
S5S5S5SS5S55555555555555|55S|5S55S5
98666
6666
66666S6666666666666666|666666666666
777777
7 77 77
77177717J7J777177777|J117J777|77777
8868886
888888
lllllllllllllllllllllllllllllllllll
9 9 9 9 9 9 9 9 9 9 91 9 9 9 9 9 9 9 9
9999999
9 I I I I I I II I9 | I9 II II I9 I |I II II |9 9 II II I
4243 44454* 47 l SI S H H H R D IR R III1 D H B N 17HU 7t 71 7373 74
11
6666666
66666666
77777777
777777777
8888888 311 8888888881
9 9 9 9 9 9 9 9 9 91
>I I 1 I I I I I IR
UMiiauunanaa
PRINTED
- BY THE 26
PRINTING
CARD PUNCH
aaaaaaaaanaaMaaaaaanaaMaanaaaTinniin
222222222222| 222222222222||22222222
aanaaana'aaaaaaa
A LP H A -N U M E R IC CARD
SS
1010
0 000001010
The card below is an in p u t card prepared using a binary code. On th is card bin a ry in fo rm a
tio n is represented in tw e n ty-fo u r 3 6 -d ig it words occupying positions in colum ns 1 through 36
and 37 through 72 respectively in 12 rows. T his is a "ro w b in a ry " card.
18
* + + | + + + ' + + + H - + + l + + + ] + + + | + + 4 j + + + 4 - + + j + + + [ f | + ( i | | | i + + | + + + M - + - H + + + l + + + j + + + | + + + | + + + J f + + f * - + + i + | ' t j + + 4 | ^ + + + + + + +
j_ _ _ I
J ______
I
I
j r | - | | 1 i i
1
0 0 0|0 0 o'o 0 0 0 1 0| 0 0 DOOOOOOO
g g f e j+ f l
I I I
lo o 0 o o!g o o|o o o!o o oio o o 0 0 0 0 0 0,0 0 o'o 0 010 I 0|0 I I 9 0 0 0 0 0,0 0 0|0 0 0|0 0 o'o 0 0 0 0 0
it: 2 3 4 5 6 ' 7 3 9*3 0 II 12:13 14 13.16 17 19 19 20 21 22 23 24.23 26 27)26 29 30|31 32 33 34 35 36 32 39 39 40 41 42.43 44 45,44 47 46,49 50 5 lls 2 S3 54 55 54 57 54 59 50,51 42 43l4 65 84 67 64 6 9 |7 0 71 72 13 74 7 5 7 4 7 7 7 4 7 9 8 0
l [ l 1 1 1 1 1,1 1 1 1 1 1 1 1 1 , 1 1 1 ji 1 i n | i ; i 1 1 | l 1 1 1 1'1 1 1,1 1 1,1 1111 1 1 1 1 1 1 1 i , i i i h 1 1 h 1 1 n 11 11111111
| l 1 1 1 i'll
I
I
I 1 I
i
i
i
* 2 2 2 2 212 2 212 2 2 '2I 2 212 2 2 2 2 2 22 2l2 2 2l2 2 2,2 21 ||| | 2 2 2 2 2 2l2 2 2 2 2 2l2 2 2,2 2 2 2 2 2 2 22,2 22122 2121 2|2 22 2 2 2 2 2 2 2 2
I 1 I
I
I
I
I
1 .
3 3 3 3 313 3 3 3 3 3|3 3 3)3 3 3 3 3 3 3 3)3 3 3j3 3 3| 3 3 | j | 3 1 3 3 3 3 3 3i3 3 3>3 3 3|3 3 3 !3 3 3 3 3 3 3 3 3 3 33i3 3 3.3 3JH I 3 3 3 3 3 3 3 3
1
,
1
I
I
| 4 4 4 4 ^ 4 4 I4 4 4t4 4 4>4 4 4 4 4 4 4 4 4 ^ 4 4?4 4 4<4 4 | I 4 1 1 14 4 4 4 4,4 4 414 4 4,4 4 414 4 4 4 4 4 4 4 4 J4 4 4 J4 4 4!4 4 1 ^ 4 4 4 4 4 4 4 4 4 4
I
1
I
1
I
66686666
'
88
I I
o| u a U|0
88 8
8 8 8 8 8 8 8 8 8 8
0 9 9 9 9 919 9 919 9 9 9 9 9'9 9 9 9 9 9 9 9 919 9 919 9 9>9 9 9'9 9 | 9 9 9 9 9 9|9 9 9l9 9 919 9 919 8 9 9 9 9 9 9 919 9 9<9 9 9'9 9 9191 9 9 9 9 9 9 9 9 9
13 74 79 74 77 74 79 40
22 23 24(25 26 27 |2 8 29 3 0 p i 32 3 3 |M 39 36 p ? 38 39[40 41 42 |4 3 44 4 5 |4 6 47 4 6 |4 6 90 91)92 S3 5* 55 96 97|5 6 96 6 0 |6 t 62 63 |6 4 65 88|6 7 16 6 6 |7 0 71 72jl------------------------------s 4 9 4 | 7 I I p * II 1 2 1131)4 15 |1 l i t 11
ROW B IN A R Y CARD
In place o f punching b in a ry in fo rm a tio n in h o rizontal rows as in the row binary card code, in
fo rm a tio n m ay be punched along the vertical colum ns o f the card. Twelve binary dig its can be
punched in each ve rtica l colum n. Thus, in the case o f a 3 6 -d ig it word length, three ve rtica l col
umns are required using the colum n bin a ry code to com m unicate the in fo rm a tio n contained on
one above in row bin a ry form .
IBM L I I S 0 7
FO RM I 2 I - N - 2
C O LU M N B IN A R Y CARD
The Binary Nature of Input
It is im p o rta n t to note th a t a ll in p u t in fo rm a tio n is read fro m a card as 3 6 -d ig it b inary words.
Once the in fo rm a tio n has been read into the com puter, it can be interpreted by the com puter in ac
cordance w ith any code th a t the com puter has been program m ed to understand. Thus, standard
alpha-num eric code cards, row bin ary cards and colum n binary cards are a ll read into the com puter
by the same process. However, once the in fo rm a tio n is in the com puter, it is interpreted by the pro
gram prepared fo r the com puter so th a t the com puter can "u n d e rs ta n d " the in fo rm a tio n com m uni
cated according to the appropriate code on the in p u t card.
The im p o rta n t p oint to remember in th is co n te xt is th a t all communication to the com puter is
a c tu a lly binary communication. A n y non-binary form o f in fo rm a tio n is read by the com puter as if it
19
were b in a ry in fo rm a tio n and then interpreted " in b in a ry " so th a t the com puter can "u n d e rs ta n d "
the in fo rm a tion .
Since M IN IV A C 601 operates in the same m anner as a large com puter, it must also be given
in fo rm a tio n in b in ary form . This is the reason fo r the six binary input buttons on the M IN IV A C
console. W hen non-binary in fo rm a tio n is to be supplied to the com puter as, fo r exam ple, when
using the decim al in p u t d ia l, M IN IV A C 601 w ill be program m ed to in te rp re t this non-binary in
fo rm a tio n and to store and process the non-binary in fo rm a tio n in binary form .
In Book IV a program is given fo r conversion from decim al to binary. (See Decimal to Binary
Converter Book IV.)
Paper Tape Input
In a m anner s im ila r to th a t in w hich in fo rm a tio n is com m unicated on a punched card, in fo r
m ation on paper tape is com m unicated by punching holes in predeterm ined locations according to
various codes. The m achine reading a paper tape, as the m achine reading a punched card, in
terprets the presence or absence o f a hole in a p a rtic u la r location as bin a ry in fo rm a tio n . Using
paper tape it is possible to com m unicate in fo rm a tio n made up o f any num ber o f characters to the
m achine as one continuous record.
The photograph below illustrates the use o f the " 8 c h a n n e l" code, one o f several coding
systems used to com m unicate in fo rm a tio n on paper tape. This system is analogous to the alpha
num eric code described above fo r use w ith the punched card. The nature o f this code can be easily
determ ined by exam ining the photograph. It should be noted th a t the sm aller dots appearing
along the center o f the paper tape are analogous to the sprocket holes on the edge o f movie film .
These sm all holes are used to move the paper tape past the reading p oint in the paper tape-reading
machine.
0%
H^5IScLQ-Q.Q-ujt/>LLJ</H^ Jnmi
Mi l l
i i
I
X-
()-
CHECK*
8*
4 *
2*
A B C D E F G H I JK LM N O PQ R S TU V W X YZO
EI_-
2 3456789
/& i
TTTTII M T
I I I
20
% i
Zone
Numerical
STORAGE M E D IA A N D CODES
'Bi-Stable" Elements
In the firs t section o f th is book we exam ined the m em ory elem ent o f the M IN IV A C 601. Now
we are ready to exam ine the way in w hich the same fu n ctio n is perform ed by d iffe re n t elem ents in
larger computers. In every case, the fu n c tio n in g o f the m em ory elem ent in a large com puter is iden
tic a l to the fu n c tio n in g o f a relay serving as a m em ory elem ent in the M IN IV A C 601. The m emory
elem ent is, in every case, capable o f m a in ta in in g one o f tw o positions u n til it is signaled to change
positions. Such a tw o-valued elem ent w hich can rem ain in e ither o f two positions u n til an action
outside the elem ent causes it to change to the other position is called a "b i-s ta b le " device. It is a
device w hich can stay (is stable) in e ither o f two positions (the p re fix " b i- " indicates two). The
photograph below illu stra te s several bi-stable devices discussed in this book.
I" State
"0" State
/L
0
MAGNETIC CORE
RELAY OR SWITCH
TUBE OR TRANSISTOR
ELECTRICAL PULSES
BI-STABLE ELEMENTS
21
22
Reading o f the contents o f a m agnetic core elem ent is accomplished by a "se n sin g " process.
One such sensing process works as follows:
The m agnetic core elem ent is forced into the zero direction by a current pulse. If the
elem ent is storing a one, the change in direction o f p o larization induces a pulse in a
"sensing w ire ." If the elem ent is storing a zero, there is no change in the direction of
p o larizatio n , so there is no pulse.
T his reading process, however, "d e stro ys" the in fo rm a tio n content o f the m agnetic core element.
If the in fo rm a tio n m ust be retained a fte r reading, a special device w hich w ill replace the in fo rm a
tio n as it is read must be used.
The preceding photograph shows a m a trix made up of many thousand m agnetic core elements
which together remember hundreds o f thousands o f binary bits in a large com puter.
Magnetic Drum Storage
A lth o u g h the m agnetic core provides a m uch faster means o f storing in fo rm a tio n , some com
puters use a m agnetic drum fo r storage. The m agnetic drum is a steel cylinder coated w ith ma
te ria l s im ila r to th a t used on m agnetic recording tape. This m aterial can be m agnetized w ith a
num ber o f sm all m agnetic "s p o ts " in much the same m anner in which in fo rm a tio n is recorded on
m agnetic tape. The drum rotates a t a constant speed and in fo rm a tio n is "w ritte n o n " or "re a d
fro m " the m agnetic spots by a recording head in much the same m anner th a t in fo rm a tio n is re
corded or played back from a tape recording.
In the m agnetic drum there is a problem o f id e n tify in g the location on the drum which is to be
read in order to obtain the in fo rm a tio n desired a t a p a rtic u la r point in tim e. Through a sequencing
system, each storage location on the drum is specified by a given address (so th a t a p a rticu la r
location m ay be determ ined) in order to obtain or store in fo rm a tio n a t th a t point on the m agnetic
drum .
W riting on a
Drum
Reading from a
Drum
23
Because transm ission o f in fo rm a tio n can occur only when a p a rtic u la r location is passing
under the recording or play back head, the tim e required to obtain in fo rm a tio n from the m agnetic
drum or to record in fo rm a tio n in a p a rtic u la r location on the drum is greater than th a t required to
obtain in fo rm a tio n from the m agnetic core.
Magnetic Disc Storage
The m agnetic disc uses a process s im ila r to th a t used w ith the m agnetic drum . In fo rm a tio n is
recorded on discs w hich look much like standard phonograph records. The discs are stacked in
an a rray surrounding a central spindle in a mechanism w hich operates very much like an ordinary
ju ke box.
In fo rm a tio n is read into or out o f the discs by means of an arm which is able to enter into the
stack o f records and read fro m or w rite on either side o f a p a rtic u la r disc. It is im p o rta n t to re
member th a t the recording on the disc is a magnetic recording. So th a t although these records
appear to be much like the o rdinary phonograph records, the recording process is one involving
m agnetic spots.
Other Forms of Storage
A lth o u g h the various form s o f storage described above are those most com m only encoun
tered in com m ercial computers, other form s o f storage are used to a lim ite d degree.
B inary in fo rm a tio n is sometimes stored in an electric capacitor w ith the po la riza tio n o f the
capacitor determ ining w hether the b it stored is a one or a zero. In m agnetic recording, the pres
ence o f a m agnetic spot was taken to indicate a 1and the absence a 0; in the capacitor the presence
o f extra electrons is taken to indicate a 1 and the absence o f electrons a 0.
Cathode ray tubes are also used fo r storage. W hen these devices are used, a point on the
screen o f the tube is used as the m emory element. A charged p o in t represents a 1 and the absence
o f a charge indicates a 0.
W hen acoustic delay lines are used as storage elements the binary state o f the elem ent is de
term ined by the presence or absence o f an ultrasonic vib ra tio n in a flu id . The presence o f the
vib ra tio n indicates a 1, its absence a 0.
External Storage
The storage media discussed above are a ll used fo r internal and secondary storage. External
storage involves media associated w ith the o u tp u t units and w ill be discussed in the next section.
A t th is tim e it is s u ffic ie n t to note th a t three m ajor types o f external storage are encountered in
the modern d ig ita l com puter system. These are m agnetic tape, punched cards and paper tape.
PROCESSING TECHNIQUES
Large Computer Processing
Processing w ith in a high-speed d ig ita l com puter is accomplished using electronic circuits
analogous w ith those used in the M IN IV A C 601. W ith some large scale com puters the instructions
are com m unicated using a program board in w hich instructions are wired in a m anner s im ila r to the
wired program m ing o f the M IN IV A C . In most high-speed d ig ita l com puters, various operations
which can be perform ed by the processing u n it are permanently wired into the com puter and the
com puter is program m ed to perform a p a rtic u la r operation (to choose a p a rtic u la r w ired circ u it)
when a specific code is given as an instruction. A com puter, m ig h t fo r exam ple, be program m ed to
choose an a d ditio n c irc u it when it encounters the instruction " 0 1 " and to choose a subtraction
c irc u it when it encounters the instruction " 0 2 ."
W hen coded instructions are used in a large d ig ita l com puter, the numbers representing the
coded instruction m ay be stored in the storage u n it o f the com puter just as data is stored. W hen
th is is done, the processing u n it is directed to certain registers o f the storage u n it to obtain num
bers w hich are interpreted as instructions and to other registers to obtain numbers which are in te r
preted as data. W hen this process is followed, the com puter is said to be operating under control
24
o f a "stored p ro g ra m ." In one sense then, the M IN IV A C 601 or any other w ire-program m ed com
puter m ay be said to be operating under control o f a stored program . In the case o f the nu
m e rica lly coded instru ction m achine, the program is stored as numbers in the storage u n it w hile
in the case o f the w ire-program m ed m achine the instructions are stored in the connections
wired on the program m ing panel o f the com puter.
Electronic circu its used in the high-speed d ig ita l computers use components which are d iffe r
ent in fo rm fro m those used on the M IN IV A C 601. The functions w hich they perform , however, are
s im ila r to the operations o f the relays and rotary switch o f the M IN IV A C 601, and the M IN IV A C
components o ffe r the p a rtic u la r advantage o f being com pletely visible so th a t th e ir operation can
be easily viewed. It is easy to see the sw itching action o f a relay on the M IN IV A C 601 but impos
sible to see the s im ila r fu n c tio n in g o f a transistor or m agnetic core elem ent.
The processing u n it o f the com puter is the central control instrum ent o f the com puter system.
The processing u n it is usually associated w ith the "m a in fra m e " o f the com puter and d ire ct com
m unication w ith the processing u n it is provided fo r the operator through the switches and lights of
the com puter console.
The Binary Nature of Processing
The processing u n it o f most large com puters operates only in binary. Just as the relays used
fo r processing on the M IN IV A C are capable o f dealing only w ith zeros and ones, the processing
systems o f larger com puters w ork only in binary code.
Since in fo rm a tio n is com m unicated to the m achine in other than bin a ry fo rm , it m ust be
coded in b in a ry form according to a system which w ill pe rm it the m achine to recognize it as
num eric, alphabetic, or special character in fo rm a tio n . This binary coding o f non-binary in fo rm a
tio n is often accom plished using a Binary Coded Decimal or "B C D " code rather than using the
bina ry equivalents o f the decim al num ber (see firs t section o f Book IV). The fo llo w in g ch a rt pro
vides a sum m ary o f the representation o f alphabetic, num eric and special characters according
to the Binary Coded Decimal System.
THE BINARY CODED DECIMAL SYSTEM USED FOR PROCESSING
Character
blank
1
2
3
4
5
6
7
8
9
0
+0
-0
BCD
110
000
000
000
000
000
000
000
001
001
000
011
101
Code
000
001
010
011
100
101
110
111
000
001
000
010
010
Char.
A
B
C
D
E
F
G
H
1
J
K
L
M
BCD
010
010
010
010
010
010
010
011
011
100
100
100
100
Code
001
010
011
100
101
110
111
000
001
001
010
011
100
Char.
N
O
P
Q
R
S
T
U
V
w
X
Y
z
BCD
100
100
100
101
101
110
110
110
110
110
110
111
111
Code
101
110
111
000
001
010
011
100
101
110
111
000
001
Char.
+
/
=
-
)
$
*
(
BCD
010
100
110
001
001
011
011
101
101
111
111
Code
000
000
001
011
100
011
100
011
100
011
100
In Book III o f th is series the decision-m aking fu n ctio n o f the processing u n it is discussed, and
examples o f the operation o f the processing u n it as a decision-m aking device are provided. Book
III also contains a detailed discussion o f the logical operations which enable the processing u n it
to fu n c tio n as a "R ea son in g " device. In Book III you w ill discover how M IN IV A C 601 is able to
d u plica te m any o f the functions o f hum an reason which are norm ally considered proof o f a hu
man being's a b ility to " t h in k . "
O U TPUT M E D IA A N D CODES
Direct Output
Just as bin a ry in fo rm a tio n may be given dire ctly to the com puter using in p u t buttons on the
com puter console, b in a ry o u tp u t m ay be obtained d ire c tly from the com puter through lights
s im ila r to the bin a ry ou tp u t lights o f the M IN IV A C 601. W hen binary o u tp u t lights are used, the
25
code already established fo r use w ith the M IN IV A C 601 is employed. A lig h t ON indicates a " 1 " ;
a lig h t OFF indicates a " 0 . "
A photograph below shows the direct o u tp u t lights on the console o f the IBM 7090 com puter.
You w ill notice th a t there are 37 lamps in the row o f o u tp u t lights o f the 7090 com puter. These
are used to display the contents o f the 36 binary " b its " in a 7090 storage register. The fa r le ft
lig h t indicates the sign o f the num ber when the lights are displaying a binary number. The "sign
in d ic a to r" lig h t ON represents m inus; the lig h t OFF represents plus.
26
a series o f dies are used to punch holes in the tape or card in the location corresponding to coded
in fo rm a tio n sent to the punch u n it from the processing u n it o f the com puter.
The cathode ray tube o utpu t u n it which is used to display o utput in a form which has no count
erpart in the inp u t sequence should be noted. T his television-like display u n it provides an "a n a lo g "
in the form o f a p ic to ria l representation o f inform ation. A photograph of a Cathode Ray Tube
ou tp u t u n it appears in the next section o f this book.
4.
This section o f the book contains photographs o f equipm ent m anufactured by the In te r
nationa l Business M achine C orporation to perform each o f the fo u r m ajor com puter
functions. These photographs are included to enable you to become fa m ilia r w ith the
appearance o f units p erform ing the various functions which we have discussed.
Card Input Equipment
Inpu t in fo rm a tio n fo r use by a com puter system may be prepared on a card punch o f the type
illustrate d below. The m achine in the photograph is the IBM 026 Card Punch which punches cards
using the IBM A lpha-nu m e ric Inp ut Card Code.
The cards to be punched are placed in the hopper on the rig h t hand side of the 026 and fed
through the m achine to the punching station. The operator, using the keyboard of the machine,
punches the card in much the same way th a t he would type a letter using a typew riter. The space
bar a t the bottom o f the keyboard is used to move the card under the punch dies w ith o u t punching.
W hen a key is pressed, a hole is punched in the card in the p a rtic u la r colum n under the punch dies
a t the tim e the key is pushed. The 026 also prints above the colum n which has been punched the
27
num ber or le tte r represented by the punches. A n exam ple o f a card prepared by an 026 card
punch is shown below.
/
/
hiBCDEFGHi JKLMNOPQRST'JVWXYZ
lllllllll
1 2 3 4567390
= $.-< *> +
MINIVAC 601
II
I I II
lllllllll
I I
I I
oooooaooooooaoooooooo||||||||ooooooooooooa|ooooo|ooo|oooaooooooo|oooo|oooooooooo
1 1 3 4 5 I 7 I I 70 II 1113 M W I 1 17 I I I I 30 21 31 23 34 35 38 37 78 29 30 31 31 33 34 35 3G37 % 394041 474344 45 45 47 4141 50 31 52 515(55 31 57 31 39 40 614743 M IS 14 IT 48 49 70 71 7773 74 78 76 77 71 71 M
t1t|l111111l|l111111111111111111l|l11111111111111111111111111111l|l11l|l11111111
Z222|222ZZ222|2222222|222222Z22222|222222222222222222222222222222222222222222222
33333|33333333|3333333|333333333333|33333333333||||333333333333333|3333333333333
444444|44444444|4444444|444444444444|44444444444444||||44444|4444444444444444444
S555555|5S55555S|55S5555|555S55555S55|555555555S55S55S5555S555|5|555555S5555555S
66S66S6G|66666666|66GG66G|6G6666666666|6666G66666666666666666666G666|66666666GG6
777777777|77777777|7777777|777777777777|7777777777777777/77777777777777777777777
8888888888|88888888|8888888|8888B8888888|B88888||||||||888888888S8B888888888B888
99999999999|99999999|9999999|999999999999|.9 999999999999999999|9|9999999999999999
I 2 3 4 8 7 I t t 0 1 1 1 2 1 3 1 4 1 S tlt7 U 1 l20 21 22 232 48 2l 27 2l2l3031323334333l 37 3 in 4 0 4t 42 43 44 4S 46 47 4l4S90 91 9293MSSSB57MS9 80 61 82 63 64 65 K I76 l8 B T 0 71 72 73 74 7S7l 77 7l7SIO
________________ IM8081
/
/
12-Row
11-Row
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 D0 G0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 @ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
i i i i i i i i
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 <Ts) 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
33333333333333333033333333333333333 33333333333333333033333333333333333 33333333
44444444444444444044444444444444444 44444444444444444044444444444444444 44444444
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 0 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 0 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 66666666
7777777777 77 77 777 0 777 7777 77 777 77777 7777 7 777 77 7777 7770
88888888888668888086888888888888888 88888888888888888088888888888888888
88888888
9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 0 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 0 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 99999999
1 2 3 4 5 6
7 8 9
10 31 12 13 14 15 16 17 18 19 20 21 2 2 2 3 2 4 25 2 6 2 7 2 8 2 9 30 31 32 33 3 4 3 5 3 6 3 7 38 3 9 4 0 41 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 50 51 5 ? 53 54 55 5 6 57 58 59 60 61 62 6 3 6 4 6 5 6 6 6 7 68 69 70 71 72 71 74 75 7 6 77 76 79 80
28
Input-Output Units
The photographs below illu s tra te IBM card, tape, and p rin te r units.
W hen cards are read by the card reader, th e y are placed in the hopper at the fro n t o f the
reader. D uring the read cycle they pass under the read brushes and out into the hopper on top of
the unit.
The m agnetic tape u n it both reads and w rites on m agnetic tape. This u n it is thus a combined
in p u t-o u tp u t device.
The equipm ent used to read paper tape operates, as does the card reading equipm ent, by
in te rp re tin g the holes in the paper tape as b in a ry in fo rm a tio n . Once th is in fo rm a tio n is read it is
interpreted according to a program previously supplied to the machine. As in the punched cards, a
hole is read as a one and the absence o f a hole as a zero.
29
Storage Units
U nits em ploying m agnetic core, m agnetic drum and m agnetic disc storage media are illu s
tra ted below.
CORE
STORAGE U N IT
DRUM
STORAGE U N IT
5.
DISC
STORAGE U N IT
COMPUTERS OF TOMORROW
A lth o u g h com puter technology has already reached levels o f perform ance beyond im agina
tio n only a decade ago, technological progress in the com ing years promises to open new horizons
fo r these am azing machines.
The capabilitie s o f these machines o f tom orrow can be forecast from the capacities o f the
most advanced com puter systems being operated today. A n example is the IB M "S tre tch System"
illu stra te d below. The " S tre tc h '" has an internal m em ory capacity o f more than 16 m illio n b i
nary bits. The speed o f this system is such th a t it requires only 2 micro-seconds fo r "S tre tc h " to
add two numbers and store the results.
The research laboratories o f com puter m anufacturers throughout the country are w orking
now on com puter systems w ith greater capacity, greater speed and more e ffic ie n t design. Every
day, the men and women involved in this new and e xciting fie ld put com puters to w ork on new
problems, in d iffe re n t areas. The developm ent o f the com puter is m aking possible the e ffic ie n t
h andling o f vast am ounts o f data and the solution o f problems in science, engineering and
business.
30
APPENDIX
D IG ITA L A N D ANALOGUE COMPUTERS
T hrougho ut th is m anual, a ll discussion o f computers refers to digital computers. There are
in use, however, m any com puters whose basis of operation is com pletely d iffe re n t. These are ana
logue computers. Both types o f com puters are capable o f perform ing sim ila r types o f operations
and can serve s im ila r functions.
The differen ce between digital and analogue com puter systems is basically a difference in the
m ethod the system uses to handle in fo rm a tio n . The analogue com puter handles in fo rm a tio n as a
continuously varying signal w hile the d ig ita l com puter handles in fo rm a tio n in discreet form .
The follow in g sketch illustrates gra p h ica lly the difference between continuous and discreet
representation:
t
The solid line represents the value o f a fu n ctio n as it changes over tim e. This is a continuous
fu n c tio n ; th a t is, there is a value fo r the fu n ctio n at every p oint in tim e. This representation can
be handled by an analogue machine.
The vertical bars also represent the value of the fu n ctio n as it changes over tim e. However,
the fu n c tio n exists only a t the d is tin c t points in tim e represented by the bars; the fu n ctio n is not
defined between these points. As the points in tim e are chosen closer and closer together, a line
connecting the ends o f the bars w ill approach the continuous curve.
The reason fo r this d ifference in fo rm o f in fo rm a tio n is essentially because o f a difference
in the type o f components which go into the systems. The analogue com puter uses m echanical or
electrical components to represent relationships. A n analogue com puter m ight, fo r example use
a ro ta ting s h a ft w ith various sha ft positions corresponding to values o f a variable. Or, an ana
logue com puter could use an electric capacitor which is capable o f storing electrons w ith v a ri
ous levels o f charge on the capacitor corresponding to values o f a variable.
The d ig ita l com puter, on the other hand, uses various components to represent specific va l
ues o f a variable. The d ig ita l com puter can, fo r exam ple, use the two positions o f a relay (on
or o ff) to represent two d is tin c t values o f the variable.
As an exam ple o f how the two systems d iffe r in operation, consider the problem o f adding
tw o pounds o f salt plus three pounds o f salt:
T o solve this problem as an analogue m achine would, we would do the follow ing:
1.
2.
3.
4.
32
If we wished to do this on an analogue m achine, we would let amperes o f current represent pounds
o f salt. T h a t is, we would use numbers o f amps o f current as analogues o f the numbers o f pounds
o f salt. W e would then do the follow ing:
1.
2.
3.
4.
To solve the same problem as a d ig ita l m achine would, we would firs t have our salt in onepound blocks. W e would select 2 blocks, then 3 more blocks. Then we would observe th a t there
were a to ta l o f 5 blocks.
To solve th is problem on a d ig ita l machine, we would program the m achine to add and give
the m achine the numbers 2 and 3. The m achine would then give the answer 5.
The basic diffe re nce between the m achine can be sum m arized as follows:
A n analogue m achine accepts quantities
A d ig ita l m achine accepts numbers
33
BOOK III
How Computers Make Logical Decisions
PREFACE
In Books I and II the general operating characteristics o f the M IN IV A C 601 and large com
m ercial com puters were examined. Emphasis was placed on the nature and fu n ctio n o f com po
nents w hich are combined to m ake up a com puter system. This book assumes a basic knowledge
o f the functions o f the components o f d ig ita l com puter systems such as would be obtained from
reading Books I and II.
In this book a tte n tio n is focused on the process and techniques by which com puters are able
to perform operations w hich we m ig h t describe as th in k in g . There is a great deal o f question as to
w hether com puters a c tu a lly " t h in k " . Discussion o f this question is deferred u n til later in this book
a fte r you have done some o f the experiments. M ost o f w hat we speak o f as " th in k in g " is a process
o f searching m em ory or the environm ent fo r facts and m aking decisions based on those facts. In
this book you w ill learn how com puters make decisions based on such facts. The concepts associ
ated w ith com puter logic and the techniques w hich com puters use to solve problems and m ake de
cisions w ill be explored in some detail.
1. BASIC OPERATIONS
As you have undoubtedly come to realize, the m odern-day com puter perform s p ra c tic a lly all
o f its operations using the zeros and ones o f a binary code. In Books I and II the reason fo r this
use o f b ina ry coding was explained w ith reference to the "b i-s ta b le " elem ents used fo r control,
processing and storage in large scale com puters and the M IN IV A C 601.
In the experim ents w hich you have already perform ed, the lights were interpreted as a 1
when they were ON and a 0 when they were OFF; the pushbuttons indicated a 0 when they were
UP and a 1 when D O W N ; the relays stored a 1 when they were ON and a 0 when OFF. Through
your experience w ith the lights, pushbuttons and relays, you should be well acquainted w ith the
o n -o ff (0-1) nature o f the d ig ita l com puter.
As indicated above, th is book explores the logical operations used by a d ig ita l com puter
and examines how com puters " t h in k " and make decisions. Logical operations, as a ll other com
p u te r functions, are perform ed using the 0's and 1's o f the binary code. The nature o f this " th in k
in g " process can best be dem onstrated w ith some sim ple examples.
The Operation " A N D "
In beginning to exam ine com puter th o u g h t processes, it m ay be h e lp fu l to use examples in or
der to develop some basic logical elements. These can then be used to solve more com plicated and
sophisticated problems.
As an exam ple o f a logical operation, consider the fo llo w in g series o f statements:
A.
B.
C.
If I go outdoors
and
If it is raining
then
I w ill get wet.
Here we have three ideas w hich com bine in a " lo g ic a l" way to produce a conclusion w hich,
according to the rules w hich we use fo r th in k in g , is " tr u e " . In order to convey the basic charac
teristics o f th is com bination o f ideas to the com puter, we must fin d a way to represent the basic
relationships w hich lin k the three sentences in the exam ple above using the 0-1 binary code w ith
w hich the com puter is able to work.
35
Let us look a t the sentences again. There are three statem ents related in such a way th a t the
th ird statem ent can be arrived a t as a va lid conclusion, given the in fo rm a tio n supplied by the
firs t two sentences. To p u t it another way, if the firs t two statem ents are " tr u e " , then the rela
tionships between the firs t two sentences and the th ird sentence are such th a t the th ird sentence
must also be true. On the other hand, neither the firs t sentence nor the second sentence alone
leads to a logical conclusion.
In order to make this point obvious, we m ight restate the three statem ents above in the fo l
lowing form :
A.
B.
C.
If it is tru e th a t
I go outdoors
AND
If it is tru e th a t
it is raining
TH EN
It w ill be tru e th a t
I w ill get wet.
If we now ignore the content o f the three sentences and look only a t the relationships which
exist between A, B, and C we can state the general condition th a t
If A is true
AND
If B is true
TH EN
C is true.
The relationship lin k in g statem ents A and B w ith statem ent C establishes an exclusive set
o f conditions which w ill be satisfied only when statem ent A and statem ent B are both true. It fo l
lows from the above th a t:
If A is false
AND
If B is true
TH EN
C is false
or,
If A is true
AND
If B is false
TH EN
C is false.
To relate the contents o f these logical statem ents to the binary coding system used by the
com puter, the fo llo w ing relationships may be defined.
1 = true
0 = false (not true)
Using this coding system and rem em bering th a t (a) pushing button DO W N indicates as 1,
leaving it UP indicates a 0, and th a t (b) a lig h t O N indicates a 1, a lig h t OFF indicates a 0, we can
program the com puter so th a t the tru e or false conditions fo r statements A and B can be given to
the com puter as inp ut and the com puter w ill give us the condition o f the th ird statem ent as true
or false output:
1 + /1 Y
1X /2Y
2 X /3 A
3 B /3
36
Using the c irc u it above, pushbutton 1 w ill be used to com m unicate the true or false condition
o f statem ent A and pushbutton 2 w ill be used to com m unicate the condition o f statem ent B. If
pushbutton 1 is D O W N and pushbutton 2 is UP, statem ent A w ill be true and statem ent B w ill
be false. W hen both pushbuttons are held down, both statem ents A and B w ill be indicated as
true. In sum m ary:
PUSHBUTTON
PUSHBUTTON 2
LIG H T 3
Up or O ff
Statem ent A
is false
Statem ent B
is false
Statem ent C
is false
Down or On
Statem ent A
is true
Statem ent B
is true
Statem ent C
is true
1X1 = 1
0 X 1= 0
1X0 = 0
0X0 = 0
The equals sign ( = ) in these equations m ay be read as "T H E N " rather than as "e q u a ls ".
The relationships expressed by each o f the fo u r logical statem ents above are:
37
A.
B.
C.
A.
B.
C.
A.
B.
C.
A.
B.
C.
If 1 go out
AND
If it is raining
1w ill get wet.
If 1 do not go out
AND
If it is raining
THEN
1w ill not get wet
(1 X 1 = 1)
(O X 1 = 0)
If 1 go out
AND
If it is not raining ( 1 X 0 = 0)
TH EN
1w ill not get wet.
If 1do not go out
AND
If it is not raining
TH EN
1w ill not get wet.
( 0 X 0 = 0)
In the program fo r the com puter representation o f the three statem ents, the condition " I go
o u t" is represented by pushbutton 1 and the statem ent " I t is ra in in g " is represented by pushbut
ton 2. The lig h t represents the statem ent " I w ill get w e t". Remembering th a t a 1 means th a t a
pushbutton is D O W N or a lig h t is ON and a 0 indicates th a t the pushbutton is in UP and th a t the
lig h t is OFF, we developed a com puter program based on the fo u r equations above.
The Operation "O R "
Just as a rith m e tic uses several d iffe re n t kinds o f operations (addition, subtraction, division,
m u ltip lic a tio n ) to solve a rith m e tic problems, the solution o f logical problems s im ila rly involves
the use o f several d iffe re n t logical operations. W e are now fa m ilia r w ith one o f these operations
the operation " A N D " represented by the symbol X.
A second operation o f basic im portance is the "O R " operation. Just as the " A N D " oper
ation represents the idea o f two things both being true, the "O R " operation represents the idea
o f either o f two or more things being true.
Using an exam ple s im ila r to our previous three statements, we can consider the follow ing:
A.
B.
C.
Logical representation o f the relationships between these three statem ents may be sum m ar
ized using the symbol + to mean "O R ".
+ = OR
A nd the relationships between the statem ents may be stated as:
A + B= C
These relationships can be represented to the com puter using the fo llo w in g program :
38
1Z
1 + /1 Y
1 Y /2 Y
2 X /1 X
2 X /3 A
3 B /3
If I go outside
AND
If it is raining
OR
If I stand under the shower
TH EN
I w ill get wet.
2Z
1 + /1 Y
1 Y /3 Y
IX /2 Y
2 X /3 X
3 X /4 A
4B /4
39
In the case o f " A N D " , we were concerned w ith things happening together. In the case of
" N O T " , we are concerned w ith the reverse o f the " A N D " situation. The " N O T " operation is used
to deal w ith the concept th a t som ething w ill happen if som ething else does not happen.
Returning to the fa m ilia r exam ple concerning the wetness o f rain, consider the follow ing
series o f statements;
A.
If is it raining
AND
B.
If I am N O T under cover
TH EN
C.
I wi 11 get wet
The program and c irc u it representing th is set o f relationships is given below. Pushbutton 1 is used
to represent statem ent A , pushbutton 2 to represent statem ent B, and lig h t 3 to represent state
m ent C:
1 + /1 Y
IX /2 Y
2 Z /3 A
3 B /3
1Z
1+
1Y
2Z
1X
2Y
3B
3-
2X
If it is raining
AND
I am outside
AND
If I am not under cover
OR
If I am in the shower
TH EN
I w ill get wet
In the fo llow in g program , statem ent A is represented by pushbutton 1, statem ent B is repre
sented by pushbutton 2, statem ent C is represented by bushbutton 3, statem ent D is represented
by pushbutton 4, and statem ent E is represented by lig h t 5.
1
|/1 Y
1X /2 Y
2 X /3 Y
3 Z /5 A
1Y /4 Y
4 X /5 A
5 B /5
40
C onverting this series o f statem ents into a program fo r the M IN IV A C , we have the follow ing
program and c irc u it:
1 + /1 Y
1 Z /2 X
IX /2 Z
2 Y /3 A
3 B /3
Pushbutton 1 is used to represent statem ent A, pushbutton 2 to represent statem ent B, and
lig h t 3 to represent statem ent C. The program uses the contacts so th a t if either pushbutton 1 or
pushbutton 2 is pushed, lig h t 3 w ill come ON. L ig h t 3 w ill NO T come on if both pushbuttons 1
and 2 are pushed.
Expressing these relationships sym bolically requires the use o f two statements, each express
ing a condition which m ig h t exist:
1.
2.
Since either o f the above is permissible, the entire set o f relationships may be stated as:
( A X B ) + ( A X B) = C
A Short Summary
It m ay be h e lp fu l to review b rie fly the fo u r logical operations which have been demonstrated
thus fa r using the pushbuttons and lights:
41
42
1 + /1 Y
1X /1C
1 F /1 2 + /2 Y
2 X /2 C
2 F /2
1 + /1 H
2 + /2 H
2 G /3 A
3 B /3
THE RELAY A N D C IR C U IT
In this c irc u it, pushbutton 1 is used to control relay 1 and pushbutton 2 to control relay 2.
Pushing pushbutton 1 causes relay 1 to close by providing current to the coil o f relay 1. In a
s im ila r manner, pushbutton 2 controls the flo w o f current to the coil o f relay 2. The norm ally
open contacts o f the two relays are used to e ffe c t the " A N D " condition. L ig h t 3 indicates when
the " A N D " condition is met both relay 1 and relay 2 are closed (ON).
The Relay OR Circuit
The program and c irc u it below use two relays to establish the conditions fo r the "O R " rela
tionship. Using th is program , if either relay 1, controlled by pushbutton 1, or relay 2, controlled by
pushbutton 2, are O N, then lig h t 3 w ill come ON indicating th a t the OR condition is met.
Sym bolically, the condition is represented by the expression:
A + B= C
1 + /1 Y
1 X /1 C
IF /1
2 + /2 Y
2 X /2 C
2 F /2
1 + /1 H
1G /3A
2 + /2 H
2 G /3 A
3 B /3
THE RELAY OR C IR C U IT
The Relay N O T Circuit
The c irc u it and program below represent the NO T condition expressed in the form th a t if
relay 1 is not energized (is not O N) lig h t 2 w ill come ON. Sym bolically, this may be stated:
A = B
43
1-4-/1V
ix/ic
1 F /1 1 + /1 H
1J/2A
2 B /2
THE RELAY N O T C IR C U IT
The Relay EITHER BUT NOT BOTH Circuit
The c irc u it and program below represent the EITHER BUT NO T BOTH condition using relays
1 and 2 controlled by pushbuttons 1 and 2 respectively. The symbolic representation fo r this con
d itio n is:
(A X B) + (A X B) = C
1 + /1 Y
1 X /1 C
1 F /1 1 -4-/1H
1 J /2 G
1 G /2J
2 + /2 Y
2 X /2 C
2 F /2
2 H /3 A
3 B /3
44
c irc u it. For the purposes o f this m anual, the follow ing b rie f introduction to Boolean algebra is
s u ffic ie n t:
Basic concepts
The two-state system:
Boolean A lgebra requires th a t any variable have only two possible states. Thus:
a statem ent m ay be TRUE or FALSE,
a c irc u it m ay be CLOSED or OPEN
a switch m ay be ON or OFF.
Representation and N otation:
Let: 0 = false, OFF, OPEN
1 = true, O N, CLOSED
O n -o ff electrical circu its provide a graphic picture o f the basic concepts o f Boolean algebra.
Consider the fo llow ing c irc u it diagram :
Switch A is shown in the OPEN (no cu rre n t flow ing) position. In notational form then,
A = 0
means: switch A is OPEN. S im ilarly, B =
ing through switch B).
Basic Operations:
AND;
consider two switches A and B connected in series:
For the entire system to be O N, cu rre n t must flo w through both switch A and switch B. Using
the no ta tion th a t:
X means A N D
and Z represents the entire system then,
AX B= Z
There are fo u r possible states fo r the system; these possible states m ay be listed in a truth table:
0
1
0
1
0
0
1
1
0
0
0
1
45
(it m ay be h e lp fu l a t this p oin t to refer back to the o rig in a l discussion o f the A N D c irc u it to see
a verbal representation o f the tru th table).
OR:
Consider two switches ( A and B ) connected in parallel:
For the system to be O N, curre nt may flow through either switch A or switch B. Using the no
ta tio n th a t:
+ means OR
then,
A + B= Z
The tru th table fo r th is condition:
A
0
0
1
1
0
1
0
1
0
1
1
1
NOT:
This operation stands fo r the opposite state or condition. The notation is a line over the sym
bol. Thus:
A means " n o t A "
or, in the b in a ry system:
T =0
0 = 1
The two negation relationships are known as the complementarity laws:
1)
AX A = 0
A + A - I
g raphically:
1)
46
AXA = 0
2)
A + A = 1
A + B= B+ A
A X B = BX A
A + (B + C) = (A + B) + C
A X (B X C) = (A X B) X C
(A X B) +
(A X C) =
A X (B +
C)
(The d istrib u tiv e law is p a rtic u la rly useful fo r c irc u it sim p lifica tio n ).
Decision-Making with Insufficient Information
In the preceding section o f this book, the basic elements o f com puter logic were discussed. Us
ing these basic operations (the operations o f Boolean A lgebra) com plex logical problems can be
analyzed and solved in much the same way th a t com plex m athem atical problems are solved us
ing the basic a rith m e tic tools addition , subtraction, m u ltip lic a tio n and division.
The fin a l section o f this book is devoted to a series o f logical, decision-m aking, problems.
Each problem w ill be considered in some detail and each step in the solution o f the problem w ill
be discussed. The basic operations developed in the preceding sections w ill be applied to each
problem to obtain a com puter program fo r the solution o f the problem.
M IN IV A C 601, ju st like a large d ig ita l com puter, can be used to solve any logical problem
if the follo w in g two requirem ents are met:
1)
2)
47
The firs t requirem ent s u ffic ie n t capacity can generally be met by using a com puter o f a
size appropriate to the problem. T h eo retically, a t least, any logical problem can eventually be
solved on a com puter if the com puter is large enough.
The second requirem ent s u ffic ie n t in fo rm a tio n must be met if the com puter is to produce
a solution to a logical problem . A com puter cannot guess. If a ll in fo rm a tio n about a p a rtic u la r
problem is not available, assumptions about the missing in fo rm a tio n m ust be made and pre
sented to the com puter. The com puter w ill then be able to solve the problem , basing its solution
on the facts and assumptions it has been given. W ith o u t s u ffic ie n t in fo rm a tio n either in the form
o f fa cts or assumptions a com puter cannot reach a solution to a problem. But then, neither can
a person.
For an exam ple o f a problem to be solved w ith in s u ffic ie n t in fo rm a tio n , let us return to the
problem o f ra inin g and wetness. Given only the fa c t th a t it is raining outside, we cannot reach a
conclusion as to w hether or not we are wet; nor can a com puter be program m ed to determ ine
w hether or not we are wet. The in fo rm a tio n is in su fficie n t.
However, if we assume th a t A) we are outside and B) we are not under cover, then we can con
clude th a t we are wet. On the other hand, if we assume th a t A ) we are inside or B) we are under
cover, then we can conclude th a t we are not wet. Therefore, if we do not have s u ffic ie n t in fo rm a
tio n , we can m ake assumptions about our problem and arrive a t a series o f conclusions. S im ilarly,
we can program a com puter w ith both the in fo rm a tio n and the assumption to yield conditional
answers.
Fact: It is ra ining outside.
Assum ptions
Conclusions
1 am outside
AND
1 am not under cover
1am wet
1am inside
OR
1am under cover
1 am not wet
W hen analyzing a problem fo r com puter solution, the distin ctio n between fa c t and assump
tio n m ust always be kept in m ind. Otherwise, th e solution w ill be incorrect a n d /o r incomplete.
Simulation
Com plex problems fo r which a tria l-a n d -e rro r solution would be too costly or tim e-consum
ing are often simulated on a com puter. W hen a com puter sim ulation is used, the conditions of
the problem are presented to the com puter and a lte rn a tive solutions are tried. W hen the desired
sim ulated result is achieved, the m ethod o f solution or the actual sim ulated solution can be ap
plied to the real w orld situation.
For exam ple, com puter sim ulation is used e ffe c tiv e ly to test the strength o f a rocket design
under the conditions o f outer space w ith o u t a ctu a lly b u ild in g the design or sending it into space.
The rocket design is program m ed onto a com puter as a series o f com plex m athem atical re la tio n
ships in term s o f geom etrical shape, resistance to fric tio n , reaction to pressure, and m any other
im p o rta n t details. Once th is in fo rm a tio n has been given to the com puter, the com puter is con
sidered to be a "s im u la te d rocke t".
To test the design, the engineers and scientists com m unicate varying conditions to the "s im
ulated ro c k e t", and the com puter com m unicates back the results o f the conditions. For instance,
the "s im u la te d ro c k e t" m ay be given a series o f accelerations; the results o f these accelerations
w ill be a series o f data which, when properly interpreted, w ill show w hat happened to the various
parts o f the rocket. S im ila rly, various m aterials can be tested under outer space conditions.
The result o f a sim u la tio n as involved as a rocket design is a vast am ount o f in fo rm a tio n
which m ust be c a re fu lly interpreted and analyzed before the fin a l answer can be achieved.
48
For a sim ple exam ple o f some o f the advantages and problems o f a com puter sim ulation, let
us return to the rainstorm . A nd, let us now assume th a t we are w earing a new suit. The problem
co n fro n tin g us is, o f course, to stay dry. W e could easily enough stay inside, but th a t would be im
practical. On the other hand, we could step outside which would be fin e unless it is raining. Ob
viously, we do not w a nt to stay inside; but a t the same tim e, we do not w ant to risk ge ttin g our
new su it wet.
Using sim u la tio n , we can try various solutions to our problem w ith o u t risking ge ttin g wet.
Then we can analyze the results o f the sim ulation and fin d the best plan o f action.
Problem: I m ust not get wet
Possible Solutions:
A.
B.
C.
D.
Stay inside
Go outdoors
C.
D.
W ea r a raincoat
C arry an um brella
Results
I w ill not get wet
I w ill not get wet if it is not raining or if I am un
der cover.
I w ill not get wet
I w ill not get wet
T his is the form in w hich com puter results o f a sim ulation generally appear. It is le ft to the
persons involved to select the best possible solution. To choose the best possible solution, both the
solution and the result m ust be considered. For instance, these are our alternatives and w ith them
are other factors w hich w ill influence our fin a l decision:
Alternatives
A.
B.
C.
D.
Stay inside.
Go outdoors.
W ea r a raincoat.
C arry an um brella.
Results
I w ill not get wet.
I may not get wet.
I w ill not get wet.
I w ill not get wet.
Other Factors
have an appointm ent I m ust keep,
cannot a ffo rd a new suit,
do not have a raincoat,
feel s illy carrying an um brella.
A t this point, it is up to each o f us to decide on a best possible solution. A lte rn a tiv e B is not
the best possible solution, nor is a lte rn a tive C each w ill probably cost us money. This leaves a
choice between A and D. If the a ppointm ent must be kept, then the only a lte rn a tive le ft is D. A l
though we w ill feel s illy carrying an um brella, th is is the best possible solution to our problem a
solution w hich we have achieved w ith o u t ruining a suit in the process.
Real problems are, o f course, much more com plex than our sim ple exam ple. However, our
exam ple had the same advantage as a large-scale sim ulation: we tested various situations before
a c tu a lly try in g them out, and thus saved ourselves the expense o f replacing the item under test if
one o f our solutions was incorrect. T h a t is, we now know th a t we w ill not get the new suit wet when
we go outdoors because we w ill be carrying an um brella.
O f course, we had to have the possible solutions in m ind before we could try them out. T his is
one o f the d iffic u ltie s o f a sim u lation technique: to fin d the best possible solution, a ll possible so
lutions must be trie d . It is up to the persons involved in the problem to determ ine the alternatives.
The com puter w ill yield the results o f each a lte rn a tive , and then it is once again up to the per
sons involved to decide upon the best possible a lternative.
Thoughts About Thinking
Before using M IN IV A C 601 to solve problems w hich require reasoning and 'th o u g h t" fo r
solution, we m ig h t pause fo r a m om ent to th in k about thinking.
49
Does a com puter really " th in k " ? If by " t h in k " we mean does the com puter fo llo w a series
o f steps w hich are lo gica lly related and which lead the com puter to the solution o f a problem , our
answer m ust be yes. In this sense, the com puter d e fin ite ly does " th in k " .
If, on the other hand, we consider th in k in g in the sense o f creative hum an though t in which
ideas or thoughts are conceived, the com puter does not " th in k " . The com puter does not "k n o w "
w hat it is th in k in g . It has no consciousness. A com puter m ust (at least in itia lly ) be program m ed
to perform each step in the solution o f a problem . It can do only w hat the com puter operator or
program m er tells it to do. A lth o u g h we m ay not know the solution to a problem , we can decide
on the steps w hich should be taken to reach the solution and can com m unicate these steps to
the com puter.
The reason th a t the com puter can solve the problem which we m ay not be able to is th a t the
com puter remembers each step in d e ta il and does not become "co n fu se d ". W h ile we are ta lk in g
about the fo u rth step in a problem , we m ay have fo rgotten some detail o f the firs t step which is
necessary in order to arrive a t the correct solution. The com puter w ill not forget.
The p oint o f th is com m ent is th a t the com puter m ust be program m ed w ith absolute accu
racy. The com puter does not know w hat it is to do; it has no way o f ju d g in g when it has made a
m istake. It w ill sim ply fo llo w the instructions it is given (by program m ing) and arrive a t the con
clusion w hich is the result o f fo llo w in g these steps.
You m ay have noted the com m ent th a t the com puter must, at least initially, be to ld each
operation w hich it is to do. The word " in it ia lly " m ust be used because a com puter can be pro
gram m ed to program itself. T h a t is, a com puter can be given instructions fo r fo llo w in g a series
o f steps or operations w hich w ill enable it to generate more instructions which it can then per
form . A com puter, once it has been given such a series o f instructions and has been provided
w ith a d d itio n a l instructions which enable it to "e v a lu a te " the conclusions which it reaches
to determ ine w hether the solutions reached meet previously supplied c rite ria can begin to
" le a r n " concepts and relationships w hich the person o rig in a lly program m ing it did not know or,
a t least, did not com m unicate to it.
In m any ways, the process by w hich a com puter is educated or ta u g h t to th in k is
s im ila r to th a t used to teach a child. The com puter and ch ild must both be ta u g h t to gain in fo r
m ation fro m th e ir environm ent, to in te rp re t it, and to use the in fo rm a tio n in association w ith data
drawn fro m past experience to arrive a t conclusions about a given situ a tio n or the solution to
a p a rtic u la r problem .
As you consider the program s w hich m ust be given to M IN IV A C 601 to enable it to solve the
problems and riddles in the fo llo w in g section, consider the in fo rm a tio n you would have to give a
person who had never before solved a problem to enable him to duplicate the perform ance o f the
com puter.
A s hum an beings, we can do m any things; b u t we sometimes fo rg e t th a t m any people and
much experience have gone in to the teaching process through which we have received and stored
in our memories the data and instructions w hich enable us to deal w ith our environm ent.
4.
50
C.
The process follow ed in solving th is problem can be analyzed using a flow chart. T his ch a rt
indicates each step in the decision process and shows the sequence which leads to the fin a l result.
A flo w ch a rt fo r the solution o f th is problem appears below:
The flo w ch a rt shows th a t question A is the num ber greater than 3 separates the possi
ble numbers in to two groups: those greater
th a n 3 (4, 5, 6, 7) and those not greater than 3 (0,
1, 2, 3). Question B then separates each o f these groups into two groups,
and question Cdeter
mines w hich num ber in the appropriate set is not excluded in other words, determ ines the num
ber o f w hich the person was th in k in g .
The conditions fo r each o f the num bers can be expressed as logical operations as follows:
Let:
A =
A =
B=
B=
C=
C=
Using these d e fin itio n s, we can express the conditions fo r each o f the possible numbers as follows:
A X B XC_= 7
A X BXC~= 6
A X B X C = 5
A X B X 'C 'r r 4
A X B X C = 3
A X B X C = 2
A X B X C = 1
A X B X CT= 0
T o program the problem fo r solution on a com puter, each relationship is connected into a c ir
c u it representing the equation. Then these c irc u it representations o f the equations m ust be com
bined fo r a com plete program .
The circu its fo r the ind ivid ua l equations are sim ply com binations o f the A N D and N O T c ir
cuits. For example, the c irc u it representation fo r an answer o f 5 would be:
51
A X B X C = 5
C om bining the eight equations above into a single c irc u it w ill give the follow ing:
N otice th a t the c irc u it has the same fan-shaped appearance as did the flow chart. In essence,
th is c irc u it diagram is sim ply a c irc u it representation o f the flo w chart. Each " g a te " (switch) rep
resents an answer to one o f the questions.
However, if we exam ine th is c irc u it representation, we see th a t there are fo u r contacts to the
gate (switch) representing statem ent C, and th e re are two contacts to the gate representing state
m ent B. If we were to program this c irc u it onto a com puter then, we would have to have one gate
which was capable o f accepting fo u r separate inputs. This can be done on the M IN IV A C , and the
c irc u it could be program m ed d ire c tly from the above c irc u it representation.
It is possible, though, th a t we would w ant to program this problem onto a com puter which
had only three inp ut contacts fo r each gate. W h a t would we do in this case? Or sim ila rly, w hat
would we do if we wanted to keep a contact free fo r additions to the circu it?
The com m utative law o f Boolean A lgebra referred to in the previous section can be applied
to th is p a rtic u la r problem . The com m utative law states that:
A X B is the same as B X A
So, we can restate fo u r o f our equations as follow s:
A X B X C j= 3
A X J3X C T= 2
AXBXC =1
T x^
o
a x
becomes
becomes
becomes
becomes
A X CX B= 3
A X ~C X J3 = 2
AX C XB = 1
A X 'C X T r z O
52
T his is a sim ple exam ple o f the m a n ipulatio n o f circu its which professional program m ers do
to f i t a logical solution to the capa bilitie s o f a p a rtic u la r com puter. Some com plex logical prob
lems can be program m ed fo r com puter solution o n ly by m aking m axim um use o f the com puter's
capacity in this fashion.
W e shall use a program based on this la tte r c irc u it representation fo r solving the problem on
M IN IV A C 601. The slide switches w ill be used fo r data in p u t and data storage; the relays w ill be
used fo r processing and operating storage; the rotary switch w ill be used fo r output. A pushbutton
w ill be used fo r the instru ction : move fin a l answer from operating storage (relays) to ou tp u t (ro
tary switch).
In sum m ary then, the rules fo r using the " M in d Reading P rogram " are:
Let:
Slide Switch 4 represent the answer to question A
Slide Switch 5 represent the answer to question B
Slide Switch 6 represent the answer to question C.
A slide switch LEFT indicates a YES answer; a slide switch RIGHT indicates a NO answer. The
questions are:
A
B
C
A fte r the answer to each question has been com m unicated to the com puter through the slide
switches, pushing pushbutton 6 w ill in struct the com puter to indicate the fin a l answer on the deci
mal in p u t-o u tp u t dial.
A program fo r the solution of this problem follows:
53
5 V /4 S
4 R /4 A
4 B /4 5 C /5 A
5 B /5 6 C /6 A
6 B /6 6 X /6 V
6 V /5 V
6 U /6 C
5 U /5 C
5 F /6 F
6 F /6 M /D 1 8
D 1 8 /4 V
4 U /6 S
4 W /5 S
5 R /6 H
5 T /6 L
6 R /5 H
6 T /5 L
M + /6 Y
6 X /D 1 7
D 1 6 /D 1 9
D 0 /6 N
D 1 /6 K
D 2 /6 J
D 3 /6 G
D 4 /5 N
D 5 /5 J
D6/5K
D7/5G
3.
Indicate the answers to the questions as follows:
If the answer to question A is YES, move slide switch 4 to the LEFT.
If the answer to question A is NO, move slide switch 4 to the RIGHT.
If the answer to question B is YES, move slide switch 5 to the LEFT.
If the answer to question B is NO, move slide switch 5 to the RIGHT.
If the answer to question C is YES, move slide switch 6 to the LEFT.
If the answer to question C is NO, move slide switch 6 to the RIGHT.
4.
Push pushbutton 6. The po in ter knob o f the rotary switch w ill tu rn to the num ber your
frie n d was th in k in g of.
Book V I M IN IV A C GAMES includes a v a ria tio n on this " M in d Reading P rogram " which
uses names in place o f numbers.
Quantity Recognition
As a fu rth e r exam ple o f the use o f logical operations, let us consider how a com puter could
be program m ed to recognize quantities. The problem w ill be to instruct the com puter to deter
m ine the num ber o f slide switches w hich are O N (in the LEFT position) regardless o f which slide
switches are used.
Q u a n tity recognition circu its have m any a p plicatio ns in com puter logic. They can be used,
fo r instance, to perform additions, to indicate the results o f a game or a vote (win, lose, draw) or
to give d ire ct count fo r a q u a lity control system. Q u a n tity recognition circuits of th is type are
based on w hat m athem aticians call a "sym m e tric fu n ctio n la ttic e ". For our purposes, we may
consider the c irc u it as a series o f "y e s -n o " decisions.
Slide switches 2 through 6 w ill be used to provide input: a slide switch LEFT is O N , a slide
switch RIGHT is OFF. Lights 1 through 6 w ill be used fo r o u tp u t according to the follow ing conven
tion:
L ig h t
L ig h t
L ig h t
L ig h t
L ig h t
L ig h t
1 ON
2 ON
3 ON
4 ON
5 ON
6 ON
indicates th a t 1 switch is ON
indicates th a t 2 switches are ON
indicates th a t 3 switches are ON
indicates th a t 4 switches are ON
indicates th a t 5 switches are ON
indicates th a t No switches are ON.
To program the com puter fo r q u a n tity recognition, we w ill firs t describe the possible condi
tions as a series o f logical expressions:
54
Let:
A
B
C
D
E
=
=
=
=
=
the
the
the
the
the
condition
condition
condition
condition
condition
th a t
th a t
th a t
th a t
th a t
slide
slide
slide
slide
slide
switch
switch
switch
switch
switch
2
3
4
5
6
is ON
is ON
is ON
is ON
is ON
A X B X C X D X f = light 6 ON
However, the possibilities fo r lig h t 1 com ing ON in d ica tin g th a t one switch is O N m ust be
stated as five separate expressions:
A X B X C X D X T = light
A X B ^ X C " X D X F = light
A X fX C ^ X D X E _ = light
A X F X X D X F = light
A X B X C X D X E : light
1 ON
1 ON
1 ON
1 ON
1 ON
S im ila rly, there w ill be ten separate expressions fo r the possible conditions fo r lig h t 2 to come
O N in d ica tin g th a t two switches are O N, ten expressions fo r lig h t 3, five expressions fo r lig h t 4
and the single expression
A X B X C X D X E = lig h t 5 ON
The program and c irc u it fo r the com plete solution must f i t a ll o f the conditions o f the prob
lem as stated in the 32 logical expressions o f a ll possible cases. The fu ll c irc u it m ay be repre
sented as follows:
55
You w ill notice th a t this representational c irc u it has a lattice shape. M oreover, it is ele c tric
a lly symmetrical about the low er-left to upper-right diagonal. Hence the m athem atical phrase
"sym m e tric fu n c tio n la ttic e " referred to earlier. This c irc u it representation shows the conditions
A and A , etc., as separate switches. In the a ctu a l program , o f course, both conditions fo r a given
switch w ill be wired onto a single switch using the norm ally-open and norm ally-closed contacts fo r
the A and A etc., conditions respectively.
A n exam ination o f the c irc u it representation shows th a t fo r conditions C, D, and E (corres
ponding to slide switches 4, 5 and 6) more contacts are required than are available on M IN IV A C
601. Howover, by using the relays and co n tro llin g them by the slide switches, we w ill be able to
meet the requirem ents o f the problem.
The fin a l program fo r the solution o f the q u a n tity recognition problem appears below. This
program is based on the c irc u it representation above and uses the relays to supply the required
a d d itio n a l contacts.
56
6 F /6 6 + /6 S
6 S /4 V
4 V /3 V
3 V /2 V
2 U /2 C
2 C /3 C
3 U /4 C
4 C /5 C
4 U /6 C
5 A /2 G
4 A /2 K
3 A /2 N
2 A /2 T
1 A /3 J
6 A /3 N
6 T /5 V
6R /5S
5 U /5 T
5 U /4 S
5 R /6 H
5 W /6 L
4 T /6 K
4R /6 J
6 N /5 L
6 J /5 H
6 G /4 H
6 K /4 L
5 J /4 K
5 N /3 L
5 K /4 N
5 G /4J
4 N /3 H
4 J /2 L
4 G /2 H
4 K /2 S
3 J /3 K
3 G /2 T
2 J /2 K
2 N /2 R
57
the com puter, only the correct result w ill be perm itted and this result w ill be com m unicated to
the operator. W e shall refer to this method as the "autom atic" method o f solution.
The basic diffe re nce between the two methods can be compared w ith the d ifference between
a therm om eter and a therm ostat. A therm om eter (the analogy o f the "B o o le a n " solution) w ill de
term ine the tem perature and indicate w hat it is. A therm ostat (the analogy o f the "a u to m a tic "
solution) w ill not only determ ine the tem perature, b u t w ill also a tte m p t to "c o rre c t" the tem per
ature to m atch the tem perature w hich has been "p ro g ra m m e d " into it. For instance, if the tem
perature were 65F and we had set a therm ostat fo r 6 8 , the fo llo w in g would occur fo r a th e r
m om eter and a therm ostat:
1. The therm om eter w ould indicate th a t the tem perature was 65F. It would be up to us to do
som ething about the fa c t th a t it was 3 cooler th a n w hat we wanted.
2. The therm ostat would determ ine th a t the tem perature was 65F and would a u to m a tica lly
tu rn up the furnace u n til the tem perature reached 68F.
Essentially then, the "B o o le a n " m ethod o f solution indicates tru th or error; the " a u to m a tic " m eth
od o f solution determines the correct solution and indicates a fin a l result.
R eturning now to the problem o f the three g irls, we w ill firs t represent the problem conditions
as logical expressions, since both methods require this step. W e w ill then develop program s fo r
solution by each o f the two methods.
Logical Expressions fo r the Problem Conditions
From the conditions o f the problem , we can see th a t there are only two possible situations
fo r each g irl:
C a m ille could or could not
Sara should or should not
W anda would or would not
W hatever other conditions m ay exist, we can be sure th a t there are only two possible conditions fo r
each g irl.
W e can therefore represent the possible conditions fo r each g irl by the fo llo w in g convention:
C _ = C a m ille could
c =
s_=
s =
w =
58
"Boolean solution"
Because it is sim pler in this case, we w ill set up a program fo r the "B o o le a n " solution fro m the
three "erro r" expressions above. Slide switches 1, 2 and 3 w ill be used to provide the contacts fo r
C am illa, Sara and W anda respectively. L ig h t 3 w ill be used as the error indicator. Since there are
three error conditions and only two contacts fo r lig h t 3, we w ill use the "C o m m o n " term inals to
provide the necessary extra contacts. (The notation fo r a connection to a common te rm in a l is
"1 co m ", " 2 c o m ," etc.)
The c irc u it diagram and program fo r the "B o o le a n " solution o f the problem appear below.
Each o f the logical expressions fo r the problem conditions can easily be traced on the c irc u it d ia
gram.
Slide switch 1 represents C am ille
Slide switch 2 represents Sara
Slide switch 3 represents W anda
A slide switch LEFT indicates the positive condition: C am ille could, Sara should, W anda would.
A slide switch RIG HT indicates the negative condition : C am ille could not, Sara should not, W a n
da would not.
L ig h t 3 ON represents an error.
1 + /2 S
2 S /3 V
2T /3 S
3 T / 3 com
2R /1S
I T / 3 com
3 U /2 V
2 V /1 V
1W/2W
2 W / 3 com
3 A / 3 com
3 B /3
59
Since there is a possibility o f more than one correct solution, pushbuttons 1, 2 and 3 are
w ired in so th a t a d d itio n a l in fo rm a tio n may be entered.
Pushbutton 1 represents C am ille
Pushbutton 2 represents Sara
Pushbutton 3 represents W anda
A pushbutton UP transm its no additio n al in fo rm a tio n to the com puter. A pushbutton DO W N,
however, supplies the positive condition (C am ille could, Sara should, W anda would).
W hen the power is turned O N , a correct solution w ill im m ediately appear in the relay indica
to r lights. By pushing a pushbutton, we m ay enter a d d ition al positive in fo rm a tio n about a girl.
The relay in dica to r lights w ill then indicate the correct solution to the problem w ith the added
inform a tion .
14 - / 1 V
1Y /2Y
2 Y /3 Y
1 X /1 C
2X /2C
3X /3C
2 K /1 X
2L /2 +
2 N /3 C
3 G /1 H
1H /1 C
1G/2C
3 H /3 +
1F/2F
2F /3F
3 F /3 -
60
To solve the farm e r's problem on the M IN I VA C , we w ill state the problem as a series o f logi
cal expressions. These relationships w ill then be converted to c irc u it representations and the
conditions of the problem w ill be program m ed onto the com puter fo r solution.
The Basic C onditions:
The farm er's problem can be stated as three basic conditions:
A.
B.
C.
The goose and the w o lf cannot be le ft alone w ith o u t the farm er.
The goose and the corn cannot be le ft alone w ith o u t the farm er.
The boat w ill hold only one object in ad d itio n to the farm er.
The firs t two conditions A and B can be expressed as logical statem ents as follows:
Let:
F
F~
G
G
W
W
C
C
E
Then:
C ondition A (the goose and the w o lf cannot be le ft alone) can be expressed as:
GXWXF + GXWXF = E
C ondition B (the goose and the corn cannot be le ft alone) can be expressed as:
GX CX F+ GX CX F= E
C ondition C (the size lim ita tio n o f the boat) need not be stated as a logical expression. The
fin a l program w ill include appropriate c irc u itry so th a t if the boat is overloaded, only one object
w ill be recognized as being in the boat w ith the farm er.
P rogram m ing the S im ulation:
The two problem conditions A and B can be combined as follows: F X G X (W -f- C) + F
XGX(W + G = E
This is the error condition which must be program m ed onto the computer. W e w ill program the
com puter so th a t if either error condition is met, an " a la r m " lig h t (or an " e rr o r" light) w ill come
on.
I f we had only to program the error condition, the program would be a sim ple one, and this
F X G X ( W + C) + F X G X ( W + C) = E
C IR C U IT REPRESENTATION
61
However, th is c irc u it represents only the processing and ou tp u t portions o f this program . W e
m ust also provide means o f in p u t and storage fo r the various solutions which we w ill a ttem pt. By
w irin g in the slide switches and pushbuttons fo r in p u t and storage, and using the relays fo r proc
essing and the lights fo r ou tp u t, we w ill be able to program the entire problem fo r com puter solu
tion.
W e shall use the fo llo w ing conventions in the program :
A n ou tp u t lig h t ON represents an object at home.
A relay ind icato r lig h t ON represents an object across the river.
A slide switch LEFT represents an object in the boat.
A slide switch RIG HT represents an object not in the boat.
L ig h t 5 ON represents the condition: " W o lf eats goose".
L ig h t 6 O N represents the condition: "Goose eats co rn ".
Pushbutton 6 represents m oving the boat towards home.
Pushbutton 1 represents m oving the boat from home.
The fo llo w in g components w ill be used to represent the objects in the problem :
O u tpu t L ight
Relay
Slide Switch
Farmer
Goose
W o lf
Corn
1 U /2 V
1 V /1 X
1 X /6 X
1 Y /1 +
2 A /2 J
2 B /2 2 E /2 U
2 C /2 G
2 F /3 F
2 H /3 H
2 N /3 N
2 W /3 V
3 A /3 J
3 B /3 3C /3 G
3E /3U
3 F /4 F
3 H /4 H
3 K /4 K
3 L /5 A
3 N /4 N
3 W /4 V
4 A /4 J
4 B /4 4 C /4 G
4 E /4 U
4 F /4 4 H /4 +
4 L /6 A
5 B /5 6 B /6
6 Y /6
2.
3.
4.
5.
62
T u rn power ON. M a n u a lly push relays 1 through 4 to the LEFT. The relay indicator lights
w ill come ON to indicate th a t a ll objects are across the river. Move slide switches 1 through
4 to the RIGHT.
Place the fa rm e r in the boat by m oving slide switch 1 to the LEFT. (The fa rm e r m ust be
in the boat or the boat w ill not move)
Choose another object and place it in th e boat by pushing the appropriate slide switch
to the LEFT.
M ove the boat across the river by pushing pushbutton 6. If lights 5 and 6 rem ain OFF,
no error has been made.
C ontinue m oving the boat back and fo rth across the river w ith the d iffe re n t objects u n til
a ll fo u r objects are a t home (output lights 1 through 4 are O N .) Do not fo rg e t to remove
objects from the boat when they have reached the other side (by m oving the slide switch
to the RIGHT)
6.
If an error is made, reset the com puter by setting slide switches 1 through 4 to the RIGHT
and m a n u a lly setting relays 1 through 4 to the LEFT.
W h o is w atching television?
T his problem provides an excellent example o f a problem which is com plicated enough to be
confusing to a person a tte m p tin g to solve it. T h e problem conditions and the details o f the rela
tionships are d iffic u lt to remember. Because o f its confusion-proof memory, the com puter can
easily handle a problem o f th is type.
To solve th is problem , we w ill state the problem conditions as logical expressions and devel
op the appropriate c irc u it fo r a "B o o le a n " solution using a " t r u t h " lig h t to te ll us when we have
arrived a t the correct solution. This w ill, o f course, be a sim ulation technique since we w ill not
have to a c tu a lly drop in on the fa m ily to fin d out who is w atching television.
Logical expressions fo r the Problem Conditions:
Let:
B = the condition th a t Barry is w atching television
C = the condition th a t C lara is w atching television
D g the condition th a t David is w atching television
E = the condition th a t Edward is w atching television
F m the condition th a t Francis is w atching television
Then:
A nd:
2.
3.
4.
Edward and David are either both w atching or both not w atching television:
E X D + IX D = T
5.
If Francis is w atching television, then Barry and Edward are also w atching television:
T + ( BXE) = T
Each o f these expressions can be represented as logical circuits in the follow ing manner:
63
1.
B+ C= T
T ---------------------
64
2.
E+ F= T
3.
CXD + CXD = T
4.
EXD + EXD = T
5.
F + ( BXE) = T
switch
switch
switch
switch
switch
1 represent Barry
2 represent C lara
3 represent David
4 represent Edward
5 represent Francis
A slide switch LEFT indicates th a t the person is w atching television; a slide switch RIG HT indicates
th a t the person is N O T w atching television.
L ig h t 4 w ill indicate the correct solution: lig h t 4 O N indicates th a t the solution represented by the
slide switches is CORRECT; lig h t 4 OFF indicates th a t the solution is N O T CORRECT.
The com plete program fo r the "B o o le a n " Solution is:
1U /1S
1S/2S
1 T /2 R
2 R /2 V
2 U /3 W
2 W /3 U
3 R /4 R
3 S /3 V
3 T /4 T
4 A /4 S
4 B /4 4 U /5 V
4 U /1 V
4 V /4 +
5 W /1 U
65
BOOK IV
How Computers Do Arithmetic
1.
In the previous books, we have fre q u e n tly made use o f the two-valued binary code. W e have
seen th a t this is a convenient representation fo r the o n -o ff nature o f the com puter's components.
Let us now consider the binary number system which is basic to the fu n ctio n in g o f a com puter system.
How Numbers Are Represented in the Binary System
A ll o f us have been ta u g h t to th in k in the decimal number system. The decim al system has ten
d iffe re n t symbols zero through nine which can be used alone and in com bination to represent
num erical concepts. The binary system, however, uses only two d iffe re n t symbols zero and one
to represent the same num erical concepts.
Let us consider a th re e -d ig it decim al number: fo r example, 547. W e know th a t th is a ctu a lly
means 500 plus 40 plus 7 or 5 tim es 100 plus 4 tim es 10 plus 7 tim es 1. In other words, we
know th a t the right-m ost d ig it represents the num ber of l's (units) in a num ber, the next d ig it to
the le ft represents the num ber o f 10's in the number, the next d ig it to the le ft represents the num
ber o f 100's in the num ber, and so on.
Now let us see why this is so. Suppose we s ta rt counting from 0. W e go 0, 1, 2, 3, 4, 5, 6, 7,
8, 9. Now we have used up a ll o f the symbols available in the decim al system. To continue, we
m ust invent a m ethod fo r handling numbers greater than 9. W e do th is by placing a 1 to the le ft
and a 0 in the fa r rig h t position (called the "lo w order p o s itio n ") so th a t we now have " 1 0 " which
represents one ten and no ones. S im ilarly, if we reach 99 which represents 9 tens and 9 ones
and then add one more we m ust invent a m ethod fo r handling numbers larger than 99. W e do
this by placing a 1 to the le ft and 0's in the two low order positions, giving 100 1 tim es 100 plus
0 tim es 10 plus 0 tim es 1.
So we have a sim ple rule fo r fo rm in g any num ber system: when we run out of symbols in the
low order position, we place a 1 in the next higher position and return the low order position to 0.
N otice w hat this means: if we have 70 symbols, the low order position represents l's ; the next
high order position represents 10's; the next high order position represents 100's; and so on. Each
tim e we move one position to the le ft the "w e ig h tin g " o f th a t position is ten tim es as great as the
" w e ig h tin g " o f the position to the right.
Now notice th a t if we had only 5 symbols 0, 1, 2, 3, 4, to w rite the next higher num ber
(5) we w ould have to place a 1 in the le ft position and a 0 in the rig h t to represent one 5 and
no l's .
The bina ry system is a c tu a lly sim pler than the decim al system. W e count 0, 1 and then we
have run out o f symbols. So the next symbol (to represent 2) m ust be 10 representing one 2 and no
l's . Three is w ritte n 11, representing one tim es 2 plus one tim es 1. Once again, we have run out
o f symbols. To w rite 4 we must w rite 100, representing 1 tim es 4 plus 0 tim es 2 plus 0 tim es 1.
Thus the rule fo r fo rm in g numbers in the binary system is: the low-order d ig it represents l's ,
the next le ft d ig it represents 2's, the next le ft d ig it represents 4's, and so fo rth . Let us now count
fro m 0 to 10 in bina ry numbers:
67
:im a l
0
1
2
3
4
5
6
7
8
9
B inary
0
1
10
11
100
101
110
111
1000
1001
6G /6 F
5 C /6 C
6 C /6 -
W e w ill now add to the program so th a t when pushbutton 6 is pushed, relay 6 w ill go to the
same state th a t relay 5 is in. T his w ill require the fo llo w in g addition al connections:
68
6H /6Y
6 X /5 L
5K/6F
5N/6E
A g a in we w ill add to the program so th a t when pushbutton 6 is released, relay 5 w ill go to the
opposite state from relay 6:
6 Z /6 L
6 K /5 E
6 N /5 F
A n d fin a lly , we w ill add an in d ica to r lig h t to show w hat state the flip -flo p is in:
6 G /6 A
6 B /6 -
W e now have a s in g le -in p u t-flip -flo p program m ed on M IN IV A C . The c irc u it diagram fo r this
is:
However, our sin gle-inp u t flip -flo p s till cannot be used fo r a rith m e tic : it does not provide a
" c a rry s ig n a l". T h a t is, it does not n o tify us when it has changed from 1 to zero. A nd, since all
contacts on both relays are used, we cannot arrange fo r a carry signal by m erely adding connec
tions.
The solution to th is d iffic u lty is to b u ild a d iffe re n t version of the single-inpu t flip -flo p one
which leaves contacts free fo r the program m ing of a carry signal. The version o f the flip -flo p which
we w ill use d iffe rs fro m the previous one in another respect as well. The stable states o f the flip flo p when the pushbutton is up are either both relays ON or both relays OFF. For this program , lig h t
5 is used to indicate the state o f the flip -flo p . L ig h t 6 is used only to provide a path fo r current when
relay 6 is "s h o rte d -o u t" (OFF); lig h t 6 is not used as an in d ica to r in this program . The program
and c irc u it diagram fo r th is flip -flo p are:
69
S -g
.5 -
6, a
.s -
Program:
5 + /5 G
5 H /5 F
5 F/6F
5 C /6C
6 C /6
5 J /6H
6G /5E
6J/6E
6E /6A
6 B /6
5 H /5 A
5B /5
6 + /6 Y
6 X /6 H
6 K /4 A
4 B /4 -
6 + *~
6Y
6X
70
W e can use single-input flip -flo p s as "b u ild in g blo cks" fo r more com plex a rith m e tic devices.
For exam ple, three flip -flo p s can be wired together on your M IN IV A C to produce a counter which
operates as follows:
Light 5
Light 4
Ligh
FLIP-FLOP
carry
FLIP-FLOP
carry
FLIP- F .OP
B to A
C to B
pushbutton
As pushbutton 6 is pushed and released again and again, this device w ill store in binary code the
num ber o f tim es the pushbutton has been pushed. The follow ing ch a rt shows w hat happens to
each stage o f the counter as the pushbutton is pushed and released, pushed and released: (the
ch a rt is read from rig h t to left).
Pushbutton
carry
Times
Pushed
0
1
UP
DOWN
NO
YES
1
1
UP
DOW N
1
1
NO
NO
UP
DOWN
NO
YES
1
1
NO
YES
1
1
UP
DOWN
1
1
NO
NO
0
0
NO
NO
UP
DOW N
1
1
NO
NO
1
1
NO
YES
1
1
UP
DOWN
1
1
NO
NO
1
1
NO
NO
UP
DOWN
1
1
NO
YES
1
1
NO
YES
1
1
UP
DOW N
NO
NO
UP
0 or 8
Carry
C to B
Flip-Flop
A
Carry
B to A
Flip-Flop
B
0
0
NO
NO
0
0
NO
NO
0
0
NO
NO
0
1
0
0
NO
NO
0
1
Flip-Flop
C
T his counter, shown in the preceding block diagram , can be b u ilt on the M IN IV A C as the
fo llo w ing experim ent demonstrates:
Experiment 1: A Three-Bit Binary Counter
In th is Experim ent we w ill b uild a counter and use it to see how the binary num ber system
works.
A counter can be made up o f any num ber o f single-inpu t flip -flo p s w ith carry. One flip -flo p
is required fo r each b it to be handled by the counter. Because the M IN IV A C 601 has six relays, we
71
w ill be able to b u ild a th re e -b it counter (using tw o relays fo r each flip -flo p ). T his counter w ill allow
us to count fro m 0 to 8.
The c irc u it diagram w hich follow s is fo r the m iddle b it (or " 2 " b it) o f the counter. The "h ig h
o rd e r" and "lo w o rd e r" bits (th a t is, the " A " b it and the " 1 " bit) are identical except th a t no "c a rry
o u t" is required fo r the high order b it and the "c a rry in " to the low order b it is supplied through
pushbutton 6. The program fo r the entire counter is given below w ith the c irc u it diagram fo r the
m iddle stage:
2 C /3 C
2E/2J
2 F /4 A
3A /6E
3B /3
3 C /4 C
3E /4G
3 F /3 H
3 F /4F
3G /3 +
3 J /4 H
3 J /6K
3L/4 L
3N /4 H
4 B /4
4 C /5 C
4 E /4 J
4F /5 A
5 B /5
5 C /6 C
5E /6G
5F/6 F
5F /5 H
5 G /5 +
5 J /6H
5 J /6 X
5 L /6 L
5 N /6 H
6 A /6 F
6 B /6
6 C /6
6 E /6 J
6 Y /6 +
Procedure:
1. T u rn power ON. Push pushbutton 6 and release. B inary ou tp u t lights 4, 5 and 6 w ill read OFF,
OFF, ON or 001. The B inary C ounter is displaying a 1.
2.
Push pushbutton 6 again and release. Binary o u tp u t lights 4, 5 and 6 w ill now read OFF, O N,
OFF or 010. The B inary C ounter is now displaying a 2.
3.
Push and release pushbutton 6 several times. Each tim e a fte r releasing the pushbutton, note
the b in a ry num ber displayed in lights 4, 5 and 6. Compare your num bers w ith the table o f binary
numbers on page 66.
Y ou w ill notice th a t the counter repeats a fte r it has reached 7. T his is a result o f the fa c t th a t
the counter is made up o f 3 flip -flo p s . Each flip -flo p has 2 stable states (0 or 1), so the com bination
o f 3 flip -flo p s has 23 or 8 stable states. These 8 stable states represent the binary numbers 0
through 7.
As you push pushbutton 6 several tim es, notice th a t the low order flip -flo p (represented by
lig h t 6) changes each tim e the pushbutton is pushed and released. The low order flip -flo p repre
sents 1's (units). The next flip -flo p to the le ft (represented by lig h t 5) changes every other tim e the
pushbutton is pushed and released. T his flip -flo p represents 2's. A nd o f course, the high order
72
flip -flo p (represented by lig h t 4) changes every fo u rth tim e the pushbutton is pushed and released;
the high order flip -flo p thus represents 4's.
You w ill notice th a t the m iddle flip -flo p changes on a regular basis; it changes every tim e the
low order flip -flo p changes fro m 1 to 0. The high order flip -flo p behaves s im ila rly it changes
every tim e the m iddle flip -flo p changes from 1 to 0.
R eferring again to the table o f bin a ry numbers, we can see th a t this is a characteristic o f
bina ry numbers: adding 1 to a b inary num ber changes the low order b it either fro m 0 to 1 or
from 1 to 0. A ll other, higher order, bits change i f and only if the b it to the rig h t is changing from
1 to 0.
Leave the B inary C ounter on the M IN IV A C fo r Experim ent 2.
Experiment 2: Counter Arithmetic
It is possible to perform additions very sim p ly on a B inary Counter. W e have already seen
th a t it is possible to add 1 to the num ber in the counter m erely by pushing and releasing push
button 6. T his technique can easily be extended to any num ber w hich can be represented on
the counter.
For exam ple, to add 2 and 3: push and release pushbutton 6 twice; the counter w ill dis
play the bin a ry num ber 2. Now push the pushbutton 3 more tim es and the counter w ill display
the answer the b ina ry num ber 5. T his is e xa ctly w hat would have happened had you just pushed
the pushbutton 5 times.
T his is one way in w hich an ad d itio n can be perform ed in a com puter and is, in fa c t, a com
mon m ethod fo r handlin g certain kinds o f a d d itio n problems.
A t th is p o int your counter should be displaying bin a ry 5. Now push button 6 five more
times. The pushbutton has now been pushed ten tim es, and the counter should display binary equiv
a len t o f decim al 10. However, bin a ry 10 is a fo u r-b it num ber (1010). Since we have only three
bits in our counter, we would expect to see only th e low order three bits o f the num ber displayed.
The b it pattern fo r the bina ry equivalent o f decim al 10 is 1010. The counter w ill display 010.
Experiment 3: Universal Counter Arithmetic
It is possible to w ire the Binary C ounter so th a t it w ill count down as well as up. In this way,
both additions and subtractions can be perform ed. The program below gives the necessary m o d ifi
cations to the Binary C ounter fro m experim ents 1 and 2:
M o d ify the program from Experim ent 1 as follows:
Remove the connections:
6 K /3 J
4 K /1 J
Add the connections:
3 K /6 W
3 N /4 N
6 R /6 K
4 K /6 U
5 N /6 N
5 K /6 T
6S/3J
6 V /1 J
Procedure:
1. B uild the counter or, if you have the counter from experim ents 1 and 2 program m ed, make
the necessary m odifications. If slide switch 6 is LEFT, the counter w ill count UP; if slide switch 6
is RIGHT, the counter w ill count DOW N.
2. Subtract 4 fro m 7 as follows:
a. M ove slide switch 6 to the LEFT.
b. Enter the larger num ber (7) by pushing pushbutton 6 the correct num ber o f tim es. The
counter is now displaying the larger number.
73
c.
d.
2. B IN A R Y A D D IT IO N
Rules for Binary Addition
Let us add together two bin a ry numbers: 11 010 (26) and 11100 (28):
11010
11100
sta rtin g from the low order (right-m ost) bit:
0 plus 0 equals 0.
1 plus 0 equals 1.
0 plus 1 equals 1.
1 plus 1 equals 0 and ca rry 1.
1 plus 1 plus carry 1 equals 1 and ca rry 1.
The answer is:
11010
11100
110110
As you can see, the a d d itio n tables fo r b in a ry a rith m e tic are very simple. They are:
+0
0
+_]_
+0
-M
10
The problem above illustrates how a b in a ry adder fo r a com puter must work. Each b it of
the adder m ust be able to accept three inputs:
a. the firs t num ber to be added
b. the second num ber to be added.
c. a carry fro m the b it to the righ t.
Each b it o f the adder m ust also be able to yield tw o outputs:
a. the sum
b. the carry.
Let us call the three inputs " A " , " B " , and "c a rry in " ; and let us call the two outputs "s u m "
and "c a rry o u t". N otice th a t the sum w ill equal 1 if and only if either one or three o f the inputs is
1. Carry out w ill equal 1 if and only if e ither two or three o f the inputs are 1.
If we restrict the in p u t to only A and B, we can b u ild the follow ing table showing inputs and
outputs o f an adder:
A
00
74
Sum
0
1
Carry Out
1
0
The c irc u it w hich a c tu a lly perform s this operation is called a "h a lf-a d d e r w ith c a rry ". A h a lf
adder w ith ca rry is a device w ith two inputs and tw o outputs such th a t the sum w ill equal 1 if and
only if one and only one o f the inputs is 1. In other words, the sum c irc u it is an EITHER BUT N O T
BOTH c irc u it. The fo llo w in g experim ent illustrates the operation of a half-adder w ith carry.
Experiment 4: A Half-Adder with Carry
In th is experim ent we w ill b u ild and test a sim ple h a lf-adde r w ith carry. The c irc u it and pro
gram are:
Program:
6 R /6 Z
6 T /6 X
6 T /6 V
6 Y /6 +
5 A /6 U
5 B /5 6A /6S
6 B /6 -
The entire program requires one pushbutton, one slide switch and two lights. The slide switch rep
resents in p u t A ; the pushbutton represents in p u t B. The lights represent the tw o outputs: lig h t 6
represents the sum; lig h t 5 represents carry out.
Procedure:
1. T u rn power O N. M ove slide switch 6 to the R IG H T : in p u t A is now 0. Donot push pushbutton
6: in p u t B is 0. L ig h t 5 and 6 are OFF: sum is 0 and carry out is 0.
2; Push pushbutton 6 and hold it down. In p u t B is now 1. L ig h t 6 comes O N , in d ica tin g th a t the
sum is I , T his is equivalent to the m athem atical statem ent: 0 + 1 = 1.
3. Release pushbutton 6 and move slide switch 6 to the LEFT. Input A is now 1; in p u t B is 0.
L ig h t 6 comes O N , in d ica tin g th a t the sum is 1:1 + 0 = 1 .
4. W ith the slide switch LEFT, push pushbutton 6. L ig h t 6 goesOFF and lig h t 5 comes ON.
This represents the m a them atical statem ent: 1 + 1 = 0 and ca rry 1.
I f we now have three inputs (A, B, and ca rry in) and two outputs, the table o f values looks
like this:
Carry In
Carry Out
Sum
75
The c irc u it w hich a c tu a lly perform s th is operation is called a " f u ll adder w ith c a rry ", and is
made up o f two half-adders as follows:
SUM
Like the single-inpu t flip -flo p w ith carry, the half-adder w ith carry is a basic com puter c ir
cu it. H alf-adders can be used as "b u ild in g b lo cks" fo r more com plex a rith m e tic devices an ex
am ple o f w hich is the fu ll adder.
Experiment 5: A Full Adder
In this experim ent we w ill m o d ify the c irc u it o f experim ent 4 to build a fu ll adder. A fu ll
adder is made up o f two half-adders and a sim ple OR c irc u it. The c irc u it and program fo r a fu ll
adder are:
5 A /6 U
5 B /5
5C/6S
5 F /5
5G/6J
5 H /5 +
5J/6G
6 A /6 H
6 B /6
6 J /6 L
6 K /6 U
6 R /6 Z
6 T /6X
6 T /6V
6 Y /6 +
76
Relay 6 represents a ca rry in from a previous stage. Relay 5 represents the sum o f inputs A and
B; this sum w ill be added to the carry in to give the sum fo r the fu ll adder. N otice th a t a carry
signal m ay come from either o f two places: either from the half-adder representing the slide
switch and pushbutton (inp ut A and input B), or from the half-adder representing the carry in (re
lay 6) and the sum o f the inp u t (relay 5). Either half-adde r can produce a carry signal.
Procedure:
1. T u rn power ON. M ove slide switch 6 to the RIGHT; Input A is 0. Do not push pushbutton 6; in
put B is 0. Relay 6 is OFF; carry in is 0. Lights 5 and 6 are OFF. This is equivalent to the m athem at
ical expression: 0 + 0 + 0 = 0.
2. M ove slide switch 6 to the LEFT; input A is now 1. L ig h t 6 comes O N: 1 + 0 + 0 = 1 .
3. M a n u a lly move relay 6 to the le ft to indicate th a t carry in is 1. L ig h t 6 goes OFF and lig h t 5
comes O N : 1 + 0 + 1 = 0 and ca rry 1.
4. T ry other com binations o f inputs by moving slide switch 6, pushing pushbutton 6, a n d /o r
m a nu a lly m oving relay 6.
W e have now seen how two half-adders can be combined to produce a fu ll adder. Full adders
can in tu rn be used as b u ildin g blocks fo r adders capable o f accepting greater inputs and yie ld
ing greater outputs. The follow in g experim ent illustrates the com bination o f three fu ll adders to
produce a "th re e -b it adder".
Experiment 6: A Three-Bit Adder
In th is experim ent we w ill b u ild a device w hich is capable o f adding together tw o 3 -b it b i
nary numbers and displaying a result o f not more than 4 binary bits. The program fo r the 3 -b it
adder is:
2 C /3G
2 F/3F
2G /4S
2 H /4 Y
2 K /4 W
2 L /2 +
2 N /4 U
3 A /M 1 0
3B /3
3 C /4G
3F/4E
3 G /3 N
3 H /4 Z
3J /4T
3K /4R
3 K /M 1 0
3L /4 X
4 A /4 V
4 B /4
4E /5F
4F/5S
4 G /5 U
4 H /4 N
4 K /5 Z
4 L /5 A
4 N /5 X
4 Y /5 Y
5 B /5
5C /6K
5F/6E
5G /6S
5 H /5 +
5K /6 W
5 L /6 A
5 N /6 U
5 R /6 T
5T /6 R
5 T /5 V
5 Y /6 V
6B /6
6E /6
6 G /6R
6 H /6 X
6J/6K
6 L /6 Z
6 N /6 T
6 V /6 Y
6 Y /6 +
Procedure:
1. T u rn power ON. Enter a binary num ber in the adder using slide switches 4, 5 and 6. For ex
am ple, to enter bin a ry 4 (100) set slide switch 4 LEFT, slide switch 5 RIG HT and slide switch 6
RIGHT.
2.
Enter another b ina ry num ber using pushbuttons 4, 5 and 6. For exam ple, to enter binary 5
(101) push button 4 and 6; do not push pushbutton 5.
3. The answer w ill be displayed in bin a ry o u tp u t lights 3, 4, 5 and 6. For example, if lights 3
and 6 are ON and ligh ts 4 and 5 are OFF, the answer is 1001 (9).
77
3. H O W COMPUTERS SUBTRACT
W e have now discussed two methods o f com puter addition. The firs t method was a counter
which was dependent upon the num ber o f tim es an in p u t button had been pushed. The second
m ethod used three fu ll adders w ith ca rry which allowed us to enter two 3 -b it numbers sim ultane
ously.
Two's Complement Arithmetic
S im ila rly, there are two methods o f com puter subtraction. The sim pler method is the "dow n
c o u n te r" dem onstrated in experim ent 3. However, in spite o f its sim p licity, the down counter is
seldom used in a com puter. The more common method o f subtraction used in com puters is called
"tw o 's com plem ent a rith m e tic ". Two's com plem ent a rith m e tic in the binary system is the same as
ten's com plem ent a rith m e tic in the decim al system.
Two's com plem ent a rith m e tic in the binary system works as follows: the subtractor is "c o m
plem ented ". T his means th a t every 1 is replaced by a 0, and every 0 is replaced by a 1. The com
plem ented subtractor and the subtrahend are then added. If a carry occurs out o f the high order
position, it is added to the low order position. The resulting sum is the proper d ifference between
the two numbers.
As an exam ple, let us subtract b in a ry 4 from b inary 13. W e firs t w rite down 1101 (13) and
below it we w rite 1011 w hich is the complement o f 0100 (4):
13
-4
1101
-0 1 0 0
decim al
bin ary
1101
1011
W e now add in the usual bin ary m anner except th a t if a carry occurs o u t o f the high order b it,
we w ill add it to the low order b it:
1 1 0
1
1 0
1 1
J_
1
1 0
1
0
A great advantage o f two's com plem ent a rith e m e tic is the fa c t th a t there is an autom atic
bookkeeping m ethod fo r in d ica tin g the sign o f the result. If a ca rry occurs out o f the high order
position, the subtraction has resulted in a positive number. On the other hand, if the ca rry does
not occur, the result is a negative number.
The experim ent w hich follows illu strates the operation o f two's com plem ent subtraction on
the M IN IV A C .
Experiment 7.
A Three-Bit Subtractor
In th is experim ent we w ill program the M IN IV A C to perform subtraction by the two's com
plem ent m ethod. T his w ill be done by m o difying the th re e -b it adder o f experim ent 6 as follows:
The carry out fro m the high order stage (represented by the w ire connected to lig h t 3) w ill be
connected to the carry in o f the low order stage. In th is way, if a high order carry occurs it w ill be
read into the low order stage, just as was illu stra te d above.
The adder w ill also be m odified so th a t the subtractor is a u to m a tic a lly com plem ented. To
bu ild the th re e -b it subtractor, make the fo llo w in g changes to the program fro m experim ent 6:
78
4 K /5 Z
6 H /6 X
6 L /6 Z
4 K /5 X
6 C /6 F
6 H /6 Z
6 L /6 X
4.
COMPUTER M U L T IP L IC A T IO N
Binary Multiplication
In the decim al num ber system we can m u ltip ly by ten m erely by placing a zero to the rig h t
o f the number. S im ila rly, in the b in a ry system we can m u ltip ly by two by placing a zero to the rig h t
o f the num ber.
To m u ltip ly in the bin ary system, we need o n ly rem ember th a t:
0 X 0 = 0
1X 0=0
0 X 1 = 0
1X1=1
and:
10 (2) X 1 = 1 0 (2 )
100 (4) X 1 = 100 (4)
1000 (8) X 1 = 1000 (8), etc.
In order to m u ltip ly in the b in a ry system on a com puter we w ill need a device known as a
shift register. A s h ift register shifts each b it o f a num ber one space to the le ft which, o f course, rep-
79
resents m u ltip lic a tio n by two. M u ltip lic a tio n by 4 is accomplished by s h iftin g le ft tw ice; m u lti
p lic a tio n by 8 is accom plished by s h iftin g le ft three tim es, and so on.
The fo llo w in g experim ent dem onstrates how a com puter can m u ltip ly using a m anual shift
register.
Experiment 8: The Shifting Operation
In this experim ent we w ill m u ltip ly and divide numbers by powers of tw o by m anually s h iftin g
the numbers rig h t and left. The device which we w ill use fo r this operation is called an accumu
lator. In th is experim ent, we w ill be concerned only w ith its s h iftin g abilities.
The program fo r the accum ulator is:
1A / I S
1B / 1
1C /3U
1 F /2 F
1G /2 W
1 H /2 A
1J/2U
1K /1T
1L/2R
1 N /1 R
1 N /2 T
1U / M 1 0
1V /1 T
2 B /2
2 C /3G
2F/3 F
2G /4S
2 H /4 Y
2K /4 W
2 L /2 +
2L/2S
2 N /4 U
2 S /2 V
3A /3S
3 B /3
3C /4G
3F /4E
3 G /3 N
3 H /4 Z
3J /3R
3 J /4T
3 K /4 R
3L /4 X
3 V /3 T
3T /4 R
4 A /4 V
4 B /4
4E /5F
4F/5S
4 G /5 U
4 H /4 N
4 K /5 Z
4 L /5 A
4 N /5 X
4 Y /5 Y
5B /5
5C /6K
5F/6E
5G /6S
5 H /5 +
5K /6 W
5L /6 A
5 N /6 U
5R /6 T
5 T /6 R
5 T /5 V
5 Y /6 V
6 B /6 6 C /M 1 0
6E /6
6G /6R
6 H /6 X
6J /6K
6 L /6 Z
6 N /6 T
6 V /6 Y
6 Y /6 +
80
101010
A g ain , we add the product o f the m u ltip lic a n d and the next left-m ost b it o f the m u ltip lie r:
101010
111X0=
000
101010
which is the fin a l result:
111 X 1 1 0 = 1 0 1 0 1 0 o r 7 X 6 = 42
M u ltip lic a tio n on a com puter is carried out in ju st th is fashion, using an accumulator. The accu
m u la to r acts just like a piece o f paper on which we record the steps which were illu stra te d above.
The fo llo w in g experim ent demonstrates m u ltip lic a tio n on a com puter using an accum ulator.
Experiment 9: The Accumulator
W ith o u t changing the program fro m experim ent 8 we w ill now perform m u ltip lic a tio n by num
bers other th a n powers o f two. M u ltip lic a tio n s w ill be perform ed by successive additions and shifts.
81
The accumulator, w hich is wired on the console from experim ent 8, is a device which is capable o f
p erform in g both additions and shifts.
As an exam ple, le us m u ltip ly :
6 X 10 or in binary: 110 X 1010.
Let: 110 = M u ltip lic a n d
1010 = M u ltip lie r
The left-m ost b it o f the m u ltip lie r is 1, so we w ill enter into the accum ulator:
110 X 1 or 110.
W e w ill do this by pushing the appropriate pushbuttons (in this case, pushbuttons 4 and 5.)
The slide switches should a ll be RIGHT.
As we push the pushbuttons, the o u tp u t lights display the num ber 000110. Record this
num ber on a piece o f paper and release the pushbuttons.
Enter the num ber w hich you recorded in th e slide switches and perform a le ft s h ift one b it
as described in experim ent 8. The o u tp u t lights w ill now read 001100.
The next left-m ost b it o f the m u ltip lie r is 0. W e w ill add nothing to the accum ulator, but
w ill s h ift le ft one b it. The o u tp u t lights now show 011000.
The next left-m ost b it o f the m u ltip lie r is 1, so we w ill add through the pushbuttons:
1 1 0 X 1 or 110
The ou tp u t lights now show 011110. Record th is num ber on a piece o f paper and release
the pushbuttons. Enter the num ber which you just recorded in the slide switches and s h ift
le ft one bit. The o u tp u t lights now show 11100.
The low order b it o f the m u ltip lie r is 0, so it is not necessary to add anything more into the
accum ulator. The bina ry o u tp u t lights now show the fin a l result: 11100 or 60.
110 X 1010 = 111100 o r 6 X 10 = 60
Select other numbers and m u ltip ly them on the accum ulator. The lim it o f this accum ulator is
111111 (63).
5.
D IV IS IO N ON A COMPUTER
Binary Division
D ivision in the bin ary system is perform ed exactly as in the decim al system. For example, to
divide 11011 (27) by 101 (5):
W
101
| 11011
101
111
101
10
11011 101 = 101 plus a rem ainder o f 10
or
27 -r- 5 = 5 plus a rem ainder o f 2.
82
Perform ing th is sequence o f operations on a com puter can, however, be d iffic u lt. In fa ct,
m any com puters have no provision fo r a u to m a tic division. For such a com puter, a subroutine is
w ritte n so th a t the com puter can carry out the individual steps o f a division. T h a t is, the com
puter is given a program of instructions which, when followed, pe rm it the com puter to divide.
The follo w in g experim ent demonstrates the steps involved in certain types o f com puter d iv i
sion. The actual program required is a com bination s h ift register and subtractor.
Experiment 10:
Division
This experim ent demonstrates division on the M IN IV A C w ith your help. The program and
c irc u it diagram fo r a com bination s h ift register and subtractor which w ill allow us to divide are:
1 A /1 V
1B / l
1R /3K
1S/2G
1 T /3 J
1 U /2 N
1W /2K
1 X /3 H
1 Y /2H
1 Y /2 Y
1 Z/3 L
2 A /4 L
2 B /2
2C /3G
2F/3F
2 L /2 +
2R /3 T
2S/4F
2T /3 R
2 T /2 V
2 U /4 G
2 X /4 K
2 Y /6 S
2 Z /4 N
3A /5 L
3 B /3
3 C /4G
3F /4E
3 G /3 N
3 K /M 1 0
3 R /6G
3S/5G
3 T /6 N
3 U /5 N
3 V /3 Y
3 W /5 K
3 X /6 L
3 Y /3 +
3 Z /6 H
4A /4 R
4 B /4
4E /5F
4 H /4 N
4S /4 +
5 A /5 R
5 B /5 5 C /6 K
5F/6E
5 H /5 +
5 S /5 +
6 A /6 R
6B /6
6E /6
6 F /M 1 0
6 J /6K
6 S /6 +
O il
101
Place the dividend on the slide switches. The dividend is now displayed in the o u tp u t lights
as 011011.
The divisor is greater than the left-m ost three bits o f the dividend. Therefore, s h ift le ft one
bit.
W e now have:
110
110
101
Subtract the divisor from the dividend by entering the divisor on pushbuttons 1, 2 and 3. The
result w ill appear in the o u tp u t lights:
110
110
101
001
110
Place this result in the slide switches. Since the subtraction proceeded properly, we w ill add
1 to the low order b it and place this new result in the slide switches:
83
001
To go on to the next step, s h ift le ft one b it and again w rite the divisor below the left-m ost
three bits:
O il
110
101
The divisor is greater th an the le ft-m ost three bits. Therefore, we w ill s h ift le ft one bit:
111
100
101
W e can now subtract by entering the divisor in pushbuttons 1, 2 and 3 and entering the re
sult on the slide switches:
111
100
101
010
100
Since the subtraction proceeded properly, we w ill add 1 to the low order b it to yield:
010
101
The division has now been com pleted: There have been as m any shifts le ft as there were bits
to the rig h t o f the ve rtical line. The answer is to the rig h t o f the vertical line; the rem ainder is
to the le ft o f the ve rtical line:
rem ainder
01 0
answer
101
11011 H- 101 =
27
6.
CONVERSIONS
Since com puters w ork in the b in a ry system and we generally w ork in the decim al system,
an im p o rta n t fu n c tio n o f a com puter is conversion between the two systems. The fo llo w in g experi
ments give the program s fo r conversions between the bin a ry and decim al systems.
Experiment 11.
84
A card is fed through a card reader a t a constant rate o f speed. W hen the edge o f the card is
detected in the reader, the counter in the com puter comes on. W hen a punch in the card is de
tected, the counter goes o ff and a b inary num ber corresponding to the decim al num ber
punched on the card is displayed in the counter. This method depends on the tim e lapse be
tween the card edge and the punch.
It is possible to b uild a converter o f this type fo r the M IN IV A C , using the rotary switch to
actuate a counter. Since you are fa m ilia r w ith the rotary switch m echanism and a counter, you
w ill be able to b u ild such a device yourself.
The second method fo r conversion fro m decim al to binary is essentially a decoding scheme. In
this method, the com puter is program m ed to recognize a decim al num ber by the location o f the in
p u t pulse; a series o f d ire ct contacts then convert th is pulse to the appropriate binary number.
The follow in g program mechanizes such a method. Setting the rotary switch to any num ber
from 0 through 10 w ill cause the equivalent binary num ber to appear in the ou tp u t lights.
Program fo r Decimal to Binary Converter:
1 E /D 1 0
1 F /2 F
1G /3com
1 H /1 L
1 K /6 K
1 L /2 L
2 E /D 9
2 F /3 F
2 G /5 G
2 H /2 L
2 H /3 H
2 K /3 c o m
3 A /3 c o m
3 B /3
3 E /D 7
3 F /4 F
3 G /6 E
3 H /3 L
3 K /4 K
3 L /4 L
4 A /4 c o m
4 B /4
4 E /D 6
4 F /5 F
4 G /5 co m
4 H /4 L
4 H /5 H
4 K /4 c o m
5 A /5 c o m
5 B /5
5 E /D 5
5 F /6 F
5 G /6 G
5 H /5 L
5 K /4 c o m
5 L /6 L
6 A /6 c o m
6 B /6
6 E /D 3
6 F /6
6G /6co m
6 H /6 L
6 H /6 +
6 K /5 c o m
D 1/ 6com
D 2 /5 c o m
D 4 /4 c o m
D 8 /3 c o m
D 1 6 /M +
Conversion from binary to decim al is generally handled by a " tr e e " c irc u it (For an exam ple
o f a " tr e e " c irc u it, see the M in d Reading Program o f Book III.)
W ith a " tr e e " c irc u it, each com bination o f switches energizes one and only one te rm in a l of
the rotary switch. The rotary switch is program m ed so th a t when it turns to the energized te rm in a l
it w ill stop. Thus, setting a binary num ber in the slide switches w ill result in the same num ber
being displayed on the rotary switch.
Program fo r Binary to Decimal Converter:
1 C /4 R
1 F /2 F
1 G /6 H
1 H /5 U
1 J /5 H
1 K /6 L
1 L /5 W
1 N /5 L
2 C /5 R
2 F /3 F
2 G /3 H
2 H /4 U
2 J /4 H
2 K /3 L
2 L /4 W
2 N /4 L
3 C /6 R
3 C /4 C
3 F /4 F
3 G /D 1 5
3 J /D 1 4
3 K /D 1 1
3 N /D 1 0
3 U /4 V
3 V /3
3 W /5 V
4 C /5 C
4 F /5 F
4 G /D 1 3
4 J /D 1 2
4 K /D 9
4 N /D 8
4 S /4 +
4 S /5 S
5 C /6 C
5 F /6 F
5 G /D 3
5 J /D 2
5 K /D 1
5 N /D 0
5 S /6 S
6 F /6
6 G /D 7
6 J /D 6
6 K /D 5
6 N /D 4
6 X /D 1 7
6 Y /6 +
D 1 6 /D 1 9
D 1 8 /M
85
A PPENDIX
Automatic Shift Register
The s h ift register w hich was previously discussed can be ''a u to m a te d '' so th a t the com puter
w ill ca rry out the instruction: SHIFT LEFT ONE BIT whenever the rotary switch d ial is turned. A l
though this is a more convenient method o f sh ifting-as opposed to m a n u a lly operating the slide
switches you can see th a t it uses m any more contacts.
The program fo r the e ntire six -b it a u to m a tic s h ift register follows, w ith a c irc u it diagram fo r
the m iddle two bits:
86
3 A /3 X
3B /3
3 C /4 C
3 E /4N
3F/3G
3 F /4 K
3 G /3 X
3 H /4 H
3L /D 3
3 Y /4 Y
4 A /4 X
4 B /4
4C /5C
4E /5N
4F/4G
4 F /5 K
4 G /4 X
4 H /5 H
4L /D 4
4 Y /5 Y
5 A /5 X
5 B /5
5 C /6C
5 E /6 N
5F/5G
5F/6K
5 G /5 X
5 H /6 H
5 L /D 5
5 Y /6 Y
6 A /6 X
6 B /6
6 C /6
6E /D 7
6F/6G
6 G /6 X
6 H /6 +
6L /D 6
6Y /D 1 6
D 1 6 /M +
3J/D 3
3 K /D 6
3 N /D 2
4 A /5 R
4 A /4 K
4B /4
4 C /5 V
4 F/5 F
4G /5J
4 H /5 A
4J/5G
4L/4J
5 B /5 5 C /6R
5F/6F
5 H /5 +
5 S /5 W
5 U /5 Z
5 W /5 X
5 Y /6 V
6 A /6 C
6B /6
6C /6 V
6 F /6
6 H /5
6S /6 W
6 U /6 Z
6 W /6 X
6 Y /6 +
D 16/D 19
D 1 7 /M +
D 1 8 /M
87
CORPORATION