14
1 Computers Computers History History How to build your own? How to build your own? Sohaib Ahmad Khan Sohaib Ahmad Khan CS101 CS101 - Topical Lecture Topical Lecture 31 31-08 08-2007 2007 What is a computer? What is a computer? Input Processing Output

Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

1

ComputersComputersHistoryHistory

How to build your own?How to build your own?

Sohaib Ahmad KhanSohaib Ahmad KhanCS101 CS101 -- Topical LectureTopical Lecture

3131--0808--20072007

What is a computer?What is a computer?

Input Processing Output

Page 2: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

2

Earliest Computing AidsEarliest Computing Aids

http://www.cee.hw.ac.uk/~greg/calculators/napier/about.html http://www.cs.umass.edu/~weems/C

mpSci535/Discussion2.html

http://65.107.211.206/technology/jacquard.htmlSlide Credit: Prof Slotterbeck, Hiram College

Intricate textile patterns were prized in France in early 1800s. Jacquard’s loom (1805-6) used punched cards to allow only some rods to bring the thread into the loom on each shuttle pass.

Jacquard Loom Jacquard Loom -- A mechanical device that A mechanical device that

influenced early computer designinfluenced early computer design

Page 3: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

3

Sheets of punched cards set the Sheets of punched cards set the

pattern of the weavepattern of the weave

http://65.107.211.206/technology/jacquard.htmlSlide Credit: Prof Slotterbeck, Hiram College

How Can You Make Your Own How Can You Make Your Own

Computer?Computer?

Using Using ‘‘BuntasBuntas’’

Page 4: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

4

The The ‘‘BuntaBunta’’ SwitchSwitch

Input

Output

Input Output

0 0

1 1

Two Two ‘‘BuntaBunta’’ SwitchesSwitches

Input 1

Output

Input 2

Input 1 OutputInput 2

0 0 0

1 0 0

Page 5: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

5

Two Two ‘‘BuntaBunta’’ SwitchesSwitches

Input 1

Output

Input 2

Input 1 OutputInput 2

0 0 0

1 0 0

0 1 0

Two Two ‘‘BuntaBunta’’ SwitchesSwitches

Input 1

Input 2

Input 1 OutputInput 2

0 0 0

1 0 0

0 1 0

Output

1 1 1

AND Operation

Page 6: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

6

Other Operations with two switchesOther Operations with two switches

111111

110011

111100

000000

ResultResult22ndnd

numbernumber11stst

numbernumber

OR Operation

001111

110011

111100

000000

ResultResult22ndnd

numbernumber11stst

numbernumber

XOR Operation

How to make your own computerHow to make your own computer

�� How to make an adder?How to make an adder?

–– Because an adder can be used to make a Because an adder can be used to make a

multipliermultiplier

�� To keep things simple, lets talk To keep things simple, lets talk BINARYBINARY

1st Number 2nd Number Result Carry

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

Page 7: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

7

11--Bit Binary AdderBit Binary Adder

11001111

00110011

00111100

00000000

CarryCarryResultResult22ndnd numbernumber11stst numbernumber

Carry

Result

Input 1

Input 2AND

XOR

SummarySummary

�� Using adders, I can make a large Using adders, I can make a large

computercomputer

�� I can make adders using switchesI can make adders using switches

�� The output of one switch should be able The output of one switch should be able

to toggle another switchto toggle another switch

–– Because I may want to use lots of switches in Because I may want to use lots of switches in

a cascadea cascade

Page 8: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

8

The The ‘‘BuntaBunta’’ ArgumentArgument

�� A computer is just a whole lot of adders A computer is just a whole lot of adders

put togetherput together……

�� I can make a an adder using I can make a an adder using ‘‘buntasbuntas’’

�� Therefore, I can make a computer using Therefore, I can make a computer using

‘‘buntasbuntas’’

Really Large Really Large ‘‘BuntaBunta’’ Computer:Computer:

The The BuntiumBuntiumTMTM

�� Pentium 4 has about 40 million switches in itPentium 4 has about 40 million switches in it

