120 likes | 121 Vues
An Example Architecture. A Paper Computer - Woody. Woody's characteristics Word size – 8 bits. One word. A Paper Computer - Woody. Main Memory. Woody's characteristics Word size – 8 bits Memory size – 32 words. A Paper Computer - Woody. Main Memory. Woody's characteristics
E N D
A Paper Computer - Woody • Woody's characteristics • Word size – 8 bits One word
A Paper Computer - Woody Main Memory • Woody's characteristics • Word size – 8 bits • Memory size – 32 words ...
A Paper Computer - Woody Main Memory • Woody's characteristics • Word size – 8 bits • Memory size – 32 words • Memory addresses are 0 through 31 How many bits does it take to represent an address? ...
A Paper Computer - Woody Main Memory • Woody's characteristics • Word size – 8 bits • Memory size – 32 words • Memory addresses are 0 through 31. 3110 = 111112 ...
A Paper Computer - Woody Main Memory • Woody's characteristics • Word size – 8 bits • Memory size – 32 words • Memory addresses are 0 through 31. 3110 = 111112 • Addresses can be represented with 5 bits 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 ... 11110 11111
A Paper Computer - Woody Main Memory • Woody's characteristics • Word size – 8 bits • Memory size – 32 words • Memory addresses are 0 through 31. 3110 = 111112 • Addresses can be represented with 5 bits • Woody uses signed magnitude representation for storing integers (no floating point) 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 ... 11110 11111
Woody's CPU Central Processing Unit • Instruction register – holds currently executing instruction from program • Program Counter Register – hold address of next instruction to execute • Data Register – holds the data used in the execution of an instruction Instruction Register Program Counter Register Data Register
Other Components • Input unit – device that allows the user to enter values – e.g. keyboard • Output unit – device that allows Woody to display a value (e.g. screen)
Machine Language • Instructions must be in binary form to execute • Woody can't store "CopyFrom" nor understand what to do with it • It is easiest if all instructions are the same size and fit into a single word • How big can our instructions be?