Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 26

1.

COMPUTER
ORGANIZATION
Author : Pham Ngoc Ha – FU HL- SE
Date : Aug-2021
Content

 1.1 Turing model


 1.2 Von Neumann model
 1.3 Computer generations
 1.4 Subsystems and the role of subsystems
 1.5 Central Processing Unit
 1.6 Memory: main memory and cache memory
 1.7 Input/Output subsystems
 1.8 Different architectures

2
Objectives

After studying this chapter, the student should be able to:


 Define the Turing model of a computer.
 Define the von Neumann model of a computer.
 Describe the three components of a computer: hardware, data, and software.
 List topics related to computer hardware.
 List topics related to data.
 List topics related to software.
 Give a short history of computers.

3
4 - SUBSYSTEMS AND THE ROLE OF
SUBSYSTEMS

4
INTRODUCTION

 We can divide the parts that make up a computer into three broad categories or
subsystem: the central processing unit (CPU) , the main memory, and the
input/output subsystem.

Figure 1.18 Computer hardware (subsystems)


5
5 - CENTRAL PROCESSING UNIT

6
Introduction

 The central processing unit (CPU) performs operations on data.


 In most architectures It has three parts: an arithmetic logic unit (ALU), a control
unit, and a set of registers

Figure 1.19 Central processing unit (CPU)


7
The arithmetic logic unit (ALU)

 The arithmetic logic unit (ALU) performs


logic, shift, and arithmetic operations on
data.

 Logic operations: NOT, AND, OR, and XOR.

 Shift operations: logic shift operations and


arithmetic shift operations Figure 1.20 Construction of an ALU

 Arithmetic operations: arithmetic operations


on integers and reals.

8
Registers

 Registers are fast stand-alone


storage locations that hold data
temporarily. Multiple registers are
needed to facilitate the operation of
the CPU.

Figure 1.21 Construction of an Register

9
Registers
- Computers use dozens of registers inside the CPU to speed up their operations,

Data registers because complex operations are done using hardware instead of software.
- These require several registers to hold the intermediate results

- Computers store not only data, but also programs, in their memory.
Instruction - The CPU is responsible for fetching instructions one by one from memory, storing
registers
them in the instruction register ,decoding them, and executing them.

- Another common register in the CPU is the program counter (PC in Figure 5.2).
- The program counter keeps track of the instruction currently being executed.
Program counter
- After execution of the instruction, the counter is incremented to point to the address of
the next instruction in memory

10
The control unit

 The control unit controls the operation of each subsystem. Controlling is achieved
through signals sent from the control unit to other subsystems.

Figure 1.22 Using an control unit

11
CPU

https://www.youtube.com/watch?v=QPHcpjv-WJo&ab_channel=88Studio

12
6-MAIN MEMORY

13
Introduction

 Main memory consists of a collection of storage locations, each with a unique


identifier, called an address.

 Data is transferred to and from memory in groups of bits called words.

Figure 1.23 Main memory 14


Address space

 To access a word in memory requires an identifier. Although programmers use a name to

identify a word (or a collection of words), at the hardware level 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.

15
Table 6.1 Memory units
Addresses as bit patterns

 Because computers operate by storing numbers as bit patterns, a memory


address is also represented as a bit pattern. So if a computer has 64 kilobytes
(2^6) of memory with a word size of 1 byte, we need a bit pattern of 16 bits
to define an address.
 In general, if a computer has N words of memory, we need an unsigned
integer of size log2 N bits to refer to each memory location

16
Examples

 Example 5.1  Example 5.2

 A computer has 32 MB (megabytes) of  A computer has 128 MB of memory. Each word


memory. How many bits are needed to in this computer is eight bytes. How many bits
address any single byte in memory? are needed to address any single word in
memory?
 Solution: The memory address space is 32
MB, or 2^25= (2^5 × 2^20). This means
that we need log2 225, or 25 bits, to
address each byte.

17
Memory types

Two main types of memory exist: RAM and ROM.


 Random access memory (RAM)

 Read-only memory (ROM)

18
.
RAM

Random access memory (RAM)


- RAM can be read from and written to.
- The CPU can write something to RAM and later overwrite
it.
- Characteristic of RAM is that it is volatile. All information
in RAM is erased if you turn off the computer or if there is
a power outage

Static RAM (SRAM) Dynamic RAM (DRAM)


- Technology uses traditional flip-flop gates to hold data. - Technology uses capacitors, electrical devices that can store
- The gates hold their state (0 or 1), which means that data is energy, for data storage.
stored as long as the power is on and there is no need to - If a capacitor is charged, the state is 1; if it is discharged, the
refresh memory locations. state is 0. Because a capacitor loses some of its charge with
- SRAM is fast but expensive time, DRAM memory cells need to be refreshed periodically.
- DRAMs are slow but inexpensive.

19
ROM

- ROM are written by the manufacturer, and the CPU can read from, but not write to, ROM.
- Its advantage is that it is nonvolatile—its contents are not lost if you turn off the computer.
- Normally, it is used for programs or data that must not be erased or changed even if you turn off the computer.

PROM- programmable read-only EPROM- erasable programmable EEPROM- electrically erasable


memory read-only memory. programmable read-only
- This type of memory is blank - It can be programmed by the user, memory (EEPROM).
when the computer is shipped. but can also be erased with a special - EEPROM can be programmed
- When programs are stored, it device that applies ultraviolet light. and erased using electronic
behaves like ROM and - To erase EPROM memory requires impulses without being removed
cannot be overwritten. physical removal and reinstallation from the computer.
- This allows a computer user to of the EPROM.
store specific programs in PROM.

20
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.

Figure 1.24 Hierarchical levels of memory. 21


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.

 When the 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 main memory and copies a block of memory
starting with the desired word. This block replaces the previous
contents of cache memory. Figure 1.25 cache memory.
3. The CPU accesses the cache and copies the word
22
Question???

1. The _______ is a computer subsystem that


performs operations on data.
a. CPU
b. memory
c. I/O hardware
d. bus subsystem

23
Question???

2. A register in a CPU can hold _______.

a. only data

b. only instructions

c. only program counter values

d. data, instruction, or program counter values

24
Question???

3 _______ is a memory type with traditional flip-flop gates to hold data.

a. SRAM

b. DRAM

c. ROM

d. CROM

25
Question???

4._______ is a type of memory in which the user, not the


manufacturer, stores programs that cannot be overwritten.
a. ROM
b. PROM
c. EPROM
d. EEPROM

26

You might also like