Date post: | 10-Apr-2018 |
Category: |
Documents |
Upload: | abrar-abdulaziz |
View: | 216 times |
Download: | 0 times |
of 23
8/8/2019 Ch 05 Rev After Adding
1/23
5.1
55
ComputerComputerOrganizationOrganization
First PartFirst Part
Foundations of Computer Science Cengage Learning
8/8/2019 Ch 05 Rev After Adding
2/23
5.2
List the three subsystems of a computer.
Describe the role of the central processing unit (CPU).
Describe the fetch-decode-execute phases of a cycle.
Describe the main memory and its addressing space.
Define the input/output subsystem.
Understand the interconnection of subsystems.
Describe different methods of input/output addressing.
Distinguish the two major trends in the design of computers.
Understand how computer throughput can be improved
using pipelining and parallel processing.
ObjectivesObjectives
After studying this chapter, the student should be ableAfter studying this chapter, the student should be able
to:to:
8/8/2019 Ch 05 Rev After Adding
3/23
5.3
WeWe cancan dividedivide thethe partsparts thatthat makemake upup aa computercomputer intointo
threethree broad broad categoriescategories oror subsystemsubsystem:: thethe centralcentral
processingprocessing unitunit (CPU)(CPU),, thethe mainmain memorymemory andand thetheinput/outputinput/output subsystemsubsystem..
Figure 5.1 Computer hardware (subsystems)
8/8/2019 Ch 05 Rev After Adding
4/23
5.4
55--1 CENTRAL PROCESSING UNIT1 CENTRAL PROCESSING UNIT
TheThe centralcentral processingprocessing unitunit (CPU)(CPU) performsperforms
operationsoperations onon datadata.. InIn mostmost architecturesarchitectures itit hashas threethree
partsparts:: anan arithmeticarithmetic logiclogic unitunit (ALU)(ALU),, aa controlcontrol unitunit
andand aa setset ofof registersregisters-- fastfast storagestorage locationslocations (Figure5.2)..
8/8/2019 Ch 05 Rev After Adding
5/23
5.5
Figure 5.2 Central processing unit (CPU)
8/8/2019 Ch 05 Rev After Adding
6/23
5.6
5.1.1 -The arithmetic logic unit (ALU)
The arithmetic logic unit (ALU) performs logic, shift and
arithmetic operations on data as discussed in Chapter 4.
8/8/2019 Ch 05 Rev After Adding
7/23
5.7
5.1.2- Registers
Registers are fast stand-alone storage locations that hold data
temporarily. Multiple registers are needed to facilitate theoperation of the CPU. Some of these registers are shown in
Figure 5.2.
Data registers
Instruction register
Program counter
8/8/2019 Ch 05 Rev After Adding
8/23
5.8
Data registers 1- to speed up the CPUs operations2- required to hold the intermediateresults
3- named R1 to Rn
Instruction registers Computers store not only data, but alsoprograms. The CPU :1) Fetch instructions one by one from memory2) Store them in IR
3) Decode them4) Execute them
Program counter 1) Keeps track of the instruction currently being
executed2) After execution, it is incremented to point tothe address of the next instruction inmemory
8/8/2019 Ch 05 Rev After Adding
9/23
5.9
5.1.3- The control unit
The third part of any CPU is 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.
8/8/2019 Ch 05 Rev After Adding
10/23
5.10
55--2 MAIN MEMORY2 MAIN MEMORY
MainMain memorymemory isis thethe secondsecond majormajor subsystemsubsystem inin aa
computercomputer (Figure(Figure 55..33)).. ItIt consistsconsists ofof aa collectioncollection ofof
storagestorage locations,locations, eacheach withwith aa uniqueunique identifier,identifier, calledcalled
anan addressaddress.. DataData isis transferredtransferred toto andand fromfrom memorymemory iningroupsgroups ofof bitsbits calledcalled wordswords.. AA wordword cancan bebe aa groupgroup ofof 88
bits,bits, 1616 bits,bits, 3232 bitsbits oror 6464 bitsbits (and(and growing)growing).. IfIf thethe
wordword isis 88 bits,bits, itit isis referredreferred toto asas aa bytebyte.. TheThe termterm
bytebyte isis soso commoncommon inin computercomputer sciencescience thatthatsometimessometimes aa 1616--bitbit wordword isis referredreferred toto asas aa 22--bytebyte word,word,
oror aa 3232--bitbit wordword isis referredreferred toto asas aa 44--bytebyte wordword..
8/8/2019 Ch 05 Rev After Adding
11/23
5.11Figure 5.3 Main memory
8/8/2019 Ch 05 Rev After Adding
12/23
5.12
- - Address space
To access a word in memory requires an identifier. Althoughprogrammers 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. Forexample, a memory with 64 kilobytes and a word size of 1
byte has an address space that ranges from 0 to 65,535.
8/8/2019 Ch 05 Rev After Adding
13/23
5.13
Memory addresses are defined using unsigned
binary integers.
i
If a computer has N words of memory, we need an unsigned integer
of size Log2 N bits to refer to each memory locations.
8/8/2019 Ch 05 Rev After Adding
14/23
5.14
Example 5.1
AA computercomputer hashas 3232 MBMB (megabytes)(megabytes) ofof memorymemory.. HowHow manymany bitsbits
areare neededneeded toto addressaddress anyany singlesingle bytebyte inin memory?memory?SolutionSolution
TheThe memorymemory addressaddress spacespace isis 3232 MB,MB, oror 222525 ((2255 222020)).. ThisThis
meansmeans thatthat wewe needneed loglog22 222525,, oror2525 bitsbits,, toto addressaddress eacheach bytebyte..
Example 5.2
AA computercomputer hashas 128128 MBMB ofof memorymemory.. EachEach wordword inin thisthis computercomputer
isis eighteight bytesbytes.. HowHow manymany bitsbits areare neededneeded toto addressaddress anyany singlesingle
wordword inin memory?memory?
SolutionSolution
TheThe memorymemory addressaddress spacespace isis 128128 MB,MB, whichwhich meansmeans 222727..
However,However, eacheach wordword isis eighteight ((2233)) bytes,bytes, whichwhich meansmeans thatthat wewe
havehave 222424 wordswords.. ThisThis meansmeans thatthat wewe needneed loglog22 222424,, oror2424 bitsbits,, toto
addressaddress eacheach wordword..
8/8/2019 Ch 05 Rev After Adding
15/23
5.15
Random access memory (RAM)
Makes up most of the main memory.
Data item can be accessed randomly using the address .
Can be read from and written to. It is volatile.
Read-only memory (ROM)
Written by the manufacturer. Can read from but not write to.
It is nonvolatile
EX. Holding the boot program
Two main types of memory exist: RAM and ROM.
- - Memory types
8/8/2019 Ch 05 Rev After Adding
16/23
5.16
- - Memory types
Two main types of memory exist: RAM and ROM.
Random access memory (RAM)
Static RAM (SRAM)
Use flip-flop gates to hold data
Dynamic RAM (DRAM)Uses capacitors for data storage
Read-only memory (ROM)
Programmable read-only memory (PROM). Erasable programmable read-only memory (EPROM).
Electrically erasable programmable read-only memory (EEPROM).
8/8/2019 Ch 05 Rev After Adding
17/23
5.17
Memory hierarchy
Computer users need a lot of memory, especially memory
that is very fast and inexpensive. This demand is not always
possible to satisfyvery fast memory is usually not cheap. A
compromise needs to be made. The solution is hierarchical
levels of memory.
Figure 5.4 Memory hierarchy
8/8/2019 Ch 05 Rev After Adding
18/23
5.18
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
(Figure 5.5).
Figure 5.5 Cache memory
Cache memory at any time contains a copy of a portion of main memory.
8/8/2019 Ch 05 Rev After Adding
19/23
5.19
55--3 INPUT/OUTPUT SUBSYSTEM3 INPUT/OUTPUT SUBSYSTEM
TheThe thirdthird majormajor subsystemsubsystem inin aa computercomputer isis thethe
collectioncollection ofof devicesdevices referredreferred toto asas thethe input/outputinput/output
(I/O)(I/O) subsystemsubsystem.. ThisThis subsystemsubsystem allowsallows aa computercomputer toto
communicatecommunicate withwith thethe outsideoutside worldworld andand toto storestoreprograms programs andand datadata eveneven whenwhen thethe power power isis offoff..
Input/outputInput/output devicesdevices cancan be be divideddivided intointo twotwo broadbroad
categoriescategories:: nonnon--storagestorage andand storagestorage devicesdevices..
8/8/2019 Ch 05 Rev After Adding
20/23
8/8/2019 Ch 05 Rev After Adding
21/23
5.21
Storage devices
Storage devices, although classified as I/O devices, can store
large amounts of information to be retrieved at a later time.
They are cheaper than main memory, and their contents are
nonvolatilethat is, not erased when the power is turned off.
They are sometimes referred to as auxiliary storage devices.
We can categorize them as eithermagnetic oroptical.
8/8/2019 Ch 05 Rev After Adding
22/23
5.22
Magnetic storage devices:
1- Magnetic disks.
Figure 5.6 A magnetic disk
8/8/2019 Ch 05 Rev After Adding
23/23
5.23
Figure 5.7 A magnetic tape
Magnetic storage devices:
2- Magnetic tape.