Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College...

28
Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and modified from LUMS CS101 course (Dr Sohaib Khan and Dr Arif Zaman), VU CS101 slides (Dr. Altaf A. Khan) and Peter Norton’s supplementary material. *Figure Acknowledgements: “How Computers Work” 6th Ed by Ron White (Illustrated by Timothy Edward Downs) © Que Corp 2002

Transcript of Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College...

Page 1: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Lecture 3Computer Organization and HardwareCSCS100 - Spring 2009 – Forman Christian CollegeAsher Imtiaz

*Several of these slides have been adapted and modified from LUMS CS101 course (Dr Sohaib Khan and Dr Arif Zaman), VU CS101 slides (Dr. Altaf A. Khan) and Peter Norton’s supplementary material.

*Figure Acknowledgements: “How Computers Work” 6th Ed by Ron White (Illustrated by Timothy Edward Downs) © Que Corp 2002

Page 2: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Goals

•Looking inside the computer system…

• Parts of a computer system.

Page 3: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Parts of a Computer System

Page 4: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Parts of the Computer System• Computer systems have four parts

• Hardware• The physical parts of a computer• Any part of the computer that you can touch

• Software• Previous lecture: “A computer does what it is told to do…You

tell a computer what to do by giving it a list of precise, unambiguous instructions, a computer program”

• Set of instructions to tell the computer what it should do• Computer Programs are pieces of software

• Data• Chunks of information in ‘raw’ form. • Computer organize, process and present data and

information.• User

• People operating the computer• Most important part• Tell the computer what to do

Page 5: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Information Processing Cycle

• Steps followed to process data• Input• Processing• Output• Storage

Page 6: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Essential Computer Hardware• Computers use the same basic hardware• Hardware categorized into four types

• Processing devices• Memory devices• Input and output devices• Storage devices

Page 7: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Organization Image credit: VU CS101 (Dr Altaf Khan)

Page 8: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Essential Computer Hardware• Processing devices

• Processing: The procedure that converts raw data into useful information. To do this, the computer uses two important components: processor and memory.

• Processor: Brains of the computer• Carries out instructions from the program• Manipulate the data, transforms data into information• Central Processing Unit (CPU) term used to refer

to a computer’s processor.• In personal computers, processor consists of one or

more specialized chips, called microprocessors (tiny slivers of silicon or other material etched with many tiny electronic circuits).

• E.g. Pentium 4, Core2Duo.

Page 9: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Motherboard• Rigid, rectangular card containing the circuitry that

connects the processor to the other hardware. • PCB (Printed Circuit Board) made of Fiberglass sheet

with electrical pathways, called traces, etched into it• System Clock• Microprocessor• Read-Only Memory (ROM)• Random Access Memory (RAM)• Battery• Power Supply• Ports• Expansion Slots• Buses

• Address Bus• Data Bus

Page 10: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Motherboard

Page 11: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Clock• The computer’s internal clock

• Quartz crystal• Every tick causes a cycle• Speeds measured in Hertz (Hz)

• Modern machines use Giga Hertz (GHz)

Page 12: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Bus• Electronic pathway between components• Expansion bus connects to peripherals• Bus connects CPU and RAM, housed on the

motherboard.• Speed is tied to the clock• Data bus• Address bus

Page 13: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

USB• Universal Serial Bus (USB)

• Connects external devices• Hot swappable• Allows up to 127 devices• Cameras, printers, and scanners

Page 14: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Essential Computer HardwareMemory devices

• Stores data or programs• Random Access Memory (RAM)

• Like an electronic scratch pad• Stores current data and programs while the CPU works on them• Set of chips, mounted on a circuit board • Volatile• More RAM results in a faster system• The term ‘memory’ is typically used to mean RAM.• 256MB – 4GB

• Read Only Memory (ROM)• Permanent storage of programs, not volatile• Holds the computer boot directions

• Cache Memory• Very fast memory• Holds common or recently used data• Speeds up computer processing• Most computers have several caches

Page 15: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Essential Computer Hardware• Input and output devices

• Allows the user to interact• Input devices accept data

• Keyboard, mouse, microphone, joystick, trackball, touchpad, scanner.

• Output devices deliver data• Monitor, printer (hard copy), speaker

• Some devices are input and output• Touch screens• Any other???

Page 16: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Essential Computer Hardware• Storage devices

• Hold data and programs permanently• Different from RAM• Magnetic storage

• Floppy and hard drive• Uses a magnet to access data

• Optical storage• CD (Compact Disk, 700MB~80mins of audio) and

DVD (Digital Video Disk, 4.7-17GB) drives• Uses a laser to access data• The future? Blue laser disc technology, upto a

100GB (and more) on one disk.

Page 17: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Computer Ports The connection point at which we

connect input and output devices to a computer.

Standard Computer Ports• Mouse• Keyboard• USB• Serial• Parallel• Modem• Network• Microphone• Speakers• VGA• S-Video

Page 18: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.
Page 19: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.
Page 20: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Microprocessor Image credit: VU CS101 (Dr Altaf Khan)

Page 21: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Microprocessor• The key element of all computers, providing the

mathematical and decision making ability

• Current state-of-the-art microprocessors (Pentium, Athlon, SPARC, PowerPC) contain complex circuits consisting of tens of millions of transistors

• They operate at ultra-fast speeds – doing over a billion operations every second

• Made up from a semiconductor, Silicon

Page 22: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Microcomputer Processors• Intel

• Leading manufacturer of processors• Intel 4004 was worlds first microprocessor• IBM PC powered by Intel 8086• Current processors

• Core 2 Duo• Centrino• Itanium• Pentium IV• Xeon

Page 23: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Microcomputer Processors• Advanced Micro Devices (AMD)

• Main competitor to Intel• Originally produced budget products• Current products outperform Intel• Current processors

• Sempron• Athlon FX 64• Athlon XP• TurionTM

Page 24: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

A Microprocessor System• Microprocessors are powerful pieces of

hardware, but not much useful on their own

• Just as the human brain needs hands, feet, eyes, ears, mouth to be useful; so does the microprocessor

• A microprocessor system is microprocessor plus all the components it requires to do a certain task

• A microcomputer is 1 example of a microprocessor system

Page 25: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Micro-controllers• Micro-controllers are another type of

microprocessor systems

• They are generally not that powerful, cost a few dollars a piece, and are found embedded in video games, VCRs, microwave ovens, printers, autos, etc.

• They are a complete computer on a chip containing direct input and output capability and memory along with the microprocessor on a single chip. Many times they contain other specialized application-specific components as well

Page 26: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

More on Micro-controllers

• More than 90% of the microprocessors/micro-controllers manufactured are used in embedded computing applications

• In 2000 alone, 365 million microprocessors and 6.4 billion micro-controllers were manufactured

Page 27: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Building Blocks of a Microprocessor• Bus Interface Unit• Data and Instruction Cache• Instruction Decoder• Arithmetic Logic Unit• Floating Point Unit• Control Unit• Registers

Page 28: Lecture 3 Computer Organization and Hardware CSCS100 - Spring 2009 – Forman Christian College Asher Imtiaz *Several of these slides have been adapted and.

Language of a Microprocessor Instruction Set• The set of machine instructions that a microprocessor

recognizes and can execute – the only language microprocessor knows

• An instruction set includes low-level, a single step-at-a-time instructions, such as add, subtract, multiply, and divide

• Each microprocessor family has its unique instruction set

• Bigger instruction-sets mean more complex chips (higher costs, reduced efficiency), but shorter programs