Professional Documents
Culture Documents
Unit1 3
Unit1 3
• Code: 7t70ioe
1
Important summary of previous
lecture
• Representation of number
• dn-1dn-2 . . . . d1d0.d-1d-2…..d-m
𝑛−1
𝑖 = 𝑑𝑗 ∗ 𝒃𝑗
𝑗=−𝑚
• Remainder algorithm
• Two’s Complement
• Logical/arithmetic operations on binary numbers
2
Exercise
1. Convert your 2 least significant digits of Student-
ID to a 8bit binary number (X2)
2. Multiply X2 by 10 and obtain an 8bit number Y2
3. Convert Y2 to a decimal number
4. Convert X2 to an 8bit negative number
3
Unit 3
Computer architecture
4
An detailed advertisement of a computer
5
Hardware
Open a case
6
Computer Architecture
7
General Model of a Computer
• Computer Operations
• Architecture of Computer Systems
• The Fetch – Execute Cycle
8
Computer Operations
A computer is a programmable electronic device
that can store, retrieve and process data
• Data Processing
• Data Storage
• Data Retrieve
• Programmable
9
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
processor
ports memory
16
Expansion Slots
• Graphic cards
• Sound cards
• Modem cards
• Network interface cards/network adapter
The von Neuman Architecture
18
Computer systems
STORAGE
THIẾT BỊ LƯU TRỮ
19
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
20
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
21
Basic Model of
the Central Processing Unit (CPU)
22
Arithmetic Logic Units (ALU)
• Performs the arithmetic and logical
operations on the binary data .
• Most modern ALU have small amount of
registers
23
Control Unit
24
Registers
25
Fetch-Execute Cycle
26
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
27
Super computers
28
Memory
• Computer
components, devices
and recording media
that retain digital
data used for
computing
• Includes internal and
external memory
Main memory
29
CPU and memory
30
Nguyen Thi Thu Huong-SoICT-HUST
Internal memory
Accessible by a processor without the use of
the computer input-output channels
31
RAM and ROM
• RAM (Random Access Memory), computer memory
that can be read from and written to in arbitrary
sequence.
32
RAM and ROM
ROM RAM
33
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.
34
External memory
Floppy disk Compact disk USB flash drive
35
External Memory: magnetic tape
36
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
45
SSD vs HDD (2)
46
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
47
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.
48
Some bus examples
49
Nguyen Thi Thu Huong-SoICT-HUST
Input-Output Devices
50
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
• PS/2 Mouse
• Serial Mouse
• USB
• Cordless Mouse
Other Pointing Devices
• Trackball
• Track point
• Touch pad
• Touch Screen
• Joystick – input device for
computer games
61
Printers