computers: how they work

60
Computers: How They Computers: How They Work Work 1. 1. What is a Computer What is a Computer 2. 2. Components of Computer Components of Computer 3. 3. World’s First Computers World’s First Computers 4. 4. 4004 – First single chip Microprocessor 4004 – First single chip Microprocessor 5. 5. Transistors in integrated circuits (ICs) Transistors in integrated circuits (ICs) 6. 6. Review of MOSFET transistors (how they work and how they Review of MOSFET transistors (how they work and how they are made) are made) 7. 7. Basic building blocks from transistors Basic building blocks from transistors 8. 8. NANDS, NORS, Latches, Adders NANDS, NORS, Latches, Adders 9. 9. Simple components using basic building blocks Simple components using basic building blocks 10. 10. Integrating the components to create a 4-bit Integrating the components to create a 4-bit Microprocessor Microprocessor 11. 11. Scaling up and Moore’s Law Scaling up and Moore’s Law 12. 12. Machine Code and the processor’s Instruction Set – Machine Code and the processor’s Instruction Set – Software Software 13. 13. Memory types (ROM, DRAM, SRAM, FLASH) Memory types (ROM, DRAM, SRAM, FLASH) 14. 14. Mother Board Mother Board 15. 15. Hard Drive Hard Drive 16. 16. Keyboard Keyboard 17. 17. Monitor Monitor 18. 18. The Mouse The Mouse 19. 19. I/O I/O 20. 20. DSL and connection to Internet DSL and connection to Internet 21. 21. File Compression File Compression

Upload: fallon

Post on 22-Feb-2016

86 views

Category:

Documents


0 download

DESCRIPTION

Computers: How They Work. What is a Computer Components of Computer World’s First Computers 4004 – First single chip Microprocessor Transistors in integrated circuits (ICs) Review of MOSFET transistors (how they work and how they are made) Basic building blocks from transistors - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Computers: How They Work

Computers: How They Computers: How They WorkWork1.1. What is a ComputerWhat is a Computer

2.2. Components of ComputerComponents of Computer3.3. World’s First ComputersWorld’s First Computers4.4. 4004 – First single chip Microprocessor4004 – First single chip Microprocessor5.5. Transistors in integrated circuits (ICs)Transistors in integrated circuits (ICs)6.6. Review of MOSFET transistors (how they work and how they are Review of MOSFET transistors (how they work and how they are

made)made)7.7. Basic building blocks from transistorsBasic building blocks from transistors8.8. NANDS, NORS, Latches, AddersNANDS, NORS, Latches, Adders9.9. Simple components using basic building blocksSimple components using basic building blocks10.10. Integrating the components to create a 4-bit MicroprocessorIntegrating the components to create a 4-bit Microprocessor11.11. Scaling up and Moore’s LawScaling up and Moore’s Law12.12. Machine Code and the processor’s Instruction Set – SoftwareMachine Code and the processor’s Instruction Set – Software13.13. Memory types (ROM, DRAM, SRAM, FLASH)Memory types (ROM, DRAM, SRAM, FLASH)14.14. Mother BoardMother Board15.15. Hard DriveHard Drive16.16. KeyboardKeyboard17.17. MonitorMonitor18.18. The MouseThe Mouse19.19. I/OI/O20.20. DSL and connection to InternetDSL and connection to Internet21.21. File CompressionFile Compression

Page 2: Computers: How They Work

DemonstrationsDemonstrations► PC Mother BoardsPC Mother Boards► Plain and Etched WafersPlain and Etched Wafers► Silicon IngotSilicon Ingot► ICs with lids removedICs with lids removed► MasksMasks► MemoryMemory

Hard DriveHard Drive Magnetic TapeMagnetic Tape Punch CardsPunch Cards CDsCDs

► Cathode Ray Tube MonitorCathode Ray Tube Monitor► LCDsLCDs► KeyboardKeyboard► CCD chipsCCD chips

Page 3: Computers: How They Work

