Title: CARDIAC A cardboard illustrative aid to computation
1CARDIACA cardboard illustrative aid to
computation
- illustrates the operation of a computer
- demos basic units of a simple computer
- input
- memory
- accumulator
- program
- output
2Simple Computer Block Diagram
output
input
program unit
memory
accumulator
3SIMCO
Instruction register
Program unit
Program counter
Control unit
4(No Transcript)
5The IR
The function of the instruction register is
to store each instruction word during the
time that particular instruction is being
executed. Once this instruction is executed, the
IR is fed a new (instruction) word.
6CARDIACs IR
7Program Counter (PC)
8CARDIACs PC
Program counter bug
Program counter bug
Noteit has Moved to Next instr
9Flow Chart
Start
receive numbers to be added
do addition
announce answer
stop
10Turn on computer
Start
Take 1st no., from input and store in memory
READ FIRST NUMBER
Take 2nd no., from input and store in memory
READ SECOND NUMBER
clear acc and transfer 1st no. to it from memory
PUT 1ST NUMBER IN ACCUMULATOR
transfer 2nd no. from mem to acc and add it to 1st
ADD SECOND NUMBER TO FIRST
STORE SUM IN MEMORY
transfer sum from acc to memory
transfer sum from mem to output and print
PRINT SUM
Stop
11017 read first number 018 read second
number 117 put first in accumulator 218 add
second to the first 619 store sum in
memory 519 print sum
memory location
computer word
operation code
12MEMORY
00
05
01
addresses
02
03
04
SIMCO has 100 addresses (00 through 99)
13CADIACs memory
14Converting SIMCO to THE Stored-Program Mode
Instruction Register
Program Counter
Program Unit
Control Unit
15input
control
memory
cell selector
cells
output
accumulator
op code
address
instruction register (IR)
program counter
16Program Example
017 read (input) first number 018 read second
number 117 put first number into the
accululator 218 add second number to the
first 619 store sum in memory location
19 519 print the sum
Memory locations
Operation codes(op codes)
17Op codes
cardiac Instruction Set
Op Code Abbr. Meaning ------- ----
----------------------------------- 0 INP
Input. Read from input device 1 CLA
Clear accumulator and add 2 ADD
Add to accumulator 3 TAC Test
accumulator contents 4 SFT Shift
accumulator contents 5 OUT Output.
Write to output device 6 STO Store
accumulator to memory cell 7 SUB
Subtract from accumulator 8 JMP Jump
to address 9 HRS Halt and Reset
18You can install a javaversion of cardiac
Requires Java language be installed first Your
instructor will demonstrate CARDIAC in
operation. http//sourceforge.net/project/showfil
es.php?group_id49761release_id91891 Note to
install type java jcinc from DOS command
window Play around with ittry to figure out how
to write and execute a program
19CARDIAC program
201st program instruction
Note program begins in memory Location nine
21Data wordsload here
22Output 8 9 17