Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642...

21
Chapter 1 Chapter 1 Computers and Programming Computers and Programming Languages Languages

Transcript of Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642...

Page 1: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

Chapter 1Chapter 1

Computers and Programming Computers and Programming LanguagesLanguages

Page 2: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.1 Mechanical Devices1.1 Mechanical Devices-Pascaline (invented in 1642 by Blaise Pascal)-Pascaline (invented in 1642 by Blaise Pascal)

-complicated set of gears-complicated set of gears

-worked similarly to a clock-worked similarly to a clock

-only performed addition-only performed addition

-never worked properly-never worked properly

-Stepped Reckoner (invented by Gottfried Wilhelm von -Stepped Reckoner (invented by Gottfried Wilhelm von Liebniz)Liebniz)

-suppose to add/subtract/multiply/divide-suppose to add/subtract/multiply/divide

-included a cylindrical wheel-included a cylindrical wheel

-tended to jam and malfunction-tended to jam and malfunction

Page 3: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

-Difference Engine (imagined in 1822 by Charles Babbage)-Difference Engine (imagined in 1822 by Charles Babbage)-was intended to print out numbers to the 40-was intended to print out numbers to the 40thth

placeplace-purpose was to produce navigation tables-purpose was to produce navigation tables-unfortunately never built-unfortunately never built

-Analytical Engine (designed around 1833 by Charles -Analytical Engine (designed around 1833 by Charles Babbage)Babbage)

-supposed to follow a set of instructions stored on -supposed to follow a set of instructions stored on punch punch cardscards

-during processing it was planned to store -during processing it was planned to store information in a information in a memory unit and make decisions memory unit and make decisions based on the stored based on the stored contentcontent

-Although never built its design served as the -Although never built its design served as the template for template for the modern computerthe modern computer

-Ada Byron (collaborator) considered first -Ada Byron (collaborator) considered first programmerprogrammer

-Ada said it could never “originate anything” -Ada said it could never “originate anything” meaning that it meaning that it could not thinkcould not think

Page 4: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.2 Electro Mechanical 1.2 Electro Mechanical DevicesDevices

Tabulating Machine (invented by Herman Hollerith)Tabulating Machine (invented by Herman Hollerith)-invented to compute 1890 census-invented to compute 1890 census-used electricity instead gears to perform -used electricity instead gears to perform

calculationscalculations-holes representing information were punched -holes representing information were punched

in cardsin cards-different locations of the holes represented -different locations of the holes represented

different different info.info.-cut the time to compute the census by over 2 -cut the time to compute the census by over 2

yearsyears

Page 5: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

Mark 1 (completed by team in 1944 led by Howard Aiken)Mark 1 (completed by team in 1944 led by Howard Aiken)

-team was from International Business Machines -team was from International Business Machines (IBM)(IBM)

-used telephone relay switches to store information -used telephone relay switches to store information

-accepted data from punch cards-accepted data from punch cards

-since it could not make decisions about the data it -since it could not make decisions about the data it was was nothing more than a sophisticated calculatornothing more than a sophisticated calculator

-51 feet in length, weighed more than 5 tons, and -51 feet in length, weighed more than 5 tons, and had had 750,000 moving parts750,000 moving parts

Page 6: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.3 First Generation 1.3 First Generation ComputersComputers

Atanasoff-Berry Computer (ABC) – 1Atanasoff-Berry Computer (ABC) – 1stst electronic electronic computercomputer

-built between 1939-1942 -built between 1939-1942

-by John Atanasoff and Clifford Berry-by John Atanasoff and Clifford Berry

-used binary number system of 0’s and 1’s (still -used binary number system of 0’s and 1’s (still used)used)

-contained hundreds of vacuum tubes-contained hundreds of vacuum tubes

-stored numbers by electronically burning holes in -stored numbers by electronically burning holes in paperpaper

-patent application wasn’t handled properly and it -patent application wasn’t handled properly and it took took nearly 50 years for Atanasoff to receive creditnearly 50 years for Atanasoff to receive credit

Page 7: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

ENIAC (Electronic Numerical Integration and ENIAC (Electronic Numerical Integration and Calculator)Calculator)

-Built by John Mauchly & J. Presper Eckert-Built by John Mauchly & J. Presper Eckert

-finished in 1946 (took 3 years)-finished in 1946 (took 3 years)

-originally a secret military project to calculate -originally a secret military project to calculate the the trajectory of artillery shellstrajectory of artillery shells

-in its 1-in its 1stst demonstration it solved a problem that demonstration it solved a problem that took a took a team of mathematicians 3 days to solve team of mathematicians 3 days to solve in less than 20 in less than 20 secondsseconds

-was the size of an average 3 bedroom house-was the size of an average 3 bedroom house

Page 8: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.4 The Stored Program 1.4 The Stored Program ComputerComputer-Alan Turing & John von Neuman both credited -Alan Turing & John von Neuman both credited

with idea of stored programswith idea of stored programs

-EDVAC & EDSAC were 1-EDVAC & EDSAC were 1stst program controlled program controlled computerscomputers