What is a Computer?What is a Computer?

►A machine that A machine that stores stores instructionsinstructions and and operates on operates on information/data.information/data.

►A calculator that A calculator that executes a executes a storedstored program (sequence of program (sequence of instructions)instructions)

http://www.sscnet.ucla.edu

Page 4: Computers: How They Work

Jacquards LoomCirca 1804

Page 5: Computers: How They Work

Charles Babbage’s first Charles Babbage’s first attempt at a Computer attempt at a Computer The Analytical EngineThe Analytical Engine, c. , c.

1822 1822 ► Designed to use Jacquard Designed to use Jacquard

punch cards to store and punch cards to store and run a programrun a program

► Mathematician, Mathematician, Augusta Ada LovelaceAugusta Ada Lovelace, , created programscreated programs

► Steam PoweredSteam Powered► 25,000 parts25,000 parts► 15 tons and 8 feet high15 tons and 8 feet high► Never completedNever completed http://concise.britannica.com

Page 6: Computers: How They Work

Difference Engine IIDifference Engine II►Designed to Designed to

calculate calculate polynomials polynomials and compute and compute trig and log trig and log functionsfunctions

►C. 1847C. 1847►Crank Crank

operatedoperatedhttp://www.computerhistory.org/babbage/

Now on Display at the Computer History Museum!

Page 7: Computers: How They Work

Herman Hollerith’s Census Herman Hollerith’s Census Tabulator c. 1890Tabulator c. 1890

► Census recording performed in six weeks in 1890Census recording performed in six weeks in 1890► Census recording took 7 years in 1880Census recording took 7 years in 1880

Also on Display at the Computer History Museum!

Page 8: Computers: How They Work

► Data entered on Data entered on punch cardspunch cards

► Card reader used Card reader used mercury to close mercury to close a circuit which a circuit which would advance a would advance a dial by one ‘tick’dial by one ‘tick’

http://www.columbia.edu/acis/history/census-tabulator.html

Holerith’s Tabulator

Page 9: Computers: How They Work

ENIAC in 1946ENIAC in 1946► First electronic First electronic

computercomputer► Designed for the Designed for the

ArmyArmy► $500,000$500,000► >17,000 Vacuum >17,000 Vacuum

TubesTubes► 150 KW of power150 KW of power► Filled multiple Filled multiple

rooms (700 sq. ft)rooms (700 sq. ft)► Soldered and Soldered and

constructed by constructed by hand by the hand by the University of University of Penn.Penn.

Page 10: Computers: How They Work

IBM’s Accounting Machine

Introduced in 1949

Punch cards used to store Fortran programs up until about 1980.

Page 11: Computers: How They Work

► Individual PartsIndividual Parts►Manual hand wiringManual hand wiring

IBM 402

Page 12: Computers: How They Work

The birth of the integrated The birth of the integrated circuit (IC)circuit (IC)

► 1947- using silicon as a transistor is discovered1947- using silicon as a transistor is discovered► 1960- TI put 10 transistors on one piece of silicon1960- TI put 10 transistors on one piece of silicon► Used in Apollo Space Program – lower power and Used in Apollo Space Program – lower power and

weightweight

Page 13: Computers: How They Work

Intel 4004

The World’s first Microprocessor, made in 1971

Computer on a chip!

It had 2300 transistors and ran at 740 KHz.

It could execute 45 instructions.

Could execute 96,000 instructions per second

As powerful as the ENIAC

Page 14: Computers: How They Work

Where’s the chip?Where’s the chip?

Page 15: Computers: How They Work

MicroprocessorMicroprocessor► A A logic machinelogic machine

that can execute a that can execute a computer program. computer program.

► A Central A Central Processing Unit Processing Unit (CPU) integrated (CPU) integrated into a single chip into a single chip (i.e. constructed as (i.e. constructed as an integrated circuit an integrated circuit or IC on a single or IC on a single piece of Silicon)piece of Silicon) http://en.wikipedia.org/wiki/Central_processing_unit

