Unit 3
Computer architecture
1
An advertisement of a computer
2
Hardware
Open a case
3
Computer Architecture
• General Model of a Computer
• The Central Processing Unit (CPU)
• Memory
• Input-Output Devices
• Buses
4
General Model of a Computer
• Computer Operations
• Architecture of Computer Systems
• The Fetch – Execute Cycle
5
Computer Operations
A computer is a programmable electronic device
that can store, retrieve and process data
• Data Processing
• Data Storage
• Data Retrieve
• Programmable
6
Parts that Build Up A System Unit
• Casing or cover • Sound card
• Power Supply • Floppy disk drive
• Motherboard • Hard disk drive
• Microprocessor • CD-ROM drive
• Memory • MODEM
• Video Card
Casing or cover
• The box or outer shell that
houses most of the computer, it
is usually one of the most
overlooked parts of the PC.
• Protects the computer circuits,
cooling and system
organization.
Power Supply
• Responsible for powering every device in your
computer.
• Parts of a Power supply:
• Disk drive connectors
• Motherboard connector
• Power supply fan
• Power switch
• Input voltage selector
• Cover
• Power plugs receptacle
Motherboard
• The physical arrangement in a computer that contains
the computer’s basic circuitry and components.
• Components are:
• Microprocessor
• (Optional) Coprocessors
• Memory
• Basic Input/Output System (BIOS)
• Expansion Slot
• Interconnecting circuitry
12
Hardware
power supply
processor
ports memory
video card sound card
13
Expansion Slots
• Graphic cards
• Sound cards
• Modem cards
• Network interface cards/network adapter
The von Neuman Architecture
15
Computer systems
INPUT CENTRAL PROCESSING UNIT OUTPUT
THIẾT BỊ VÀO BỘ XỬ LÝ TRUNG TÂM THIẾT BỊ RA
STORAGE
THIẾT BỊ LƯU TRỮ
16
Computer Organization
o CPU - central processing unit
o Where decisions are made, computations are performed,
and input/output requests are delegated
o Memory
o Stores information being processed by the CPU: data and
instructions
o Input devices
o Moves data from outside word into the computer
o Output devices
o Moves results from inside the computer to the outside world
17
The Central Processing Unit (CPU)
Brains of the computer
Arithmetic calculations are performed using the
Arithmetic/Logical Unit or ALU
Control unit decodes and executes instructions
Arithmetic operations are performed using binary
number system
CPU is contained on one (or a small number of)
integrated circuits called microprocessors
18
Basic Model of
the Central Processing Unit (CPU)
19
Arithmetic Logic Units (ALU)
• Performs the arithmetic and logical
operations on the binary data .
• Most modern ALU have small amount of
registers
20
Control Unit
• In charge of the fetch-execute cycle
• Include 2 registers
• IR (instruction register) : instruction to be
executed
• PC(program counter): the address of the next
instruction
21
Registers
• Temporary storage units within the CPU.
• Some registers, such as the program counter and
instruction register, have dedicated uses.
• Other registers, such as the accumulator, are for
more general purpose use.
22
Fetch-Execute Cycle
• Fetch the next instruction
• Decode the instruction
• Get data if needed
• Execute the instruction
23
Clock
• A circuit in a processor that generates a regular sequence
of electronic pulses used to synchronize operations of the
processor's components.
• Clock rate (frequency):The number of pulses per second
• Frequency and cycles: 3 GHz means 3 billions cycles
• The higher clock rate, the quicker speed of instruction
processing
• Each operation need some cycles to be finished
• Flop: floating point operations per second – how fast each
computer / super computer
24
Super computers
25
Memory
• Computer
components, devices
and recording media
that retain digital
data used for
computing
• Includes internal and
external memory
Main memory
26
CPU and memory
27
Nguyen Thi Thu Huong-SoICT-HUST
Internal memory
Accessible by a processor without the use of
the computer input-output channels
• Main storage: RAM & ROM
• Cache memory
• Special registers
28
RAM and ROM
• RAM (Random Access Memory), computer memory
that can be read from and written to in arbitrary
sequence.
• ROM Read-Only Memory, a class of storage media
used in computers and other electronic devices. This
tells the computer how to load the operating system.
• Storage capacity: the total amount of stored information
that a storage device or medium can hold. It is
expressed as a quantity of bits or bytes
29
RAM and ROM
ROM RAM
30
External Memory (secondary storage)
• Holds information too large for storage in main memory.
• Information on external memory can only be accessed by
the CPU if it is first transferred to main memory.
• External memory is slow and virtually unlimited in
capacity.
• It retains information when the computer is switched off;
used to keep a permanent copy of programs and data.
31
External memory
Floppy disk Compact disk USB flash drive
Hard disk External hard disk Compact flash card
32
External Memory: magnetic tape
33
Secondary Storage Devices
• Attached to the computer system to allow you to
store programs and data permanently for the
purpose of retrieving them for future use.
• Floppy disk, Hard disk, CD Rom DVD
Floppy Disk
• The most common secondary storage device
• 3.5” disk – 1.44MB
High-Capacity Floppy Disks
• Floppy disk cartridges
• 3 ½ inches in diameter
• Stores more information
• Zip disks
Optical Discs
• A standard part of modern desktop machines,
especially used for multimedia purposes and
preferred in loading applications.
Kinds
• Blue Ray Disk – 40G
• Digital Versatile Disk
• DVD-R – write once, 3.95G
• DVD RW – rewritable, 3G
• Single Layer and Double Layer
• Compact Disk
• CD-R – write once, 650MB
• CD-RW – rewritable, 700MB
Optical Drives
• CD-ROM read CDs
• CD-Writer read/write CDs
• DVD-Combo read/write CDs, read DVD
• DVD Writer read/write CDs
read/write DVDs
Other Secondary Storage
• Solid-State Storage
• No moving parts
• Flash memory cards
• USB flash drives
• Replacing HDD
Hard Disk Drive or Hard Disk
• Made of rigid materials unlike floppy disks
• Holds a greater amount of data
SSD vs HDD (2)
42
SSD vs HDD
43
Address of the Memory
• Each cell in the memory Address Content
has a unique physical
00000000 11100011
address
00000001 10101001
• Most computers are byte-
addressable … …
• n bits can address 2n 11111101 00000000
different locations 11111110 11111111
11111111 10100010
256 cell (byte) are addressed
44
Bus
• Transfers data or power
between computer
components or between
computers.
• Logically connects
several peripherals over
the same set of wires.
• Each bus defines its set
of connectors to
physically plug devices,
cards or cables together.
45
Some bus examples
46
Nguyen Thi Thu Huong-SoICT-HUST
Input-Output Devices
47
Input Devices
• Allows data and programs to be sent to the CPU.
• Keyboard
• Mouse
• Joystick
• Microphone
• Webcam
• Scanner
Keyboard
• Traditional keyboards
• Flexible keyboards
• Ergonomic keyboards
• Wireless keyboards
• PDA keyboards
Two Types of Mouse
• Mechanical - a type of computer
mouse that has a rubber or metal
ball on its underside and it can roll
in every direction.
• Optical: This type uses a laser for
detecting the mouse's movement.
How a Mouse Hooks Up to a PC
• PS/2 Mouse
• Serial Mouse
• USB/Cordless Mouse
Other Pointing Devices
• Trackball
• Track point
• Touch pad
• Touch Screen
• Joystick – input device for
computer games
• Light Pens – light-sensitive
penlike device
• Stylus – penlike device
commonly used with tablet PCs
and PDAs.
Scanning Devices
• Optical scanners
• Card readers
• Bar code readers
• Character and mark recognition devices
Image Capturing Devices
• Digital Cameras
• Digital Video Cameras
Output Devices
• Media used by the computer in displaying its
responses to our requests and instructions.
• Monitor
• Audio Speakers
• Printer
• Plotter
Types of Monitor
• Cathode Ray Tube (CRT)
• Liquid Crystal Display (LCD)
Monitor
• Display device that operates like a television
• Controlled by an output device called a graphics card
• Displayable area
• Measured in dots per inch, dots
are often referred to as 1280
pixels (short for picture 1024
pixels pixels
element) across down
• Standard resolution screen screen
is 1280 by 1024
• The card of my computer supports
resolution of 1920 by
1080
• Number of colors supported varies from 16 to billions
58
Printers
• IMPACT PRINTERS uses pressure by physically
striking the paper. Ex. Daisy wheel printers, line
printers, dot matrix printers & band printers.
• NON-IMPACT PRINTER does not apply pressure on
the paper but instead produces character by using
lasers, ink spray, photography or heat.
Dot matrix
printer
Laser Inkjet printer
printer