-programs were written in machine language -programs were written in machine language and and stored on paper tapestored on paper tape

-UNIVAC (3-UNIVAC (3rdrd computer to use programs) computer to use programs)

-Used first computer language C-10 written by -Used first computer language C-10 written by Francis HolbertonFrancis Holberton

-These computers were very large and expensive-These computers were very large and expensive

Page 9: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.5 Second Generation 1.5 Second Generation ComputersComputers

-William Shockley, John Bardeen, Walter Brittain -William Shockley, John Bardeen, Walter Brittain of Bell Laboratories invented the of Bell Laboratories invented the transistortransistor in in 19471947

-Transistors were smaller, less expensive, and -Transistors were smaller, less expensive, and faster than vacuum tubesfaster than vacuum tubes

-Model 650 (released in early 1960’s by IBM)-Model 650 (released in early 1960’s by IBM)-1-1stst medium size computer medium size computer

-very popular despite high costs-very popular despite high costs

-Punch cards were replaced by magnetic tape -Punch cards were replaced by magnetic tape giving computers the ability to read and write giving computers the ability to read and write data quickly and reliablydata quickly and reliably

Page 10: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.6 High Level Prog. 1.6 High Level Prog. LanguagesLanguages-Fortran (Developed in 1957 by John Backus and team)-Fortran (Developed in 1957 by John Backus and team)

-introduced commands READ and WRITE-introduced commands READ and WRITE

-COBOL (Developed by Dept of Defense in 1959)-COBOL (Developed by Dept of Defense in 1959)

-ADA (Developed by Dept of Defense in 1970’s)-ADA (Developed by Dept of Defense in 1970’s)

-supports real time applications-supports real time applications

-still commonly used in the banking industry-still commonly used in the banking industry

-BASIC (Developed to teach students in the 1970’s)-BASIC (Developed to teach students in the 1970’s)

-Object Oriented Prog. (OOP) languages were designed -Object Oriented Prog. (OOP) languages were designed in the 1980’s (C++, Java, and Visual Basic are most in the 1980’s (C++, Java, and Visual Basic are most common)common)

Page 11: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.7 Third Generation 1.7 Third Generation ComputersComputers

-Integrated Circuits (IC’s or Chips) -Integrated Circuits (IC’s or Chips)

-developed by Jack Kilby and Robert Noyce in -developed by Jack Kilby and Robert Noyce in the early the early 1960’s1960’s

-One chip could replace hundreds of transistors -One chip could replace hundreds of transistors and and perform millions of calculations per secondperform millions of calculations per second

-They have 2 settings on/off-They have 2 settings on/off

-System 360 (released in 1964 by IBM)-System 360 (released in 1964 by IBM)

-1-1stst computers to use IC’s computers to use IC’s

-Inexpensive enough that universities and -Inexpensive enough that universities and hospitals could hospitals could afford them afford them

-so popular that IBM couldn’t keep up with -so popular that IBM couldn’t keep up with demanddemand

Page 12: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.8 Mainframes1.8 Mainframes-Usually large and kept in their own room-Usually large and kept in their own room

-Used to store and process large amounts of data-Used to store and process large amounts of data

-IBM System 360 was first mainframe-IBM System 360 was first mainframe

-Users used terminals to connect to mainframe-Users used terminals to connect to mainframe

Page 13: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.9 Fourth Generation 1.9 Fourth Generation ComputersComputers-Microprocessor (invented by Marcian Hoff of Intel in 1970)-Microprocessor (invented by Marcian Hoff of Intel in 1970)

-Allowed the development of the microcomputer (desktop)-Allowed the development of the microcomputer (desktop)

-Altair (1-Altair (1stst desktop, built in 1975 by Apple Macintosh) desktop, built in 1975 by Apple Macintosh)

-Designed by Stephen Wozniak & Steven Jobs-Designed by Stephen Wozniak & Steven Jobs

-Used first G.U.I.-Used first G.U.I.

-IBM-PC (released in 1981 by IBM)-IBM-PC (released in 1981 by IBM)

-immediate commercial success due to spreadsheet, -immediate commercial success due to spreadsheet, accounting, and word processing softwareaccounting, and word processing software

-The drop in cost now made the personal computer -The drop in cost now made the personal computer affordable for the publicaffordable for the public

Page 14: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.10 The Personal Computer1.10 The Personal Computer-Physical Components of computer are called hardware-Physical Components of computer are called hardware

-Monitor, keyboard, mouse, CD/DVD drive, case, -Monitor, keyboard, mouse, CD/DVD drive, case, etc.etc.

-Input Devices (keyboard, mouse, CD/DVD drive)-Input Devices (keyboard, mouse, CD/DVD drive)

-Output Devices (Monitors, printers are most -Output Devices (Monitors, printers are most common)common)

-Visual Aide (page 1)-Visual Aide (page 1)

-Motherboard (main circuit board)-Motherboard (main circuit board)

-CPU/ALU-CPU/ALU

-Memory (ROM/RAM/SRAM)-Memory (ROM/RAM/SRAM)

-Bus/Data Bus/Address Bus/Control Bus-Bus/Data Bus/Address Bus/Control Bus