Page 16: Computers: How They Work

BusicomBusicom

Page 17: Computers: How They Work

Moore’s Moore’s LawLaw

In 1965 Gordon Moore predicted In 1965 Gordon Moore predicted that the number of transistors on a that the number of transistors on a chip would double every two years.chip would double every two years.

Page 18: Computers: How They Work

http://www.computerhistory.org/semiconductor/

Page 19: Computers: How They Work

Wikipedia

micron = 10-6 metersThe feature size of an integrated circuit is indicated by the width of a "wire," measured in microns (one micron is one millionth of a meter). Analysis and Design of Analog Integrated Circuits (4th Edition)

Page 20: Computers: How They Work

Components of a ComputerComponents of a Computer► ProcessorProcessor► Memory Memory ► Input/OutputInput/Output

Processor

Input(Keyboard, MouseUSB Drive, DSL,

Touchscreen, Microphone,Hard Drive)

Output(Monitor, speakers,USB Drive, Printer,

DSL, Hard Drive)

Memory(ROM, RAM,

Registers, Cache)

USB – Universal Serial Bus DSL – Digital Subscriber Line

Page 21: Computers: How They Work

4004 Processor4004 Processor

http://en.wikipedia.org

Page 22: Computers: How They Work

What’s Inside a basic CPU?What’s Inside a basic CPU?(Central Processing Unit)(Central Processing Unit)►ALU (Arithmetic Logic Unit)ALU (Arithmetic Logic Unit)► Instruction DecoderInstruction Decoder►Program CounterProgram Counter► Instruction RegisterInstruction Register►Data RegistersData Registers►Accumulator (place for storing a Accumulator (place for storing a

sum)sum)►Clock for sequencing operationsClock for sequencing operations

Page 23: Computers: How They Work

CPUs are made from CPUs are made from TransistorsTransistors

Transistors are Transistors are tiny switches that tiny switches that can open and can open and close very quickly.close very quickly.

A negative A negative voltage will turn voltage will turn this transistor this transistor ‘on’.‘on’.

http://www.answers.com

Page 24: Computers: How They Work

http://www.ugrad.cs.ubc.ca

nMOS Transistor (n-channel)

A positive voltage will A positive voltage will turn this transistor turn this transistor ‘on’.‘on’.

Page 25: Computers: How They Work

http://www.britannica.com

Chips can have millions of transistors built on a small piece of silicon.

CMOS stands for ‘Complimentary Metal Oxide Semiconductor’. This means CMOS chips contain both pMOS and nMOS transistors.

Page 26: Computers: How They Work

Transistors are Transistors are used to make logic used to make logic

gatesgates

http://www.iclayoutonline.com

Page 27: Computers: How They Work

Making the Inverter Logic GateMaking the Inverter Logic Gate

Page 28: Computers: How They Work

http://www.ibiblio.org/obp/electricCircuits

Making the Exclusive OR gate Making the Exclusive OR gate (XOR)(XOR)

Page 29: Computers: How They Work

Now what can be made Now what can be made with NAND, NOR, & XOR with NAND, NOR, & XOR

gates?gates?1-bit adder1-bit adder(Full Adder)(Full Adder)

Page 30: Computers: How They Work

MultiplexerMultiplexerA multiplexer selectsA multiplexer selectsone of many sourcesone of many sourcesto send to the output.to send to the output.

http://users.ece.gatech.edu

Page 31: Computers: How They Work

1-Bit ALU (Arithmetic Logic 1-Bit ALU (Arithmetic Logic Unit)Unit)

http://www.cs.umd.edu/

Coming from the Instructions

Page 32: Computers: How They Work

4004 Processor4004 Processor

http://en.wikipedia.org

Page 33: Computers: How They Work

Cascading 1-bit ALU to get a 3-bit Cascading 1-bit ALU to get a 3-bit ALUALU

