Presentation is loading. Please wait.

Presentation is loading. Please wait.

CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator.

Similar presentations


Presentation on theme: "CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator."— Presentation transcript:

1 CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator –program –output

2 Simple Computer Block Diagram program unit output input memory accumulator

3 SIMCO Program unit Instruction register Program counter Control unit

4

5 The 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.

6 CARDIAC’s IR

7 Program Counter (PC)

8 CARDIAC’s PC Program counter “bug” Program counter “bug” Note:it has Moved to Next instr

9 Flow Chart Start stop receive numbers to be added do addition announce answer

10 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., from input and store in memory Take 2nd no., from input and store in memory clear acc and transfer 1st no. to it from memory transfer 2nd no. from mem to acc and add it to 1st transfer sum from acc to memory transfer sum from mem to output and print

11 017read first number 018read second number 117put first in accumulator 218add second to the first 619store sum in memory 519print sum memory location operation code computer word }

12 MEMORY 0005 01 02 03 04 addresses SIMCO has 100 addresses (00 through 99)

13 CADIAC’s memory

14 Converting SIMCO to THE Stored-Program Mode Program Unit = Instruction Register Program Counter Control Unit + +

15 input output accumulator op codeaddress controlmemory cell selectorcells program counter instruction register (IR)

16 Program Example 017read (input) first number 018read second number 117put first number into the accululator 218add second number to the first 619store sum in memory location 19 519print the sum Memory locations Operation codes(op codes)

17 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

18 You can install a java version of cardiac Requires Java language be installed first Your 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

19 CARDIAC program:

20 1st program instruction Note: program begins in memory Location nine

21 Data “words”load here

22 Output 8 + 9 = 17


Download ppt "CARDIAC A cardboard illustrative aid to computation illustrates the operation of a computer demos basic units of a simple computer –input –memory –accumulator."

Similar presentations


Ads by Google