Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Architecture

Similar presentations


Presentation on theme: "Computer Architecture"— Presentation transcript:

1 Computer Architecture
Part II-A: CPU Organization

2 The Central Processing Unit
The operating hub and heart of every computer system Composed of Control Unit Datapath Each component inside the CPU has a specific role in executing a command Communicates with other components of the system

3 Control Unit (CU) Regulates all activities inside the machine
Serves as “nerve center” that sends control signals to other units and senses their status Connected to all components in the CPU as well as main memory

4 How The CU Is Connected Registers ALU Control Unit Main Memory CPU

5 Inside the CPU: The Datapath
Registers ALU

6 Registers Components used for data storage (can be read from or written to) High speed memory locations used to store important information during CPU operations Two types Special General-purpose

7 Special Registers Registers used for specific purposes
Used heavily during execution of CPU instructions

8 General Purpose Registers
CPU registers used as “scratch pad” during execution of machine-level instructions Number varies between processors

9 Arithmetic Logic Unit (ALU)
Performs all mathematical and logical operations within the CPU Operands not in the CPU would have to be retrieved from main memory

10 CPU-Memory Coordination
Bus - a group of wires that connect separate components Types of bus: Control bus (control signals) Address bus (address information) Data bus (instruction/data)

11 CPU-Memory Coordination
The different busses facilitate communication between the CPU and main memory Actions of the two components are highly-synchronized to ensure efficient and timely execution of instructions

12 CPU Operations Instructions do not reside in the CPU, they have to be fetched from memory Each machine level instruction is broken down into a logical sequence of smaller steps

13 CPU Operations Instructions are carried out by performing one or more of the following functions in some pre-specified sequence Retrieving data from main memory Putting data to main memory Register data transfer ALU operation

14 How An Instruction is Processed
Instruction is retrieved from memory Analyze what the instruction is and how to execute it Operands/parameters (if any) are fetched from main memory Instruction is executed Results are stored (CPU or MM) Prepare for next instruction

15 Instruction Processing Example
Fetch instruction from memory Decode it (turns out to be an ADD) Get the two numbers to add from MM Perform the addition Where will it be stored? Prepare for next instruction

16 Processing Data in Clusters
Information is organized into groups of fixed-size data that can be stored and retrieved in a single, basic operation Each group of n bits is referred to as a word of information Access to each word requires a distinct name (location/address) Can also refer to a characteristic of other components (i.e. size of bus)

17 Word Length Size of a word specified in bits known as word length
Possible benefits of a large word length: Faster processing (more data and/or instructions can be fetched at a time) Greater numeric precision More powerful instructions (e.g. instructions can have more operands)

18 Machine Language Composed of
Instruction Data (instruction parameters) Instructions and data are represented by a stream of 1s and 0s Cumbersome to deal with when preparing programs; programmers use hexadecimal numbers In some computers, both instruction and data are stored in a single memory location

19 Assembly: An Improvement on Machine Language
Symbols, called mnemonics, are used to represent instructions Sample instruction Advantage: Easier recall of instructions Disadvantage: Need to convert mnemonics and hexadecimal numbers back to binary Instruction parameters add (105),(8) instruction There is a strong possibility that hexadecimal numbers in relation to binary numbers may have to be reviewed here.

20 How Programs Are Loaded Into Main Memory
Programs are loaded as binary numbers Assumptions: An instruction is represented by a 2-digit hexadecimal number (e.g. add by 1A, mov by A0) World length of instruction parameters: 3 hex digits (12 bits) Instruction Instruction parameters 100 101 102 103 104 105 A01040F2 1A105008 A00F2200 100

21 Executing Multiple Programs
Programs share processor time Time slicing Supported by modern CPUs


Download ppt "Computer Architecture"

Similar presentations


Ads by Google