-Visual Aide (page 2)-Visual Aide (page 2)

-Software-Software

-Operating System/Application-Operating System/Application

Page 15: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.11 Networks1.11 Networks-Networks are widely used by businesses, universities, -Networks are widely used by businesses, universities, etc…etc…

-Allows users to reliably share and exchange -Allows users to reliably share and exchange datadata

-Can reduce costs by sharing peripheral devices-Can reduce costs by sharing peripheral devices

-Can be set up to allow users access to only -Can be set up to allow users access to only specific filesspecific files

-Simplifies the backup process-Simplifies the backup process

-Allows users to communicate with email-Allows users to communicate with email

-Classified by Size, Architecture, and Topology-Classified by Size, Architecture, and Topology

-Size (LAN/WAN)-Size (LAN/WAN)

-Architecture (Client-Server/Peer-to-Peer)-Architecture (Client-Server/Peer-to-Peer)

-Topology (BUS/STAR/LOOP)-Topology (BUS/STAR/LOOP)

-Visual Aide (page 3)-Visual Aide (page 3)

Page 16: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.12 Number Systems1.12 Number Systems-3 Common Number Systems (Binary, Decimal, -3 Common Number Systems (Binary, Decimal, Hexadecimal)Hexadecimal)

-Visual Aide (page 4)-Visual Aide (page 4)

-Decimal (base 10) -Decimal (base 10)

-uses numbers 0 – 9 (our common number system)-uses numbers 0 – 9 (our common number system)

-example: 30-example: 30

-Binary (base 2)-Binary (base 2)

-uses numbers 0 & 1 (represents the on/off setting in -uses numbers 0 & 1 (represents the on/off setting in IC’s)IC’s)

-organized into 8-bit units called bytes-organized into 8-bit units called bytes

-example: 0001 1110-example: 0001 1110

-Hexadecimal (base 16)-Hexadecimal (base 16)

-uses numbers 0 – 9 and letters A – F -uses numbers 0 – 9 and letters A – F

-example: 1E-example: 1E

-Unicode (set of 16 0,1’s to represent every letter/symbol)-Unicode (set of 16 0,1’s to represent every letter/symbol)

-Visual Aide (page 6) -Visual Aide (page 6)

Page 17: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.13 Storing Data in 1.13 Storing Data in MemoryMemory-Computer memory, file sizes, and storage device -Computer memory, file sizes, and storage device

capacities are measured in bytes. Large sizes might be capacities are measured in bytes. Large sizes might be in (KB/MB/GB/TB)in (KB/MB/GB/TB)

-Data stored in memory is referred to by an address-Data stored in memory is referred to by an address

-each address has a unique binary representation-each address has a unique binary representation

-storing the name JIM (see Visual Aide – page 5)-storing the name JIM (see Visual Aide – page 5)

Page 18: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.14 Social & Ethical 1.14 Social & Ethical Implications of ComputersImplications of Computers

-Netiquette-Netiquette-Do not attempt to access the account of another -Do not attempt to access the account of another

user user without authorizationwithout authorization

-Do not share your password and change it -Do not share your password and change it periodicallyperiodically

-Use appropriate subject matter and language, and -Use appropriate subject matter and language, and be be considerate of other people’s beliefs and opinionsconsiderate of other people’s beliefs and opinions

-Laws to protect privacy-Laws to protect privacy-Fair Credit Reporting Act of 1970-Fair Credit Reporting Act of 1970

-Privacy Act of 1974-Privacy Act of 1974

-Financial Privacy Act of 1978-Financial Privacy Act of 1978

-Electronic Communications Act of 1986-Electronic Communications Act of 1986

-Electronic Freedom of Information Act of 1996-Electronic Freedom of Information Act of 1996

-Safety and Freedom through Encryption Act of 1999-Safety and Freedom through Encryption Act of 1999

Page 19: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.15 Protecting Computer 1.15 Protecting Computer Software and DataSoftware and Data

-Piracy (software, music, and movies)-Piracy (software, music, and movies)

-Precautions to avoid viruses-Precautions to avoid viruses

-Install antivirus software and update frequently-Install antivirus software and update frequently

-Enable a firewall-Enable a firewall

-Monitor downloads from unknown sources -Monitor downloads from unknown sources (email/internet)(email/internet)

Page 20: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

1.16 Ethical Responsibilities of 1.16 Ethical Responsibilities of the Programmerthe Programmer

-Create programs that will “always” operate properly-Create programs that will “always” operate properly

-Test, debug, and collaborate to ensure this-Test, debug, and collaborate to ensure this

-plan for errors for if and when they do happen-plan for errors for if and when they do happen

-Remember computers are being used more -Remember computers are being used more frequently in areas where judgment is required, and frequently in areas where judgment is required, and computers can only follow instructions so they must computers can only follow instructions so they must be comprehensive and correctbe comprehensive and correct

Page 21: Chapter 1 Computers and Programming Languages. 1.1 Mechanical Devices -Pascaline (invented in 1642 by Blaise Pascal) -complicated set of gears -worked.

Chapter 1 ReviewChapter 1 Review