Introduction To Computers and Programming
Introduction To Computers and Programming
and Programming
What are humankind’s
greatest inventions?
What are humankind’s
greatest inventions?
The wheel?
Fire?
Light bulb?
Disneyland?
Microscope?
Television?
The invention of the computer
1945 – Eckert & Mauchly built ENIAC
(Electronic Numerical Integrator &
Calculator) at Penn
1951 – E&M built UNIVAC I for
Remington-Rand
Which became Sperry
Which merged with Burroughs
Which became Unisys
MEMORY
Functional View of a Computer
Output Devices
CPU
Input Devices
Main
Memory Secondary Memory
Hardware Basics
The central processing unit (CPU) is the
“brain” of a computer.
The CPU carries out all the basic operations
on the data.
The CPU communicates with the main
memory
Number of processors (cores)
1 – uni
2 – dual
4 – quad
…
Multi/parallel
Hardware Basics
Memory stores programs and data.
CPU can only directly access information
stored in main memory (RAM or Random
Access Memory).
Main memory is fast, but volatile, i.e. when
the power is interrupted, the contents of
memory are lost.
Secondary memory provides more
permanent storage: magnetic (hard drive,
floppy), optical (CD, DVD)
Hardware Basics
Input devices
Information is passed to the computer
through keyboards, mice, etc.
Output devices
Processed information is presented to the
user through the monitor, printer, etc.
Computer Size
ENIAC then…
ENIAC today…
Computational Power
Intel Pentium 4:
6 instructions/clock cycle
3.4 GHz = 3.4 billion clock cycles/second
Numbers in base 10
908110 = 9x103 + 0x102 + 8x101 + 1x100
10112 = ? in base 10
What is a computer program?
A detailed, step-by-step set of
instructions telling a computer what to
do.
Computational recipe
If we change the program, the
computer performs a different set of
actions or a different task.
The machine stays the same, but the
program changes!
Program Power
Software (programs) rule the hardware
(the physical machine).
Assembly Language
Easier to write, debug, and update
http://www.erg.abdn.ac.uk/users/gorry/eg2069/assembly.html
1954 – FORTRAN
1961 – COBOL
1970 – Pascal
1980’s – C