Title: Hardware: The CPU
1Hardware The CPU Storage
- Chapter 5
- How to Buy a Multimedia Computer
2Key Questions
- 5.1 What is a CPU? What are the three components
of a CPU and what are their functions? - 5.2 What are machine languages and how
instructions are executed? - 5.3 How is data represented in a computer what
are the components of the system cabinet what
are processing speeds how do the processor and
memory work and what are some important ports,
buses, and cards? - 5.4 What are the features of floppy disks, hard
disks, optical disks, magnetic tape, smart cards,
and online secondary storage?
3CPU and Main Memory
- CPU Central Processing Unit
- the brain of the computer
- Control the operating of the computer
- Main Memory
- Hold data being processed
- Hold Program being executed
- Primary Storage
- RAM Random Access Memory
4The CPU and main memory
5Main Memory
- Random Access Memory (RAM)
- Primary storage or memory
- Used to
- Holds data for processing
- Holds instructions for processing data
- Main memory is volatile
- the contents are lost when the power is turned
off. - Therefore, the data must be saved to a secondary
storage device for later use.
6Main Memory - contd
- The more memory, the more powerful
- Hold more programs/data at a time.
- The capacity of memory varies with different
computers - bit or binary digit 0/1
- byte (8 bits each) one character
- Kilobyte 1024 bytes 1 thousand
- Megabyte 1024 Kilobytes 1 million
- Gigabyte 1024 Megabytes 1 billion
- Terabyte 1024 Gigabytes 1 trillion
- Each byte has a unique address
7Three Components of a CPU
- The control unit
- Like a symphony director
- Control the rest of the system to carry out
programs instructions. - The Arithmetic/logic unit (ALU)
- Perform arithmetic and logical operations
- Registers
- Fastest storage device
- instruction register hold the instruction to be
executed next - data registers store data to be processed by ALU
- address registers Hold the addresses of RAM
8 System Clock and Word Size
- System clock
- Generate a sequence of digital pulses
- To control how fast the processor executes
- MHz 1 million pulses per second
- The faster the clock, the faster the processor.
- Word Size
- The of bits the CPU can manipulate at a time.
- A 32-bit-word PC is faster than an 8-bit-word PC
with the same system clock - The Power of a Processor
- Determined by the system clock and word size.
9Machine Language
- A Language a computer hardware can run directly.
- Programs in BASIC or PASCAL must be translated
into the machine language before it is executed
by the hardware. - An instruction consists of three parts
- operation code add/subtract
- two operands source and destination
- Example add M(10), M(20)
- 01011100 Add
- 00001000 operand 1
- 00010100 operand 2, location of result
10 How an Instruction is Processed
- Instructions are stored in memory
- The CPU can only execute instructions that are
stored in memory, not on 2nd storage. - Machine Cycle
- a series of operations performed to execute a
single program instruction - Instruction cycle
- The control unit fetches the instruction from RAM
to the instruction register - It then decodes the instruction
- Execution cycle
- The ALU executes the instruction
- It then stores the result in memory
11The machine cycle
12How Data is Represented
- Binary System Using Two States bits
- Representation of numbers
- Position value
- Decimal
- E.g., 342, it reads three hundred forty two,
- or three hundreds, four tens, and two ones.
- I.e., each position has position value
- So, 3102 4101 2100
- Binary
- E.g., 10111
- The position value of position i is ith power of
2 - Starting from the rightmost bit as position zero.
- So, 124 023 122 121120
- 16 0 4 2 1
- 23
13How Data is Represented
- Binary System Using Two States bits
- Binary Coding Schemes for symbols/letters
- EBCDIC
- Extended Binary Coded Decimal Interchange code.
- One byte for a character
- Used on mainframe computers
- ASCII
- American Standard Code for Information
Interchange - One byte for a character
- Used on microcomputers
- Unicode
- Code foreign characters as well as English.
- Two bytes for a character.
- Used more and more
14Binary data representation of symbols
15Two coding schemes EBCDIC and ASCII-8
16The Microcomputer System Unit
- Power Supply
- Surge protectors
- Prevent damages from power surges
- Uninterruptable power supply (UPS)
- Provide temporary power supply when the main
power is off so the user can save data to disk. - Motherboard
- The circuit that connects all the devices
together. - CPU Chip
- Intel-type chips
- Motorola-type chips
- 68000-series
- PowerPC
17System unit and motherboard components
18Microcomputers and microprocessors
19The Microcomputer System Unit
- Specialized Processor Chips
- Math coprocessor chip
- Graphics coprocessor chip
- Types of processing
- Serial
- Parallel
- RAM Chips
- Main memory or primary storage
- Inline memory modules (SIMM / DIMM)
- Dynamic RAM (DRAM)
- Static RAM (SRAM)
20The Microcomputer System Unit
- ROM Chips
- Other Forms of Memory
- Cache memory
- Video memory or video RAM
- Expansion Slots Boards
- Expanded memory
- Display adapter or graphics adapter
- Controller cards
21The Microcomputer System Unit
- Bus Lines
- Expansion bus
- Local bus
- Ports
- Parallel ports
- Serial ports or RS-232 ports
- Video adapter ports
- Small computer system interface (SCSI)
22Buses
23I. Storage Fundamentals
- Units of Measurement for Storage
- Kilobyte/Megabyte/Gigabyte/Terabyte
- Data Access Methods
- Sequential Storage
- magnetic tapes
- Direct Access Storage
- Hard disks, floppy disks, CD-ROMs
24II.Criteria for Rating Storage Devices
- Storage Capacity
- of bytes the disk can hold
- Access Speed
- the time needed to locate data
- Transfer Rate
- the speed at which data is transferred
- Removability
- the device that can be removed/installed
- Cost
25III. Diskettes
- The Disk Drive1. Read2. Write
- How A Disk Drive works
- Magnetic coating on the disk
- Read/Write head (R/W head)
- While disk spins, R/W head can read/write
26Cutaway view of a disk drive
27Diskettes
- C. Characteristics of Diskettes
- Tracks and Sectors
- track a circular band on the surface
- Sector a segment of track
- Unformatted versus formatted disks
- Format define tracks and sectors
- Data capacitysides and densities
- Write-protect features
28Diskette anatomy
29IV. Hard Disks
- Hard-disks
- Multiple diskettes stacked in one pack.
- Each diskettes has its own R/W on both sides
- Hard-disk Connections
- SCSI Small Computer System Interface
- EIDE Enhanced Integrated Drive Electronics
- Fragmentation Defragmentation
- Cluster the unit the computer can access at a
time from disk, multiple sectors - Fragmentation a file spread out over many
noncontiguous sectors
30Microcomputer hard-disk drive
31Multiple disks and cylinders
32V. Optical DisksÂ
- CD-ROM (Compact Disk - Read Only Memory)
- Data is read/written through laser beams
- Single-speed 1x 150KB/Second, 150kbps
- 16x 2400kbps, 32x 4800kbps
- CD-R Disks Recording Your Own CDs
- Compact diskrecordable
- Compact disk - Recordable and reWriteable
- DVD The Digital Convergence Disk
- New generation of high-density CD-ROM
33Optical disks