CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos...
-
Upload
john-thomas -
Category
Documents
-
view
215 -
download
1
Transcript of CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos...
![Page 1: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/1.jpg)
CARDIACA cardboard illustrative aid to
computation
• illustrates the operation of a computer
• demos basic units of a simple computer– input
– memory
– accumulator
– program
– output
![Page 2: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/2.jpg)
Simple Computer Block Diagram
programunit
output
input
memory
accumulator
![Page 3: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/3.jpg)
SIMCO
Programunit
Instructionregister
Programcounter
Control unit
![Page 4: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/4.jpg)
![Page 5: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/5.jpg)
The IR
The function of the instruction register is tostore each instruction word during the timethat particular instruction is being executed.
Once this instruction is executed, the IR is feda new (instruction) word.
![Page 6: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/6.jpg)
CARDIAC’s IR
![Page 7: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/7.jpg)
Program Counter (PC)
![Page 8: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/8.jpg)
CARDIAC’s PC
Program counter“bug”
Program counter“bug”
Note:it hasMoved toNext instr
![Page 9: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/9.jpg)
Flow ChartStart
stop
receive numbers to be added
do addition
announce answer
![Page 10: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/10.jpg)
Start
READ FIRST NUMBER
READ SECOND NUMBER
PUT 1ST NUMBER IN ACCUMULATOR
ADD SECOND NUMBER TO FIRST
STORE SUM IN MEMORY
PRINT SUM
Stop
Turn on computer
Take 1st no., frominput and store inmemory
Take 2nd no., frominput and store inmemory
clear acc and transfer 1st no.to it from memory
transfer 2nd no.from mem to accand add it to 1st
transfer sum from acc to memory
transfer sum frommem to outputand print
![Page 11: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/11.jpg)
017 read first number018 read second number117 put first in accumulator218 add second to the first619 store sum in memory519 print sum
memory location
operation codecomputerword}
![Page 12: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/12.jpg)
MEMORY
00 05
01
02
03
04
addresses
SIMCO has 100 addresses (00 through 99)
![Page 13: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/13.jpg)
CADIAC’s memory
![Page 14: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/14.jpg)
Converting SIMCO to THE Stored-Program Mode
Program Unit =
Instruction Register
Program Counter
Control Unit
+
+
![Page 15: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/15.jpg)
input
output
accumulator
op code address
control memory
cell selector cells
program counter
instruction register(IR)
![Page 16: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/16.jpg)
Program Example
017 read (input) first number018 read second number117 put first number into the accululator218 add second number to the first619 store sum in memory location 19519 print the sum
Memory locations
Operation codes(op codes)
![Page 17: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/17.jpg)
Op 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
![Page 18: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/18.jpg)
You can install a javaversion of cardiac
Requires Java language be installed firstYour instructor will demonstrate CARDIAC in operation.
http://sourceforge.net/project/showfiles.php?group_id=49761&release_id=91891
Note: to install type java jcinc from DOS command window
Play around with it…try to figure out how to write and execute a program
![Page 19: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/19.jpg)
CARDIAC program:
![Page 20: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/20.jpg)
1st program instruction
Note: program begins in memoryLocation nine
![Page 21: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/21.jpg)
Data “words”load here
![Page 22: CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.](https://reader030.fdocuments.in/reader030/viewer/2022032723/56649d145503460f949e9521/html5/thumbnails/22.jpg)
Output 8 + 9 = 17