computer components vacuum tubes - wofford...

13
1 Computers: Inside and Out Questions What does it mean when we say that a computer represents information in binary form? What does this imply about the most basic components of a computer? Computer Components To store binary information the most basic components of a computer must exist in two states State # 1 = 1 State # 2 = 0 Vacuum Tubes Early computers used vacuum tubes to represent binary information. How could a vacuum tube do this? Triode

Upload: others

Post on 03-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

1

Computers: Inside and Out

Questions

� What does it mean when we say that a computer represents information in binary form?

� What does this imply about the most basic components of a computer?

Computer Components

� To store binary information the most basic components of a computer must exist in two states

� State # 1 = 1

� State # 2 = 0

Vacuum Tubes

� Early computers used vacuum tubes to represent binary information.

� How could a vacuum tube do this?

Triode

Page 2: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

2

Vacuum Tubes

� If grid is positive, the plate can attract electrons –current flows

� Negative grid repels electrons – current doesn’t flow

What problems would vacuum tubes have for use in computers?

Transistors

� Computers now use transistors

� Small solid-state devices

� Several advantages

� Small

� Don’t burn out

� Don’t generate as much heat

Deep Inside: Transistors Deep Inside: Transistors

� Most basic component of a computer

� Key active component in all modern electronics, including computers

� Probably one of the greatest inventions in modern history

Page 3: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

3

Transistors

� “Solid-state” because made of a solid, usually slightly impure silicon

� Field effect transistor shown here

� Controls the flow of current

� Current flowing = “on”

� No current = “off”

Transistors

� Transistors can be combined to do sophisticated operations

� What kind of Boolean operator does the combination below represent?

Transistors

� This is an AND gate

� Both “A” and “B” must be true for the current to flow

� How would you make an OR gate?

Integrated Circuits

Page 4: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

4

Integrated Circuits

� Decrease magnification of our imaginary microscope a bit

� We see that transistors are part of small chips called “integrated circuits.”

� What is the “big idea” discussed in your text that makes integrated circuits so revolutionary?

Integrated Circuits

� Small transistors are not useful if they are separate parts that must be wired together by hand or machines.

� The “big idea”: Manufacture the entire circuit in layers, laying down transistors, wires, etc. at the same time

Integrated Circuits

� Fabricate in layers

� Each layer contains millions of “wires” and transistor pieces

� Chip made of millions of transistors and other components

Integrated Circuits

� Many ICs fabricated at once in a wafer

� Formed by photolithography� Cover silicon with a pattern

� Remove part of silicon not under pattern

� Remove pattern

� Repeat process for next layer

Page 5: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

5

Photolithography 1

1. http://bmrc.berkeley.edu/courseware/ICMfg92/images/gif/photolith.gif

Moore’s Law

� Attributed to Gordon Moore

� Co-founder of Intel

Moore’s Law

� The complexity of ICs per dollar doubles about every 24 months

� Every two years you will be able to get about twice the computing power for the same amount of money

Integrated Circuits

� Can this go on forever?

Page 6: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

6

Integrated Circuits

� May reach physical limits eventually

� May get too small for photolithography

� Quantum effects may cause “leakage” of electrons within transistors

� Cost of fabrication plants are climbing

� May need other technologies

Central Processing Unit (CPU)

� The CPU is an Integrated Circuit

� Also called “processor” or “microprocessor”

CPU

� Contains Arithmetic and Logic Unit (ALU) and Control Unit

� Shown here with other components of computer

Peripherals

Memory

� Divided into 8-bit (1-byte) locations

� Each location stores one 8-bit binary number such as 00110010

� Each location has an address

Page 7: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

7

CPU

� Look at CPUs that conform to the Von Neumann architecture

� Named after John Von Neumann

� Instructions and data stored together in memory

� Retrieved in the same way by the CPU

� Use the Fetch/Execute cycle

Fetch/Execute Cycle

� Instructions and data both are stored in RAM

� Beginning: All the CPU knows is the memory address for the next instruction

� What would be the general process for executing that instruction?

Fetch/Execute Cycle

� General process is the following:

� Get instructions from memory

� Get data needed by instructions from memory

� Operate on data according to instructions

� Put resulting data back into memory

Fetch/Execute Cycle

� Actually this takes place in five steps

� Fetch instructions

� Decode instructions

� Fetch data

� Execute instructions

� Return results

Page 8: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

8

