class 12: computing machines
DESCRIPTION
Constitution Day!Jefferson's Decimal Measurement SystemComputing with ElectricityTransistors and LogicTRANSCRIPT
Class 12: Computing Machines
cs1120 Fall 2011David Evans19 September 2011
Plan
History DetourComputing with Physical StuffDigital AbstractionDigital Logic
Waywiser
Jefferson’s Odometer(bought in 1794)Mapmaker John Rocque
Image: Monticello
Miles and Cents
"The people on the road, inquire with curiosity what exact distance I have found from such a place to such a place; I answer, so many miles, so many cents. I find they universally and at once form a perfect idea of the relation of the cent to the miles as a unit."
Section 8.Clause 1: The Congress shall have Power To lay and collect Taxes, Duties, Imposts and Excises, to pay the Debts and provide for the common Defence and general Welfare of the United States; but all Duties, Imposts and Excises shall be uniform throughout the United States;Clause 2: To borrow Money on the credit of the United States;Clause 3: To regulate Commerce with foreign Nations, and among the several States, and with the Indian Tribes;Clause 4: To establish an uniform Rule of Naturalization, and uniform Laws on the subject of Bankruptcies throughout the United States;Clause 5: To coin Money, regulate the Value thereof, and of foreign Coin, and fix the Standard of Weights and Measures;…(13 more)
17 September 1787
Uniformity in the currency, weights, and measures of the United States is an object of great importance, and will, I am persuaded, be duly attended to.…Nor am I less persuaded that you will agree with me in opinion that there is nothing which can better deserve your patronage than the promotion of science and literature. Knowledge is in every country the surest basis of public happiness.
George Washington, first State of the Union, 8 January 1790
Plan for Establishing Uniformity in the Coinage, Weights, and Measures of the United States. Thomas Jefferson, 4 July 1790
In obedience to the order of the House of Representatives of January 15th, I have now the honor to enclose you a report on the subject of measures, weights, and coins. The length of time which intervened between the date of the order and my arrival in this city, prevented my receiving it till the 15th of April; and an illness which followed soon after added, unavoidably, some weeks to the delay; so that it was not till about the 20th May that I was able to finish the report. A desire to lessen the number of its imperfections induced me still to withhold it awhile, till, on the 15th of June, came to my hands, from Paris, a printed copy of a proposition made by the Bishop of Autun, to the National Assembly of France, on the subject of weights and measures; and three days afterwards I received, through the channel of the public papers, the speech of Sir John Riggs Miller, of April 13th, in the British House of Commons, on the same subject. In the report which I had prepared, and was then about to give in, I had proposed the latitude of 38 degrees, as that which should fix our standard, because it was the medium latitude of the United States; but the proposition before the National Assembly of France, to take that of 45 degrees as being a middle term between the equator and both poles, and a term which consequently might unite the nations of both hemispheres, appeared to me so well chosen, and so just, that I did not hesitate a moment to prefer it to that of 38 degrees. It became necessary, of course, to conform all my calculations to that standard -- an operation which has been retarded by my other occupations.
The experiment made by Congress in the year 1786, by declaring that there should be one money of account and payment through the United States, and that its parts and multiples should be in a decimal ratio, has obtained such general approbation, both at home and abroad, that nothing seems wanting but the actual coinage, to banish the discordant pounds, shillings, pence, and farthings of the different States, and to establish in their stead the new denominations. Is it in contemplation with the House of Representatives to extend a like improvement to our measures and weights, and to arrange them also in a decimal ratio? The facility which this would introduce into the vulgar arithmetic would, unquestionably, be soon and sensibly felt by the whole mass of the people, who would thereby be enabled to compute for themselves whatever they should have occasion to buy, to sell, or to measure, which the present complicated and difficult ratios place beyond their computation for the most part.
Jefferson’s Decimal System
Let the foot be divided Let 10 feet make a decad;
into 10 inches; 10 decads one rood;
The inch into 10 lines; 10 roods a furlong;
The line into 10 points; 10 furlongs a mile.
1799: France adopts the metric system1866: Act to Authorize Use of Metric System1975: Ford signs Metric Conversion Act (“preferred” system) 2011: US still has not adopted a standard system
(along with Burma and Liberia)
Was Jefferson’s Waywiser a “Computer”?
Jefferson’s Odometer(bought in 1794)Mapmaker John Rocque
Image: Monticello
“Computers” until World War II
Universal Mechanical Digital Computer
Machine that can perform all* possible digital computations.
* Except for practical limits on space, energy, time, etc.
#13
Adding With Electricity
1
23Magic?
Lightening Course in Electricity
Matter is made of atoms that contain protons (+) and electrons (-)
ElectronMass: 9.12×10−28 gramsCharge: −1.6×10−19 Coulomb
1500 C 1022 Electrons
Voltage, Current, Resistance
Voltage – amount of electrical charge (Volts)Potential difference water pressure / height
Current – flow of electrical charge (Amps) water flow
Resistance – how much a medium opposes current (ohms) friction
Current (I) = Voltage (V) / Resistance (r)
Power (Watts) = Current (amps) Voltage (Volts)
Current (I) = Voltage (V) / Resistance (r) Power (Watts) = Current (amps) Voltage (Volts)
P = IVI = V/rV = IrP = I(Ir) = I2r
Adder Circuit
2V = V1 + V2
2.3 + 3.5 5.6Equations are precise, but the real world is noisy!
Vannevar Bush’sDifferential Analyzer [1931]
1940: National Defense Research Committee1945: Memex, As We May Think1950: National Science Foundation
Claude Shannon
1916-2001Worked on the Differential Analyzer at MIT
“bit”
Master’s Thesis (MIT, 1937): A Symbolic Analysis of Relay and Switching Circuits
Represents a 1
Represents a 0
Digital Abstraction
0 V
5 V
2 V
3 V
This is wasteful - infinitely many values used to represent only two!But useful: tolerate noise and get exact results with confidence.
Representing Numbers
Use wires carrying electricity: voltage represents the value.
Digital abstraction: < 2V = 0, > 3V = 1Represent numbers using binary
#23
Magic?
1Magic?
23
10
1 0
11
Computing the Outputs
Magic?10
1 0
11
A1 A0 R1
R0
B1 B0R0 = A0 B0
R1 = (A0 B0) A1 B1
What’s the Magic?
#25
control
source
output
If the control is “on”, the source flows to the output. Otherwise, the output is “off”.
A transistor is a device used to amplify or switch electronic signals (like a faucet).
Making TransistorsA transistor is made of a
solid piece of semiconductor material.
A semiconductor is a material that has electrical conductivity that varies dynamically between that of a conductor (on) or an insulator (off).
Silicon is a semiconductor.
Intel Quad-Core Tukwila Processor:2 Billion Transistors for $2201 transistor 65 nanometers
#27
Logic from TransistorsWith transistors it is possible to make two switches:
control
source
output
control
source
output
What logical operation is this?
S C O1 1 11 0 00 1 00 0 0
S C O1 1 01 0 10 1 00 0 0
normal control inverted control
#28
The Notty Transistor
One Trick: what if we wire the source of an inverted control switch to a battery that is always on?
battery(always 1)
control
source
output
S C O1 1 01 0 10 1 00 0 0
C O1 00 1
What logical operation is this?
#29
Boolean Logic
• So, we have (and X Y) and (not X) for bits.(or X Y) = (not (and (not X) (not Y)))(xor X Y) = (and (or x y) (not (and x y)))
• An electronic circuit that operates on bits and implements basic boolean logic is called a gate.
• So far we have and, or, xor and not gates.• That's all we need to add numbers!
Universal Logic
and and not are enough for any Boolean function!
#31
Electronic Digital ComputersBy using semiconductors
which work using physical properties of silicon
We can build transistorswhich are like switches or faucets
To manipulate electrical voltageswhich represent bits
Through logical gateswhich can perform and, not, etc.
Which can implement any Boolean function!
What can’t we compute with a digital computer?
Quiz 2