23
COMPURT ORGANAZTION CHAPTER 5

COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Embed Size (px)

Citation preview

Page 1: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

COMPURT ORGANAZTIONCHAPTER 5

Page 2: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Computer Organization

We can divide the parts that make up a computer into 3 subsystems :

1. Central processing unit (CPU).2. Main Memory.3. Input / output subsystem.

Page 3: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Computer System Component

Computer System

Central processing Unit (CPU)

MemoryInput\output

systems

Page 4: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

5.1 CENTRAL PROCESSING UNIT (CPU)

Page 5: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Central processing unit (cpu)

Central processing Unit (CPU)

Arithmetic Logic Unit

(ALU)

Logic Operations

NOT, AND, OR, XOR

Shift Operations

Logical shift operations, arithmetic shift operations

Arithmetic Operations

Registers

Data RegistersR1,R2….Rn

Instruction Registers

Program Counter

Control Unit

Page 6: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Computer System Component

Computer System

Central processing Unit (CPU)

MemoryInput\output

systems

Page 7: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

5.2 MAIN MEMORY

Page 8: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Main Memory

Main memory Consists of collection of storage locations, each with a unique identifier called an address

Page 9: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Main Memory

Data is transferred to and from memory in groups of bits called words. A word can be a group of 8 bits, 16 bits, 32 bits or 64 bits (and growing). If the word is 8 bits, it is referred to as a byte

16-bit word is referred to as a 2-byte word

32-bit word is referred to as a 4-byte word

Page 10: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Address space

each word is identified by an address. The total number of uniquely identifiable locations in memory is called the address space. For example, a memory with 64 kilobytes and a word size of 1 byte has an address space that ranges from 0 to 65,535.

Page 11: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Address space

Note: this is an approximation of number of bytes in the power of 10, but the actual number of bytes is in power of 2 to facilitate addressing.

Page 12: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

• Computer with 64 kilobytes (216) of memory and a word size of 1 byte

To define an address

• We need a bit pattern of 16 bits

216 =65535• First memory address:

Address 0: 0000000000000000

• Last memory address:Address 65535:1111111111111111N words of memory

needs log2 bits for addressing

Address space Because computers store numbers as bit

patterns, memory address also represented as a bit pattern.

Memory addresses are defined using unsigned

binary integers.

Page 13: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Address space - Example 5.1

A computer has 32 MB (megabytes) of memory. How many bits are needed to address any single byte in memory?

Answer:The memory address space is 32 MB, or

225 (25 × 220). This means that we need log2 225, or 25 bits, to address each byte.

Page 14: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Address space - Example 5.2

A computer has 128 MB of memory. Each word in this computer is eight bytes. How many bits are needed to address any single word in memory?

Answer:The memory address space is 128 MB, which means 227. However, each word is eight (23)

bytes, which means that we have 224 words. This means that we need log2 224, or 24 bits, to address each word.

Page 15: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Memory types

Memory types

RAM

SRAMStatic RAM

DRAMDynamic RAM

ROM

PROMProgrammable read-only

memory

EPROMErasabl

e progra

mmable read-only

memory

EEPROMElectric

ally erasabl

e progra

mmable read-only

memory

Page 16: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Memory hierarchy

Computer users need a lot of memory, especially memory that is very fast and inexpensive. This demand is not always possible to satisfy—very fast memory is usually not cheap. A compromise needs to be made. The solution is hierarchical levels of memory.

Page 17: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Cache memory

Cache memory is faster than main memory, but slower than the CPU and its registers. Cache memory, which is normally small in size, is placed between the CPU and main memory.

Page 18: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Cache memory It contains a copy of a portion of main

memory. When CPU needs to access a word in main memory, it follows this procedure:

1

•The CPU checks the cache.

2

•If the word is there, it copies the word: if not, the CPU accesses the main memory and copies a block of memory starting with the desired word. This block replaces the previous content of cache memory.

3

•The CPU access the cache and copies the word.

Page 19: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

5.2 INPUT / OUTPUT SUBSYSTEMS

Page 20: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Input / Output subsystems

This subsystem allows a computer to communicate with the outside world and to store programs and data even when the power is off. Input/output devices can be divided into two broad categories:

Non-storage devices: they cannot store information.

Storage devices: they can store large amounts of information to be retrieved at a later time. They are cheaper than main memory, and their contents are nonvolatile (not erased when the power is turned off).

Page 21: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Input / Output subsystems

Input / Output subsystems

Non-storage devicesKeybo

ard and

monitor

Printer

Storage devices

Magnetic

Magnetic disk

Magnetic tapes

Optical

CD ROM CD-R CD- RW DV

D

Page 22: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Magnetic Storage devices

Magnetic disk:

Page 23: COMPURT ORGANAZTION CHAPTER 5. Computer Organization We can divide the parts that make up a computer into 3 subsystems : 1. Central processing unit (CPU)

Magnetic Storage devices

Magnetic tape