Download presentation
Presentation is loading. Please wait.
1
Programming What?! How?!
2
Computer = Powerful + Stupid
Fundamental Equation Computer = Powerful + Stupid
3
Computer = Powerful + Stupid
Billions of "operations" per second looking through masses of a data
4
Computer = Powerful + Stupid
individual "operations" extremely simple and mechanical nothing like human thought or insight computer is not a magic box requires a human to tell it what to do
5
How Does a Computer Work?
Driven by “code” Code is made of simple, mechanical instructions The computer runs the series of instructions
6
If So Stupid..Why So Useful?
7
If So Stupid..Why So Useful?
Programmer thinks of a useful feature Thinks through the solution Breaks it down, directs computer Writes code for the computer Combine the best features of both sides: insight + inexpensive/fast
8
So How does the Programmer Program?
9
Programming Languages
Write instructions in programming language General Types: Machine Languages Assembly Languages High-Level Languages
10
Machine Language Primitive operations with which we write programs
Binary: 0/1 Specific to particular machine type and model Any computer directly understands its own machine language – defined by hardware design Consists of strings of numbers ultimately reduced to 0’s and 1’s Instruct computer to perform elementary operations one at a time Machine-dependent Cumbersome, slow, tedious for humans
11
Bit (Binary digit) Smallest unit of storage 0 or 1 Anything with 2 separate states can store 1 bit
12
Computer Chips Transistor switched on or off Capacitor that is charged or discharged
13
Phone Line or Radio Link
Old-school telephone modem Fax machine High- & low-pitch tones represent 0’s & 1’s
14
Magnetic Disks Hard drives Old-school floppies Direction of magnetic field on coated surface
15
Optical Media CD, CD-R, DVD Spot on surface either does or does not reflect light
16
Byte Group of 8 bits Half a byte (4 bits) is Called a Nibble – Ha
17
The Past What did it look like to program this way in the past?
18
Mark I Computer 1944, Harvard electromechanical switches
Flipped one of two ways (0/1) One of the first real electrical computers was the Mark I, created at Harvard University in It was based on the idea of mechanical switches that were flipped in one of two ways in order to “write” a program and control the operations of the computer.
19
ENIAC Electric Numerical Integrator And Computer (1946)
wires into holes along the outside The ENIAC (Electric Numerical Integrator And Computer), developed in 1946 at the University of Pennsylvania, operated under a similar principle, but instead of flipping switches, the programmer plugged wires into holes along the outside of the machine in order to specify which operations to use on what values.
20
UNIVAC I 1951 – first commercial electronic computer
Vacuum tubes for electronic switching Coded in machine or assembly Punch cards for data storage The UNIVAC I, developed in 1951, was the first commercial electronic computer, meaning businesses could actually purchase it for use. This was new, because previous computers had been developed for use and as part of research at universities. Operations were accomplished in the UNIVAC by using vacuum tubes for electronic switching (much like the vacuum tubes used in some guitar amplifiers). The UNIVAC could be programmed in either machine language or assembly, and data was stored on paper punch cards.
21
Assembly Language Simple mnemonic names (abbreviations) for instructions Platform-Dependent Use assembler (piece of software) to covert to machine language Instead of using numbers computers could directly understand, started using English-like abbreviations to represent elementary operations Assemblers (translator program) to change these into machine language Easier to understand than numbers, but programmers still had to write many instructions to accomplish even simple tasks
22
Transistors Late 1950’s Also: first high-level languages:
FORTRAN Algol COBOL Magnetic tape replaced punch cards In the late 1950’s, computers started employing transistors (on chips) instead of vacuum tubes (which could burn out). Instead of saving data on paper punch cards, magnetic tape was developed. Transistor-based computers also saw the development of the first high-level programming languages: FORTRAN, Algol, and COBOL.
23
High Level Language Close to English
Strong abstraction from the details of the computer C++, Java, Objective-C, etc. Single statements can be written to accomplish substantial tasks Look like English and use commonly used mathematical notations
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.