Presentation is loading. Please wait.

Presentation is loading. Please wait.

The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP 2620 1.

Similar presentations

Presentation on theme: "The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP 2620 1."— Presentation transcript:

1 The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP

2 Basic Components We need two things to get a task done on a computer: 1.A computer program to do the task 2.The computer itself to do the task A computer program is the set of instructions that carries out the work The instruction is the smallest piece of work the computer can do – it cannot carry out only a part of an instruction! Dr. James Money COMP

3 Basic Components John von Neumann proposed the model we use for computers in 1946 There are five parts: ▫Memory ▫Processing Unit ▫Input ▫Output ▫Control Unit Together, these are called the von Neumann model Dr. James Money COMP

4 Basic Components Dr. James Money COMP

5 Memory Before, we constructed a simple 2 2 by 3 bit memory using gates and latches However, most memory today is 8 bits We might have something on the order of 2 28 memory locations Call say the memory has an address space of 2 28 and an addressability of 8 bits Dr. James Money COMP

6 Memory We usually refer to the memory as 256 megabyte where “256 mega” refers to the 2 28 locations The “byte” refers to the fact the memory locations are 8 bit By definition, byte, is 8 bits Dr. James Money COMP

7 Memory Common prefixes: ▫Kilo= 1024 bytes =2 10 bytes ▫Mega = 1024 Kilo ▫Giga = 1024 Mega How many bytes in 2GB of memory? Dr. James Money COMP

8 Memory We recall that if we have 1 bit, there are two possible values If there are two bits, we have 4 = 2 2 values So, for eight bits, there are 2 8 =256 values In general, if we have k bits, then there are 2 k possible values Dr. James Money COMP

9 Memory Thus, if we have 2 28 memory locations, we need 28 bits to store an address On the LC-3 in chapter 5, we will see that the computer we use has a memory address space of 2 16 The addressability on the LC-3 is 16 bits Dr. James Money COMP

10 Memory How to we read or write to memory? We need to first specify the location we want to access On the LC-3, we place the memory location in the memory address register(MAR) Then, we can read or write that part of memory The memory data register(MDR) contains the value that is read or the value to write Dr. James Money COMP

11 Memory How to write: 1.Place the address we want to write to in the MAR 2.Place the value we wish to write in the MDR 3.We issue the memory command with the Write Enable signal 4.The value in MDR is written to address MAR Dr. James Money COMP

12 Memory How to read: 1.Place the address to read in the MAR 2.Issue the memory command without Write Enable 3.Read the value from MDR Dr. James Money COMP

13 Memory Let us re-emphasize memory has two properties: ▫The address of the memory location ▫The value stored in that memory location This is like post office boxes: ▫There are numbers on the boxes ▫Each box has mail in it Dr. James Money COMP

14 Memory Dr. James Money COMP

15 Processing Unit The processing of information is carried out by the processing unit The processing unit in modern computer can have many complex parts each dedicated to a particular function ▫Divide ▫Multiply ▫square root ▫… Dr. James Money COMP

16 Processing Unit The simplest form is the Arithmetic and Logic Unit, denoted ALU It performs: ▫Basic arithmetic – add, subtract ▫Basic logic – bitwise AND, OR, and NOT The LC-3 has an ALU which can perform ADD, AND, and NOT (Side note, how to we do OR??) Dr. James Money COMP

17 Processing Unit The size processed by the ALU is referred to as the word length and each element is referred to as a word On the LC-3, the ALU works in 16 bit quantities Thus, the word length is 16 bits This differs depending on the ISA On x86 it can be 32 or 64 bits depending on the mode of operation It can be as little as 8 bits Dr. James Money COMP

18 Processing Unit On most processing units, there is some form of temporary storage This storage is typically “within” the ALU for speed Example: Compute (a+b)·c ▫First compute a+b and store ▫Then, take that value and multiply by c Dr. James Money COMP

19 Processing Unit Why not just use memory? ▫Speed is slow compared to the operations Memory access is typically many times slower than the addition and multiply operation Thus, by using local storage in the ALU, we avoid the one extra memory hit Most commonly, this storage is extra registers The LC-3 has eight registers: R0,R1,…,R7 with 16 its each The SPARC-V9 has 32(R0,…R31) with 64 bits Dr. James Money COMP

20 Input and Output We need to get the information into the computer somehow ▫Input provides this capability Then we must do something with the data ▫Output allows us to do that Together, they are generically called peripherals because they are like accessories for the computer However, they are no less important Dr. James Money COMP

21 Input and Output The LC-3 has two such devices ▫Keyboard for input ▫Monitor for output Other systems have many more ▫Mouse ▫LED display ▫Scanner ▫Printer ▫Floppy disk ▫Punch cards Dr. James Money COMP

22 Control Unit The control unit handles all the other units The control unit keeps track of the running program in memory There are two main registers for the control unit: ▫Instruction register – contains the instruction that is currently processing ▫Program Counter(PC) – has the address of the next instruction to execute Dr. James Money COMP

Download ppt "The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP 2620 1."

Similar presentations

Ads by Google