Fetch/Execute Cycle

� Controlled by the Control Unit

� Next few slides will follow example in text

� pp 236 – 239

Fetch/Execute Cycle

� Step 1: Instruction Fetch

Fetch/Execute Cycle

� Step 2: Decode Instructions

Fetch/Execute Cycle

� Step 3: Fetch Data

Page 9: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

9

Fetch/Execute Cycle

� Step 4: Execute Instructions

Fetch/Execute Cycle

� Step 5: Return results

Fetch Execute Cycle

� Computer’s operations are all like the one illustrated

� Very simple in general� Basic arithmetic: Add, multiply, divide

� Tests: Are two things both true? Is one of them?

� Move data and instructions around

� Computer does these over and over and over

What Computers Cannot Do

� Computers are deterministic.

� What does this mean?

� What does this imply about how computers are not like people?

Page 10: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

10

What Computers Cannot Do

� See p. 228 of your text

� Computers are not creative

� They have no intuition

� They are literal – no sense of humor or irony

� They are not purposeful.

Central Clock

� Computer’s clock controls rate of Fetch/Execute cycle

� Fast clock means more instructions can be accomplished

� 2 GHz clock speed => 2 billion instructions per second

� Need pipelining to accomplish this

Instruction Pipelines

� The Fetch/Execute cycle is wasteful

� Example: During Execute Instructions step, the Fetch data hardware is idle

Instruction Pipelines

� Want to keep all units busy as much as possible

� Use clock to start an instruction

� Then pass instruction off to other components

Page 11: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

11

Instruction Pipelines

� Tick 1 Tick 2 Tick 3 Tick 4 Tick 5

� Fetch Inst 1 Decode 1 Fetch Data 1 Execute 1 Return

� Fetch Inst 2 Decode 2 Fetch Data 2 Execute 2

� etc

Instruction Pipelines

� Pentium 4 processor has a 20-stage pipeline

� Long pipelines allow many instructions to be executed simultaneously

� Downside of long pipeline – program branches

Program Branches

� Illustrate with IF . . . THEN . . . statement from higher level language

� Suppose A = 6. What will this statement do?

� IF A < 10

� THEN Print “Yes”

� ELSE Print “No”

Program Branches

� Results of branches cannot be predicted� When program branches, processor must wait for result� Can’t do anything else until it knows result. � Loses advantage of pipelining

� Office software (such as word processing)� Many branches.� Lose some of efficiency of pipelining� Increase in processor power does not necessarily translate into a proportional increase in performance.

Page 12: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

12

Software

� Software is the set of instructions that tell the computer what to do

� At the computer level, these all are in binary form

� Sequence of binary digits

� 10001111 10010100 00000011 01110100

� 10001111 10011000 00000001 10101100

Operating Systems

� Software that controls and manages the computer’s hardware

� Provides foundation for application software to run

� Our interface with the machine� Basically, its “personality”

� What are common operating systems in use today?

Programming Languages

� Computers process instructions in binary

� Humans find it hard to work directly in binary

� Need some other way of developing the instructions

� Use a two-step process

� Humans develop instructions using programming language

� Computer translates programming language into binary.

Implementation #1: Compilation

� Humans write instructions using a programming language

� Computer translates entire set of instructions into binary

� Done with a program called a “compiler”

� Computer runs compiled binary code

� Advantage: Faster running

� Disadvantage: Harder to develop

Page 13: Computer Components Vacuum Tubes - Wofford Collegewebs.wofford.edu/whisnantdm/Courses/xxxxxxxx/s/CS... · 2008-03-06 · 3 Transistors “Solid-state” because made of a solid, usually

13

Implementation #2: Interpretation

� Humans write instructions using a programming language

� Computer reads these instructions without prior translation

� Interpreter in the computer translates instructions into binary “on the fly”

� Advantage: Easier to develop

� Disadvantage: Slower

Programming Languages

� First programming language was called “assembly language”

� One line of code for each computer instruction

� Example statement: ADD 20, 20, 24

� Still hard to use

Programming Languages

� High level languages

� Code is condensed and easier to read

� Example

� FOR I = 1 to 10

� X = 2*I

� PRINT X

� NEXT I

� Easier to use, but still need training

� Examples: C++, Python, Perl, PHP

Application Software

� Software that makes it possible for ordinary people to use computers

� Word processors, spreadsheets, etc.

� Users no longer need be programmers