Babbage Difference Engine Simulation

Total Page:16

File Type:pdf, Size:1020Kb

Babbage Difference Engine Simulation Shashwat Singh Prof. Brian L. Stuart CS 164-A November 21, 2016 Babbage Difference Engine Simulation A difference engine is an automatic mechanical calculator designed to tab- ulate polynomial functions. The name derives from the method of divided differ- ences, a way to interpolate or tabulate functions by using a small set of polyno- mial coefficients. Most mathematical functions commonly used by engineers, sci- entists and navigators, including logarithmic and trigonometric functions, can be approximated by polynomials, so a difference engine can compute many useful tables of numbers. The historical difficulty in producing error-free tables by teams of mathematicians and human "computers" spurred Charles Babbage's desire to build a mechanism to automate the process. It is considered to be the world's first computer. Difference Engine Simulator ( Javascript ): Approach: • I created around 8-9 variables to store different values and assigned them to the various input boxes. • Then I created a new ‘calculate()’ function and assigned it to the start button. Inside the calculate() function are inputs gathered from text boxes are assigned inside parseInt() and ParseFloat(). • Then I used ‘for’ loop inside the ‘calculate’ function in order to process and calculate the values, thus storing and outputting the values shown in the text box. How it works: • Initially there are total of 8 text boxes in the simulator. • User must fill numbers in them and press the start button to com- pute. • When the start button is pressed, the calculation will output in the large text box under the input fields with the number of rows mentioned in the “rows” input box. • To re-start the whole process, user can press the reload button. Test: • Attached below is the screenshot for the values given in the as- signment up to 100 rows. • In addition to this, it was also tested with y = x4 ( — here derivatives are : y=0, ∆y = 0, ∆2y = 0 , ∆3y = 0, ∆4y = 24, ∆5y = 0 ) Data for y = x4 00000240 100024240 2002448240 30247272240 4249614496240 5120240240120240 6360480360144240 7840840504168240 816801344672192240 930242016864216240 10 5040 2880 1080 240 24 0 11 7920 3960 1320 264 24 0 12 11880 5280 1584 288 24 0 13 17160 6864 1872 312 24 0 14 24024 8736 2184 336 24 0 15 32760 10920 2520 360 24 0 16 43680 13440 2880 384 24 0 17 57120 16320 3264 408 24 0 18 73440 19584 3672 432 24 0 19 93024 23256 4104 456 24 0 20 116280 27360 4560 480 24 0 Simulator Link — http://www.pages.drexel.edu/~ss4335/engine.html References : Difference Engine Intro. In Wikipedia. Retrieved November 20th 2016, from https://en.wikipedi- a.org/wiki/Difference_engine.
Recommended publications
  • "Computers" Abacus—The First Calculator
    Component 4: Introduction to Information and Computer Science Unit 1: Basic Computing Concepts, Including History Lecture 4 BMI540/640 Week 1 This material was developed by Oregon Health & Science University, funded by the Department of Health and Human Services, Office of the National Coordinator for Health Information Technology under Award Number IU24OC000015. The First "Computers" • The word "computer" was first recorded in 1613 • Referred to a person who performed calculations • Evidence of counting is traced to at least 35,000 BC Ishango Bone Tally Stick: Science Museum of Brussels Component 4/Unit 1-4 Health IT Workforce Curriculum 2 Version 2.0/Spring 2011 Abacus—The First Calculator • Invented by Babylonians in 2400 BC — many subsequent versions • Used for counting before there were written numbers • Still used today The Chinese Lee Abacus http://www.ee.ryerson.ca/~elf/abacus/ Component 4/Unit 1-4 Health IT Workforce Curriculum 3 Version 2.0/Spring 2011 1 Slide Rules John Napier William Oughtred • By the Middle Ages, number systems were developed • John Napier discovered/developed logarithms at the turn of the 17 th century • William Oughtred used logarithms to invent the slide rude in 1621 in England • Used for multiplication, division, logarithms, roots, trigonometric functions • Used until early 70s when electronic calculators became available Component 4/Unit 1-4 Health IT Workforce Curriculum 4 Version 2.0/Spring 2011 Mechanical Computers • Use mechanical parts to automate calculations • Limited operations • First one was the ancient Antikythera computer from 150 BC Used gears to calculate position of sun and moon Fragment of Antikythera mechanism Component 4/Unit 1-4 Health IT Workforce Curriculum 5 Version 2.0/Spring 2011 Leonardo da Vinci 1452-1519, Italy Leonardo da Vinci • Two notebooks discovered in 1967 showed drawings for a mechanical calculator • A replica was built soon after Leonardo da Vinci's notes and the replica The Controversial Replica of Leonardo da Vinci's Adding Machine .
    [Show full text]
  • Analytical Engine, 1838 ALLAN G
    Charles Babbage’s Analytical Engine, 1838 ALLAN G. BROMLEY Charles Babbage commenced work on the design of the Analytical Engine in 1834 following the collapse of the project to build the Difference Engine. His ideas evolved rapidly, and by 1838 most of the important concepts used in his later designs were established. This paper introduces the design of the Analytical Engine as it stood in early 1838, concentrating on the overall functional organization of the mill (or central processing portion) and the methods generally used for the basic arithmetic operations of multiplication, division, and signed addition. The paper describes the working of the mechanisms that Babbage devised for storing, transferring, and adding numbers and how they were organized together by the “microprogrammed” control system; the paper also introduces the facilities provided for user- level programming. The intention of the paper is to show that an automatic computing machine could be built using mechanical devices, and that Babbage’s designs provide both an effective set of basic mechanisms and a workable organization of a complete machine. Categories and Subject Descriptors: K.2 [History of Computing]- C. Babbage, hardware, software General Terms: Design Additional Key Words and Phrases: Analytical Engine 1. Introduction 1838. During this period Babbage appears to have made no attempt to construct the Analytical Engine, Charles Babbage commenced work on the design of but preferred the unfettered intellectual exploration of the Analytical Engine shortly after the collapse in 1833 the concepts he was evolving. of the lo-year project to build the Difference Engine. After 1849 Babbage ceased designing calculating He was at the time 42 years o1d.l devices.
    [Show full text]
  • A Bibliography of Publications By, and About, Charles Babbage
    A Bibliography of Publications by, and about, Charles Babbage Nelson H. F. Beebe University of Utah Department of Mathematics, 110 LCB 155 S 1400 E RM 233 Salt Lake City, UT 84112-0090 USA Tel: +1 801 581 5254 FAX: +1 801 581 4148 E-mail: [email protected], [email protected], [email protected] (Internet) WWW URL: http://www.math.utah.edu/~beebe/ 08 March 2021 Version 1.24 Abstract -analogs [And99b, And99a]. This bibliography records publications of 0 [Bar96, CK01b]. 0-201-50814-1 [Ano91c]. Charles Babbage. 0-262-01121-2 [Ano91c]. 0-262-12146-8 [Ano91c, Twe91]. 0-262-13278-8 [Twe93]. 0-262-14046-2 [Twe92]. 0-262-16123-0 [Ano91c]. 0-316-64847-7 [Cro04b, CK01b]. Title word cross-reference 0-571-17242-3 [Bar96]. 1 [Bab97, BRG+87, Mar25, Mar86, Rob87a, #3 [Her99]. Rob87b, Tur91]. 1-85196-005-8 [Twe89b]. 100th [Sen71]. 108-bit [Bar00]. 1784 0 [Tee94]. 1 [Bab27d, Bab31c, Bab15]. [MB89]. 1792/1871 [Ynt77]. 17th [Hun96]. 108 000 [Bab31c, Bab15]. 108000 [Bab27d]. 1800s [Mar08]. 1800s-Style [Mar08]. 1828 1791 + 200 = 1991 [Sti91]. $19.95 [Dis91]. [Bab29a]. 1835 [Van83]. 1851 $ $ $21.50 [Mad86]. 25 [O’H82]. 26.50 [Bab51a, CK89d, CK89i, She54, She60]. $ [Enr80a, Enr80b]. $27.95 [L.90]. 28 1852 [Bab69]. 1853 [She54, She60]. 1871 $ [Hun96]. $35.00 [Ano91c]. 37.50 [Ano91c]. [Ano71b, Ano91a]. 1873 [Dod00]. 18th $45.00 [Ano91c]. q [And99a, And99b]. 1 2 [Bab29a]. 1947 [Ano48]. 1961 Adam [O’B93]. Added [Bab16b, Byr38]. [Pan63, Wil64]. 1990 [CW91]. 1991 Addison [Ano91c]. Addison-Wesley [Ano90, GG92a]. 19th [Ano91c]. Addition [Bab43a]. Additions [Gre06, Gre01, GST01].
    [Show full text]
  • Analytical Engine: the Orig- Inal Computer
    Chapter 2 Analytical Engine: The Orig- inal Computer As we learned in the fourth grade science course, back in 1801, a French man, Joseph Marie Jacquard, invented a power loom that could weave textiles, which had been done for a long time by hand. More interestingly, this machine can weave tex- tiles with patterns such as brocade, damask, and matelasse by controlling the operation with punched wooden cards, held together in a long row by rope. 1 How do these cards work? Each wooden card comes with punched holes, each row of which corresponds to one row of the design. In each position, if the needle needs to go through, there is a hole; other- wise, there is no hole. Multiple rows of holes are punched on each card and all the cards that compose the design of the textile are hooked together in order. 2 What do we get? With the control of such cards, needs go back and forth, moving from left to the right, row by row, and come up with something like the following: Although the punched card concept was based on some even earlier invention by Basile Bou- chon around 1725, “the Jacquard loom was the first machine to use punch cards to con- trol a sequence of operations”. Let’s check out a little demo as how Jacquard’s machine worked. 3 Why do we talk about a loom? With Jacquard loom, if you want to switch to a different pattern, you simply change the punched cards. By the same token, with a modern computer, if you want it to run a different application, you simply load it with a different program, which used to keep on a deck of paper based punched cards.
    [Show full text]
  • History of Computing Prehistory – the World Before 1946
    Social and Professional Issues in IT Prehistory - the world before 1946 History of Computing Prehistory – the world before 1946 The word “Computing” Originally, the word computing was synonymous with counting and calculating, and a computer was a person who computes. Since the advent of the electronic computer, it has come to also mean the operation and usage of these machines, the electrical processes carried out within the computer hardware itself, and the theoretical concepts governing them. Prehistory: Computing related events 750 BC - 1799 A.D. 750 B.C. The abacus was first used by the Babylonians as an aid to simple arithmetic at sometime around this date. 1492 Leonardo da Vinci produced drawings of a device consisting of interlocking cog wheels which could be interpreted as a mechanical calculator capable of addition and subtraction. A working model inspired by this plan was built in 1968 but it remains controversial whether Leonardo really had a calculator in mind 1588 Logarithms are discovered by Joost Buerghi 1614 Scotsman John Napier invents an ingenious system of moveable rods (referred to as Napier's Rods or Napier's bones). These were based on logarithms and allowed the operator to multiply, divide and calculate square and cube roots by moving the rods around and placing them in specially constructed boards. 1622 William Oughtred developed slide rules based on John Napier's logarithms 1623 Wilhelm Schickard of Tübingen, Württemberg (now in Germany), built the first discrete automatic calculator, and thus essentially started the computer era. His device was called the "Calculating Clock". This mechanical machine was capable of adding and subtracting up to 6 digit numbers, and warned of an overflow by ringing a bell.
    [Show full text]
  • Intro to Computers Where Did They Come From? Part 1 - Pre-1940S Define Computer
    Intro to Computers Where did they come from? Part 1 - Pre-1940s Define Computer Man vs. Machine Define Computer 1600’s Definition: -Someone who makes calculations. Late 1800’s Definition: -A machine that makes calculations. Modern Definition: -An electronic device used for storing and processing data Lets go back to the beginning! Computers exist because of math. One of the earliest “calculators” is called the Abacus. -Been around for 1000s of years Online Abacus https://www.online-calculator.com/full-screen-abacus/ The Next Big Step! Gottfried Wilhelm Leibniz invented the Stepped Reckoner in 1672. Stepped Reckoner -Made calculations using a gear mechanism called the Leibniz Wheel. -The first machine that could add, subtract, multiply, and divide Leibniz Wheel -or stepped drum is a cylinder with a set of teeth of incremental lengths -Was used for over 200 years in calculating Machines. -Even into the 1970s And then came this guy... Charles Babbage -Babbage saw a better way of crunching numbers -In 1823 he began construction on the Difference Engine -A machine able to do complex calculations and output tables of numbers. Difference Engine -Babbage used a loan from the British government to make the Difference Engine -Due to the inability to make precise metal parts for cheap, Babbage never fully constructed the Difference Engine and the project was abandoned. -In 2000, a Difference Engine was fully built to celebrate Babbage’s 200th birthday. The machine actually worked! This settled the debate on whether his idea would really operate. Difference Engine Analytical Engine -While attempting to construct the Difference Engine, Babbage designed an even more complex machine called the Analytical Engine -This machine was never built, but was the first design of a machine that had memory and could be programmed, thus, making it the first computer as we think of them today.
    [Show full text]
  • History in the Computing Curriculum 6000 BC to 1899 AD
    History in the Computing Curriculum Appendix A1 6000 BC to 1899 AD 6000 B.C. [ca]: Ishango bone type of tally stick in use. (w) 4000-1200 B.C.: Inhabitants of the first known civilization in Sumer keep records of commercial transactions on clay tablets. (e) 3000 B.C.: The abacus is invented in Babylonia. (e) 1800 B.C.: Well-developed additive number system in use in Egypt. (w) 1300 B.C.: Direct evidence exists as to the Chinese using a positional number system. (w) 600 B.C. [ca.]: Major developments start to take place in Chinese arithmetic. (w) 250-230 B.C.: The Sieve of Eratosthenes is used to determine prime numbers. (e) 213 B.C.: Chi-Hwang-ti orders all books in China to be burned and scholars to be put to death. (w) 79 A.D. [ca.]: "Antikythera Device," when set correctly according to latitude and day of the week, gives alternating 29- and 30-day lunar months. (e) 800 [ca.]: Chinese start to use a zero, probably introduced from India. (w) 850 [ca.]: Al-Khowarizmi publishes his "Arithmetic." (w) 1000 [ca.]: Gerbert describes an abacus using apices. (w) 1120: Adelard of Bath publishes "Dixit Algorismi," his translation of Al-Khowarizmi's "Arithmetic." (w) 1200: First minted jetons appear in Italy. (w) 1202: Fibonacci publishes his "Liber Abaci." (w) 1220: Alexander De Villa Dei publishes "Carmen de Algorismo." (w) 1250: Sacrobosco publishes his "Algorismus Vulgaris." (w) 1300 [ca.]: Modern wire-and-bead abacus replaces the older Chinese calculating rods. (e,w) 1392: Geoffrey Chaucer publishes the first English-language description on the uses of an astrolabe.
    [Show full text]
  • Speculations on Percy Ludgate's Difference Engine
    1 Speculations on Percy Ludgate’s Difference Engine Brian Coghlan Abstract In Percy Ludgate’s 1914 paper for the Napier Tercentenary Exhibition he briefly mentioned that he had designed a simplified difference engine. This paper speculates on how that might have worked. This paper is a work in progress . Index Terms —Percy Ludgate, Analytical Machine, Difference Engine I. INTRODUCTION 1 ERCY Edwin Ludgate (1883-1922) is notable as the second person to publish a design for an Analytical Machine [1][2], P the first after Charles Babbage’s “Analytical Engine” [4]. An analytical machine is equivalent to a general-purpose computer, and in theory can be programmed to solve any solvable problem. It is “Turing complete”, a term invented to reflect Alan Turing’s contribution to the theory of computing. There were only two mechanical designs before the electronic computer era: in 1843 Babbage’s “analytical engine”, then in 1909 Ludgate’s very different “analytical machine”. Babbage only started work on his Analytical Engine in c.1834 when his intensive efforts to design and make a difference engine faltered. This machine was intended to evaluate polynomials using Newton's method of divided differences in order to produce mathematical and nautical tables. In 1914 Ludgate published a paper for the Napier Tercentenary Exhibition [3] (hereafter called “Ludgate 1914”) in which he briefly mentioned that he had designed a simplified difference engine. This paper speculates on how that might have worked. II. DIFFERENCE ENGINES II.1. Babbage’s Difference Engine Charles Babbage is shown in Figure 2(a), drawn late in his life.
    [Show full text]
  • Blaise Pascal's Mechanical Calculator
    machines Article Blaise Pascal’s Mechanical Calculator: Geometric Modelling and Virtual Reconstruction José Ignacio Rojas-Sola 1,* , Gloria del Río-Cidoncha 2 , Arturo Fernández-de la Puente Sarriá 3 and Verónica Galiano-Delgado 4 1 Department of Engineering Graphics, Design and Projects, University of Jaén, 23071 Jaén, Spain 2 Department of Engineering Graphics, University of Seville, 41092 Seville, Spain; [email protected] 3 Department of Design Engineering, University of Seville, 41011 Seville, Spain; [email protected] 4 University of Seville, 41092 Seville, Spain; [email protected] * Correspondence: [email protected]; Tel.: +34-9-5321-2452 Abstract: This article shows the three-dimensional (3D) modelling and virtual reconstruction of the first mechanical calculating machine used for accounting purposes designed by Blaise Pascal in 1642. To obtain the 3D CAD (computer-aided design) model and the geometric documentation of said invention, CATIA V5 R20 software has been used. The starting materials for this research, mainly the plans of this arithmetic machine, are collected in the volumes Oeuvres de Blaise Pascal published in 1779. Sketches of said machine are found therein that lack scale, are not dimensioned and certain details are absent; that is, they were not drawn with precision in terms of their measurements and proportions, but they do provide qualitative information on the shape and mechanism of the machine. Thanks to the three-dimensional modelling carried out; it has been possible to explain in detail both its operation and the final assembly of the invention, made from the assemblies of its different Citation: Rojas-Sola, J.I.; del subsets. In this way, the reader of the manuscript is brought closer to the perfect understanding of Río-Cidoncha, G.; Fernández-de la the workings of a machine that constituted a major milestone in the technological development of Puente Sarriá, A.; Galiano-Delgado, V.
    [Show full text]
  • Copyrighted Material
    ◆ INVENTORS AND INVENTIONS ◆ Eli Whitney THE COTTON GIN The first patent of major importance to be issued by the U.S. government after it was formed was Eli Whitney’s patent for the cotton gin (“gin” is short for “engine”), which was issued on March 14, 1794. The patent description is in longhand, for reasons I cannot explain. Upon graduating Yale as an engineer in 1792, Whitney, like many college graduates of today, found himself in debt and in need of a job. He left his home in Massachusetts and took a job as a teacher in South Carolina. That job fell through, and Katherine Greene, the war widow of General Nathanial Greene, invited Whitney to stay at her Georgia cotton plantation in early 1793. He noticed that long‐staple cotton, which was readily separated from its seed, could only be grown along the coast. The inland‐ grown variety of cotton had sticky green seeds that were difficult to cull from the fluffy white cotton bolls,COPYRIGHTED and thus was less profitable to MATERIALgrow and harvest. It took 10 hours of hand labor to sift out a single point of cotton lint from its seeds. Whitney, after observing the manual process being used for separating the sticky seeds from the cotton bolls, built his first machine, which did not work. The bulk cotton was pushed against a wire mesh screen, which held back the seeds while wooden Intellectual Property Law for Engineers, Scientists, and Entrepreneurs, Second Edition. Howard B. Rockman. © 2020 by The Institute of Electrical and Electronics Engineers, Inc.
    [Show full text]
  • CBC-Index.Pdf
    257 Index A AARAcomputer, 220 Aiken, Howard, viii, 96,203, Abacus, 7 213-219,224 contest of speed, 7 first proposals, 214 counters, 12 IBM, 215 demise, 7 influence of, 219 English, 12 Amsler, Jacob, 168 European, 8 Amsler planimeter. See Planimeters Gerbert’s, 35 Analog calculation, 156 Greek, 8-9 accuracy of, 157 Inca, 8 addition, 160,162 origins, 7,lO Analog computers Roman, 10 electrical, 191-194 Russian, 13 Analog computing devices, 156-204. soroban, 7, 15 See also Differential analyzer spread of, 14-15 accuracy, 157,160,162,195-196 swanpan, 7,14 approximating complex table, 10-11 functions, 166 ABC, 226-230 electrical, 177-178 components, 228 harmonic analyzer, 158,172-176, control, 228 180 failure, 230 harmonic synthesizer, 172, 177 genesis of, 227 integrators, 167-174, 179- 185, Mauchly’s visit to, 238 187 operation, 229 isograph, 177 use, 228 multipliers, 160 Abel computer, 220 network analyzer, 178 Accounting and Tabulating Machine noise in, 162, 195 Corporation, 137 resolver, 158-159, 172, 194 Accounting machines, 122-155 tide predictors, 162, 172-176 Accumulator, 215. See also ENLAC Analogue, word origin, 247 Addition, analog, 160,162 Analog versus digital techniques, 1% Additive number system, 5 Analytical engine, 59-60,67,75-9 1, Computing Before Computers 258 Analytical engine (cont.) Automata, 100-101 200,203. See also Babbage, Automata theory, 119 Charles; Ludgate, Percy; Torres y Automatic Sequence Controlled Quevedo, Leonard0 Calculator. See ASCC arithmetic operations, 82-83 barrel control, 85 construction, 90 B Babbage, Benjamin, 60 control mechanism, 85-86 Babbage, Charles, viii, 3,60-62,66, design, 8 1,90 75-91,200.
    [Show full text]
  • Mechanical Calculator (Edited from Wikipedia)
    Mechanical Calculator (Edited from Wikipedia) SUMMARY A mechanical calculator, or calculating machine, was a mechanical device used to automatically perform the basic operations of arithmetic. Most mechanical calculators were comparable in size to small desktop computers and have been rendered obsolete by the advent of the electronic calculator. Surviving notes from Wilhelm Schickard in 1623 report that he designed and had built the earliest of the modern attempts at mechanizing calculation. His machine was composed of two sets of technologies: first an abacus made of Napier's bones, to simplify multiplications and divisions. And for the mechanical part, it had a dialed pedometer to perform additions and subtractions. A study of the surviving notes shows a machine that would have jammed after a few entries on the same dial, and that it could be damaged if a carry had to be propagated over a few digits (like adding 1 to 999). Schickard abandoned his project in 1624 and never mentioned it again until his death eleven years later in 1635. Two decades after Schickard's failed attempt, in 1642, Blaise Pascal decisively solved these particular problems with his invention of the mechanical calculator. Helping his father as tax collector in France, Pascal designed the calculator to help in the large amount of tedious arithmetic required.; it was called Pascal's Calculator or Pascaline. Thomas' arithmometer, the first commercially successful machine, was manufactured two hundred years later in 1851; it was the first mechanical calculator strong enough and reliable enough to be used daily in an office environment. For forty years the arithmometer was the only type of mechanical calculator available for sale.
    [Show full text]