Download presentation
Presentation is loading. Please wait.
Published byPercival Owen Cain Modified over 9 years ago
1
An Example Architecture
2
A Paper Computer - Woody Woody's characteristics Word size – 8 bits One word
3
A Paper Computer - Woody Woody's characteristics Word size – 8 bits Memory size – 32 words... Main Memory
4
A Paper Computer - Woody 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?... Main Memory
5
A Paper Computer - Woody Woody's characteristics Word size – 8 bits Memory size – 32 words Memory addresses are 0 through 31. 31 10 = 11111 2... Main Memory
6
A Paper Computer - Woody Woody's characteristics Word size – 8 bits Memory size – 32 words Memory addresses are 0 through 31. 31 10 = 11111 2 Addresses can be represented with 5 bits... 00000 00001 00010 00011 00100 00101 00110 00111 01000 01001 11110 11111 Main Memory
7
A Paper Computer - Woody Woody's characteristics Word size – 8 bits Memory size – 32 words Memory addresses are 0 through 31. 31 10 = 11111 2 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 Main Memory
8
Woody's CPU 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 Central Processing Unit
9
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)
10
Woody's Assembly Language InstructionArgumentMeaning CopyFromLocationCopy from Location to the Data Register CopyToLocationCopy from Data Register to Location AddLocationAdd the number at Location to the DR SubtractLocationSubtract the number at Location from the DR ReadCopy from the Input Unit to the Data Register PrintCopy from the Data Register to the Output Unit IfNegGoToLocationIf the DR holds a negative value, go to Location StopStop execution of the program
11
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?
12
Woody's Machine Language Assembly Language Instruction Machine Language Instruction CopyFrom000 CopyTo001 Add010 Subtract011 Read100 Print101 IfNegGoTo110 Stop111
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.