Hardware Outline 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.
Hardware Outline What is a Computer?/Components of a Computer System Hardware That Computers Typically Have Hardware Components Central Processing Unit (CPU) Central Processing Unit Storage (Primary & Secondary) Main Memory Bits, Bytes, Words How Data Travel Between Memory & CPU Loading Data from Main Memory into the CPU Cache: Eliminating Speedbumps for the Bus Secondary Storage CDROM/DVDROM/Why Are Floppies So Expensive Per MB? Input & Output Devices Putting Bits Together Powers of 2 Kilo, Mega, Giga, Tera, Peta
What is a Computer? "... [A] programmable electronic device that can store, retrieve and process data."
compact disc
(N. Dale & D. Orshalick, Introduction to PASCAL and Structured Design, D.C. Heath & Co., Lexington, MA, 1983, p. 2)
ZIP
Hello ...
Components of a Computer System COMPUTER SYSTEM
HARDWARE
SOFTWARE
Physical devices
Sets of instructions
DON’T PANIC! This discussion may be confusing at the moment; it will make more sense after you’ve written a few programs. 1
2
Hardware That Computers Typically Have
Hardware Components HARDWARE
Central Processing Unit (CPU) Primary Storage
CENTRAL PROCESSING UNIT
Secondary Storage
Control Unit
Input Devices Output Devices
STORAGE
INPUT/OUTPUT
Primary Basic I/O
Multimedia
$1600/MB 80,214 MB/sec
Keyboard
Speakers
Cache
Arithmetic/ Logic Unit
Main Memory
Mouse
Amplifier
$0.83/MB 4,096 MB/sec
Monitor
CD/DVD
Registers
Secondary
Printer
Joystick
Hard Disk
etc
Note: storage costs and speeds are based on available PC systems, Jan 2003. Prices, specs courtesy of: bestbuy.com buy.com cendyne.com creativelabs.com pricewatch.com toshiba.com
etc
Networking
CD−RW $0.0005/MB 7.6 MB/sec
Modem
Zip Disk
Internet Port
$0.036/MB 2.4 MB/sec
etc
Floppy Disk $0.10/MB 0.03 MB/sec
etc
3
Scanner
$0.0017/MB 100 MB/sec
4
Central Processing Unit (CPU) The Central Processing Unit (CPU), also called the processor, is the “brain” of the computer. It has three main parts: the Control Unit, the Arithmetic/Logic Unit and Registers. The Control Unit decides what to do next; for example: – load data from main memory into the registers (see below); – perform an arithmetic or logical operation (see below); – store data from the registers into main memory; – choose among several possible courses of action (branch). The Arithmetic/Logic Unit (ALU) performs arithmetic & logical operations. – Arithmetic operations: add, subtract, multiply, divide, etc. – Logical operations: compare two numbers to see which is greater, check whether a true-false statement is true, etc. Registers are memory-like locations where data reside when they’re being used right now; for example, the operands being used by the current arithmetic or logical operation, or the result of the arithmetic or logical operation that was just performed.
Central Processing Unit Control Unit Load Next Instruction
Increment Instruction Pointer
Find Data Addresses in Memory
Load Data from Memory
Execute Instruction
Store Result in Memory
... Arithmetic/Logic Unit Add
Multiply
Divide
R03 = R03 + R63
R02 = R00 * R01
R02 = R00 / R01
Compare
Bit Shift
Bit Invert
R00 < R01?
R00