Transcript BACS 287
BACS 287
Basics of
Programming
BACS 287
History of Computers
Early “computers” mechanized the
calculation process
Charles Babbage designed the analytical
engine - first with stored memory in early
1800s
Herman Hollerith built a punched card
tabulating machine in 1880s
None of these were “true” computers
BACS 287
History of Computers
First true computers developed during W.W.II
–
–
EGNIMA - early 1940s
Colossus - early 1940s
MARK I - 1944
ENIAC - 1946
EDVAC, EDSAC - 1949
UNIVAC I - 1951
BACS 287
Hardware/Software Generations
1st Generation
Hardware
–
–
–
–
–
Vacuum tubes
Punched cards, Paper
tape
Magnetic tape available
Machine language
Millisecond access time
1st Generation
Software
–
Machine language
Specific to CPU
tedious, error prone
time consuming
1-to-1 instruction ratio
explicit control
fast execution (within
hardware limitations)
BACS 287
Hardware/Software Generations
2nd Generation
Hardware
–
–
–
–
–
Discrete Transistors
Punched Cards, paper
tape
Magnetic tape
Assembly language
Microsecond access
time
2nd Generation
Software
–
Assembly language
mnemonics
symbolic names
relocatable code
explicit control
usually 1-to-1
instruction ratio
fast (within hardware
limitations)
BACS 287
Hardware/Software Generations
3rd Generation
Hardware
–
–
–
–
Integrated circuits
Magnetic Disk
High-level languages
(COBOL,Fortran...)
> 100 Nanosecond
access time
3rd Generation
Software
–
High-level languages
portable between
machines
instruction explosion
relatively English-like
problem specific
less control
less speed than low
level languages
BACS 287
Hardware/Software Generations
4th Generation
Hardware (...)
–
–
–
–
large scale Integrated
circuits
Mass Storage devices
4th Generation
languages (Easytrieve,
Mapper)
1-10 Nanosecond
access time
4th Generation
Software (...)
–
4th generation
less procedural, more
problem oriented
graphically oriented
built-in code generation
facilities
less control
less speed than low
level
BACS 287
Hardware
Hardware are the physical devices that make
up a computer system
Hardware systems are “tuned” to work
together
There are five basic hardware components in
a computer system
BACS 287
Hardware Components of a
Computer System
1.
2.
3.
4.
5.
Input & Output Devices
Central Processing Unit (CPU)
Primary Storage (RAM)
Secondary Storage (disk)
Communication Devices
BACS 287
CPU
The “brains” of the computer
Executes instructions to perform simple
functions
Capable of executing only one instruction at
a time
Executes instructions in billionths of a second
(i.e., nanoseconds)
Composed of several sub-components
BACS 287
CPU Sub-Components
Control Unit (CU)
Arithmetic and Logic Unit (ALU)
Registers
Cache memory
Clock
and others...
BACS 287
Primary Storage
Random Access Memory (RAM)
Volatile storage
All computer programs must be in RAM
before the CPU can execute them
Access time normally measured in
nanoseconds (billionth of a second)
Relatively limited amount of RAM in a system
BACS 287
Secondary Storage
Hard disks, floppy disks, tape, ...
Non-Volatile storage
Large Capacity -- Relatively Slow
Most rely on moving parts
Access time normally measured in
thousandths of a second (milliseconds)
Speed difference between RAM and Disk is
tremendous
BACS 287
Software
Software is the logical component of a computer
system
Software are detailed instructions (procedural logic)
that tell the CPU how to solve a problem
There are various levels (types) of software; each
has a specific purpose
The three types are 1) operating systems, 2)
compilers and interpreters, and 3) application
programs
BACS 287
Operating System
A program that works directly with the
hardware
Provides useful services that application
programs need
Usually written in low level languages (e.g.,
assembler, C) to work on a specific CPU
“Windows” is an operating system
BACS 287
Compilers and Interpreters
Utilities to translate English-like source code
into executable object code for the CPU
Compilers translate the entire program as a
unit and save the results
Interpreters translate one line at a time and
discard the results after execution
Visual Basic can be both an interpreter and a
compiler.
BACS 287
Application Programs
Application programs are software that
perform end-user tasks
Normally, high-level and very specific (e.g.,
spreadsheet, word processor)
You can write applications programs using
Visual Basic and other computer languages
BACS 287
Where this class fits into the picture
In this class you use a compiler (&
interpreter) running under the control of the
operating system (on the hardware) to write
application programs.
Generally speaking, it is incorrect to say that
you are “programming” when you use an
application program (like Excel or Access).
Programmers write new applications; they
don’t utilize existing packages.
BACS 287
Quiz
What is the difference between hardware and
software?
What are the 5 components of a “true” computer?
What is the difference between a compiler and an
interpreter?
What is the main difference between primary storage
and secondary storage?
What is the main difference between 2nd generation
and 3rd generation programming languages?
BACS 287