http://www.cs.umd.edu/class/spring2003/cmsc311

Page 34: Computers: How They Work

Memory – A Device that Memory – A Device that “remembers” a previous input.“remembers” a previous input.

Registers are the high speed memory on Registers are the high speed memory on the CPU chip. These registers are used the CPU chip. These registers are used for storing data that is frequently needed. for storing data that is frequently needed.

Instructions are pre-fetched and stored in Instructions are pre-fetched and stored in registers too so that they are ready when registers too so that they are ready when needed. needed.

Page 35: Computers: How They Work

Registers

Page 36: Computers: How They Work

1-bit Latch (Flip Flop)1-bit Latch (Flip Flop)

Static Ram and registers are constructed with this logic. The state of Q is retained as long as power is on.

Page 37: Computers: How They Work

Clocked LatchAlso known as a D-Flip Flop

http://www.cise.ufl.edu

Page 38: Computers: How They Work

Cascading Flip Flops to Cascading Flip Flops to build an N-bit registerbuild an N-bit register

Page 39: Computers: How They Work

Now we know how to Now we know how to addadd binary numbers and binary numbers and storestore

binary databinary data

►Use Flip Flops to store instructions which Use Flip Flops to store instructions which are coded as binary (base-2) numbersare coded as binary (base-2) numbers

►Use an ALU to add numbers togetherUse an ALU to add numbers together►Scale this concept up to accommodate Scale this concept up to accommodate

larger numberslarger numbers►Add more functionality to the ALUAdd more functionality to the ALU

Page 40: Computers: How They Work

Microinstructions are coded and Microinstructions are coded and stored as binary datastored as binary data

►Microinstructions are the controls that Microinstructions are the controls that make the hardware operatemake the hardware operate

►Microinstructions are coded in 1’s and Microinstructions are coded in 1’s and 0’s0’s

►Microinstructions are unique to the Microinstructions are unique to the processor (each processor has it’s own processor (each processor has it’s own instruction set)instruction set)

►The clock sequences operations and The clock sequences operations and keeps operations in lock stepkeeps operations in lock step

Page 41: Computers: How They Work

00011011 00011011 Add C, #1 Add C, #1

To avoid large decoder circuits, the codes are broken up into fields. In this example there are three fields, each field has dedicated decoding circuitry:

1. The command

2. The data to be used

To Registers A, B, C, and D

http://webster.cs.ucr.edu

Page 42: Computers: How They Work

2 to 4 decoders2 to 4 decoders

http://users.ece.gatech.edu

Page 43: Computers: How They Work

Software commands HardwareSoftware commands Hardware

while (amt2 <= amt1)while (amt2 <= amt1){{

amt1 = amt1 + 100;amt1 = amt1 + 100;amt2 = amt2 + amt2 = amt2 +

0.05*amt2;0.05*amt2;year++;year++;

}}

14: while (amt2 <= amt1)004015BB fld dword ptr [ebp-8]004015BE fcomp dword ptr [ebp-4]004015C1 fnstsw ax004015C3 test ah,41h004015C6 je main+70h (004015f0)15: {16: amt1 = amt1 + 100;004015C8 fld dword ptr [ebp-4]004015CB fadd dword ptr [__real@4@4005c800000000000000 (0046f0a4)]004015D1 fstp dword ptr [ebp-4]17: amt2 = amt2 + 0.05*amt2;004015D4 fld dword ptr [ebp-8]004015D7 fld dword ptr [ebp-8]004015DA fmul qword ptr [__real@8@3ffaccccccccccccd000 (0046f098)]004015E0 faddp st(1),st004015E2 fstp dword ptr [ebp-8]18: year++;004015E5 mov eax,dword ptr [ebp-14h]004015E8 add eax,1004015EB mov dword ptr [ebp-14h],eax19: }

C++ high level codes gets compiled/translated into low level machine codes

Page 44: Computers: How They Work

Fetch-Decode-Execute CycleFetch-Decode-Execute Cycle►Fetch an Instruction:Fetch an Instruction:

