Docsity

Basic Computer Organization - High Performance Computing - Lecture Slides, Slides of Computer Science

Partial preview of the text

Download Basic Computer Organization - High Performance Computing - Lecture Slides and more Slides Computer Science in PDF only on Docsity!

High Performance Computing

Lecture 3

2

Basic Computer Organization

 Main parts of a computer system:

 Processor: Executes programs

 Main memory: Holds program and data

 I/O devices: For communication with outside

 Machine instruction: Description of primitive

operation that machine hardware is able to

execute

 Instruction Set: Complete specification of all

the kinds of instructions that the processor

hardware was built to execute

e.g. ADD these two integers

4

Inside the Processor…

 Control hardware: Hardware to manage

instruction execution

 ALU: Arithmetic and Logical Unit (hardware

to do arithmetic, logical operations)

 Registers: small units of memory to hold

data/instructions temporarily during

execution

5

Aside: About Memory

 What is memory?

 Something that can remember things

 There are different kinds of memory in a

computer system

 Some remember by the state an electrical circuit

is in

 Others remember by the amount of electrical

charge stored in a capacitor

 Yet others remember by magnetic or optical

properties

 They can vary substantially in their speed

and capacity

e.g., DRAM – “Memory”

e.g., SRAM

e.g., Hard disk drive/Mag Tape, VCD/DVD

7

Special Purpose Registers

 These are used for specific purposes by the

control hardware

 Program Counter (PC): used to remember

the location in memory of the instruction

currently being executed

 Instruction Register (IR): used to remember

that instruction

 Processor Status Register: used to

remembers status information about current

state of processor, e.g., whether an

arithmetic overflow has occurred

8

General Purpose Registers

 Available for use by the programmer

 Useful for remembering frequently used data

 Why is it a good idea to do this?

10

General Purpose Registers.

 Available for use by the programmer

 Useful for remembering frequently used data

 A typical processor today has 32 GPRs, say

R0, R1,…, R

 The operands to an instruction could come

either from registers or from main memory

11

Basic Computer Organization

Cache Main Memory I/O Bus I/O I/O MMU ALU Registers

CPU

Control General Purpose Registers  Integer Registers  FP Registers Special Purpose Registers  PC  IR  Status register

13

Terms: Byte ordering

Q: Value of the integer (4 byte data) at Address 400?

A: There are a few possibilities!

Depending on how significant the bytes are

Data 1A C8 B2 46 F0 8C 1E DF Byte Address^400 In Hexadecimal (0,1,2,…,A,B,C,D,E,F) 401 403 405 407

14

Byte ordering

Value of the integer (4 byte data) at Address 400?

Possibility 1: `1A’ is the most significant byte 1 A C 8 B 2 4 6 Data 1A C8 B2 46 F0 8C 1E DF Byte Address^400 0001 1010 1100 1000 1011 0010 0100 0110 Unsigned int value: 449,360,

  1 0

n i i

x i

This convention is called Big-endian byte ordering

16

Byte ordering..

Value of the integer (4 byte data) at Address 400?

Big-endian ordering Little-endian ordering

Some machines are built to use big-endian byte

ordering and others are designed to use little-

endian byte ordering

This can be relevant to the programmer

Data 1A C8 B2 46 F0 8C 1E DF Byte Address^400