�� Suppose I can make a Suppose I can make a ‘‘buntabunta’’ switch in a 25 cmswitch in a 25 cm22

areaarea

�� Lets put 30% overhead for interLets put 30% overhead for inter--connections connections

between switchesbetween switches

�� Then I need 1.3 billion cmThen I need 1.3 billion cm22, or 130,000 m, or 130,000 m22

areaarea……

�� Other Ideas: I can also make a computer from Other Ideas: I can also make a computer from

water pipes and valveswater pipes and valves…… or light switchesor light switches…… oror……

Page 9: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

9

Charles BabbageCharles Babbage

�� Babbage is known as the Babbage is known as the father of modern computingfather of modern computingbecause he was the first because he was the first person to design a general person to design a general purpose computing device. purpose computing device.

�� In 1822, Babbage began to In 1822, Babbage began to design and build a small design and build a small working model of an working model of an automatic mechanical automatic mechanical calculating machine, which he calculating machine, which he called a "difference engine". called a "difference engine".

�� Example: It could find the Example: It could find the first 30 prime numbers in two first 30 prime numbers in two and a half minutes. and a half minutes.

Source: http://www.sciencemuseum.org.uk/on-line/babbage/page3.asp, Slide Credit: Prof Slotterbeck, Hiram College

In the Science Museum, London

source: http://www.sciencemuseum.org.uk/on-line/babbage/page5.aspSlide Credit: Prof Slotterbeck, Hiram College

The Analytical Engine

The machine was to operate automatically, by steam power, and would require only one attendant.

Page 10: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

10

CurtaCurta Pocket CalculatorsPocket Calculators

�� Mechanical Calculator Mechanical Calculator

that can do complex that can do complex

operationsoperations

�� Circa 1960Circa 1960’’ss

�� Went out of Went out of

production with the production with the

advent of the advent of the

electronic calculatorelectronic calculator

Page 11: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

11

Advent of Modern ComputingAdvent of Modern Computing

�� Vacuum Vacuum

TubesTubes

�� TransistorsTransistors

ENIAC ENIAC –– ((EElectrical lectrical NNumerical umerical IIntegrator ntegrator AAnd nd

CCalculator), built by alculator), built by PresperPresper Eckert and John Eckert and John

MauchlyMauchly at Moore School of Engineering, at Moore School of Engineering,

University of Pennsylvania, 1941University of Pennsylvania, 1941--4646

Often called the first computer (that was electronic, programmable, general purpose and digital).

Page 12: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

12

ENIACENIAC

�� 18,000 vacuum tubes and weighed 30 18,000 vacuum tubes and weighed 30 tonstons

�� Duration of an average run without some failure Duration of an average run without some failure

was only a few hours, although it was predicted was only a few hours, although it was predicted

to not run at all! to not run at all!

�� When it ran, the lights in Philadelphia dimmed!When it ran, the lights in Philadelphia dimmed!

�� ENIAC Stored a maximum of twenty 10ENIAC Stored a maximum of twenty 10--digit digit

decimal numbers. decimal numbers.

�� Input: IBM card readerInput: IBM card reader

�� Output: Punched cards, lightsOutput: Punched cards, lights

ENIACENIAC

Programming required rewiring of the machine,

Source: http://ftp.arl.army.mil/ftp/historic-computers/

Page 13: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

13

Early MicroprocessorEarly Microprocessor

�� Intel 8080, 1975, 4500 transistorsIntel 8080, 1975, 4500 transistors

http://www.cs.washington.edu/people/faculty/lazowska/faculty.lecture/chips/8080.html

The Pentium 4,

which debuted in

2000, sported 42

million

transistors. Dual-

core Itaniums

have more than a

billion.

Credit: Intel

Page 14: Computers - Suraj @ LUMSsuraj.lums.edu.pk/~cs101a07/lectures/Lec1.3.pdf1 Computers History How to build your own? Sohaib Ahmad Khan CS101 -Topical Lecture 31 -08 -2007 What is a computer?

14

ftp://download.intel.com/museum/Moores_Law/Printed_Materials/Moores_Law_2pg.pdf