Fetch instruction at address stored in Fetch instruction at address stored in address registeraddress register

Increment Program CounterIncrement Program Counter Load the Instruction Register with this Load the Instruction Register with this

InstructionInstruction

Page 45: Computers: How They Work

►DecodeDecode Decode the InstructionDecode the Instruction Fetch the operandsFetch the operands

►ExecuteExecute ALU or other logic performs the operationALU or other logic performs the operation The result is then written to memory or to The result is then written to memory or to

a register.a register.

Page 46: Computers: How They Work

Memory Hierarchy

http://www.surriel.com/lectures/hierarchy.gif

Page 47: Computers: How They Work

Cache MemoryCache Memory

http://content.answers.com

Page 48: Computers: How They Work

SRAMSRAM► Static Random Access MemoryStatic Random Access Memory► Retains data in memory as long as power is Retains data in memory as long as power is

onon► Uses flip flopsUses flip flops (4-6 transistors each) (4-6 transistors each)► Fast but more expensive due to more chip Fast but more expensive due to more chip

real-estate needed for each memory real-estate needed for each memory location compared to DRAMlocation compared to DRAM

► Used for cache memoryUsed for cache memory► Access time Access time 10 nanoseconds 10 nanoseconds

Page 49: Computers: How They Work

DRAM and SDRAMDRAM and SDRAM► Dynamic RAMDynamic RAM

Dynamic refers to the need to Dynamic refers to the need to refresh the datarefresh the data

► Synchronous DRAMSynchronous DRAM (Timing of memory chip is (Timing of memory chip is

synchronized with CPU clock)synchronized with CPU clock)► Data is stored as electrical Data is stored as electrical

charge in a capacitorscharge in a capacitors► Capacitors will discharge Capacitors will discharge

requiring that memory be requiring that memory be refreshed every few refreshed every few milliseconds. This slows milliseconds. This slows down the DRAMdown the DRAM

► Dense therefore least Dense therefore least expensive form of memoryexpensive form of memory

http://www.electronics.dit.ie/staff/tscarff/memory/ram.htm

Page 50: Computers: How They Work

10 byte DRAMThe word “random” means bytes can be accessed randomly. Data access is not sequential like a magnetic tape.

http://www.cse.scu.edu

Page 51: Computers: How They Work

SIMM & DIMMSIMM & DIMM►Single In-line Single In-line

memory modulememory module►Dual In-line Dual In-line

memory modulememory module►These cards are These cards are

DRAMSDRAMS

http://en.wikipedia.org/wiki/DIMM

Page 52: Computers: How They Work

ROM of three memory locations, ROM of three memory locations, each ‘word’ of memory is 3 bitseach ‘word’ of memory is 3 bits

► Read Only MemoryRead Only Memory► Data contents can Data contents can

not be changednot be changed► Data retained even Data retained even

when power is offwhen power is off► Manufactured with Manufactured with

the datathe data► Used for booting up Used for booting up

computer and loading computer and loading Operating SystemOperating System

► Device Driver Device Driver softwaresoftware

http://www.compeng.dit.ie

Diodes

Page 53: Computers: How They Work

http://tams-www.informatik.uni-hamburg.de

Page 54: Computers: How They Work

Flash MemoryFlash Memory► Type of EEPROM Type of EEPROM

(Electrically Eraseable (Electrically Eraseable Programmable Read Programmable Read Only Memory)Only Memory)

► Using Floating Gate Using Floating Gate Transistors to store Transistors to store bitsbits

► Non-volatile (power Non-volatile (power not needed to not needed to maintain data)maintain data)

► MP3 Players are flash MP3 Players are flash drives with extra drives with extra circuitry to decode circuitry to decode data to analog music data to analog music signalssignals

http://electronicdesign.com/Articles/ArticleID/16383/16383.html

Page 55: Computers: How They Work

Hard DriveHard Drive50-80 50-80

GBytesGBytes► Data stored magneticallyData stored magnetically► Permanent Storage, Permanent Storage, Non-volatile memoryNon-volatile memory► Fast - Spins 4,500 to 12,000 rpmFast - Spins 4,500 to 12,000 rpm► Dense and InexpensiveDense and Inexpensive► Data easily erased and rewrittenData easily erased and rewritten► Iron Oxide or very thin magnetic film applied Iron Oxide or very thin magnetic film applied

with a sputtering process stores magnetic with a sputtering process stores magnetic datadata

http://www.metallurgy.utah.edu/

Page 56: Computers: How They Work

Actuator

Actuator Arm Spindle

Read/Write head

Platter

Page 57: Computers: How They Work

Read-Write Read-Write HeadHead

wikipedia

Multiple Platters

How Stuff Works

www.hddtech.co.uk

Head 20-50 nm from platter surfaceA human hair is 100 nm

Page 58: Computers: How They Work

The voice-coil actuator controls the The voice-coil actuator controls the movement of the actuator armmovement of the actuator arm

► Positions the Positions the read/write headsread/write heads

► Similar to a speaker!Similar to a speaker!► Uses a coil and Uses a coil and

permanent magnetpermanent magnet► Converts electrical Converts electrical

signals into signals into mechanical mechanical movementmovement

► In this picture, In this picture, magnet has been magnet has been moved to the left moved to the left during disassembly to during disassembly to expose the coilexpose the coil

► Coil moves freely Coil moves freely under the magnetunder the magnet

http://www.storagereview.com/guide2000/ref/hdd/op/over.html

Page 59: Computers: How They Work

Small TolerancesSmall Tolerances►5-80 Mbytes/sec media transfer rate5-80 Mbytes/sec media transfer rate►Scaled up to size of Boeing, Scaled up to size of Boeing,

tolerances are equivalent to traveling tolerances are equivalent to traveling at 65 mph at an altitude of 1.5 mmat 65 mph at an altitude of 1.5 mm

As an analogy, a magnetic head slider flying As an analogy, a magnetic head slider flying over a disk surface with a flying height of 25 over a disk surface with a flying height of 25 nm with a relative speed of 20 meters/second nm with a relative speed of 20 meters/second is equivalent to an aircraft flying at a physical is equivalent to an aircraft flying at a physical spacing of 0.2 µm at 900 kilometers/hour. This spacing of 0.2 µm at 900 kilometers/hour. This is what a disk drive experiences during its is what a disk drive experiences during its operation.operation. ””

——Magnetic Storage Systems Beyond 2000, George C. HadjipanayisMagnetic Storage Systems Beyond 2000, George C. Hadjipanayis

Page 60: Computers: How They Work

A Computer is much more than a processorA Computer is much more than a processor….….► Processor Intel® Core™2 Processor Intel® Core™2

Q6600 Quad-Core (8MB L2 Q6600 Quad-Core (8MB L2 cache,2.4GHz,1066FSB)cache,2.4GHz,1066FSB)

► Video Cards 768MB nVidia Video Cards 768MB nVidia GeForce 8800 GTXGeForce 8800 GTX

► Memory 2GB* Dual Channel Memory 2GB* Dual Channel DDR2 SDRAM at 667MHz - 2 DDR2 SDRAM at 667MHz - 2 DIMMsDIMMs

► Hard Drive: 500GB* - Hard Drive: 500GB* - 7200RPM, SATA 3.0Gb/s, 7200RPM, SATA 3.0Gb/s, 16MB Cache16MB Cache

► Optical Drive Single Drive: Optical Drive Single Drive: Blu-ray Disc Drive Blu-ray Disc Drive (BD/DVD/CD burner (BD/DVD/CD burner w/double layer BD writew/double layer BD write

► Monitors 20 inch E207WFP Monitors 20 inch E207WFP Widescreen Digital Flat PanelWidescreen Digital Flat Panel

http://www.dell.com