Computer Science Advocacy
Computer Science Advocacy
Computer Science
Overview of Discussion
a general purpose,
programmable,
information processor
with input and output
Computing Agents
Diagnose diseases
MYCIN captures medical knowledge in rules that
allowed a computer to identify an ailment based
on symptoms
Control robots that walk, talk, and learn
CMU created a program that drove a van from
Pittsburgh to D.C. using cameras for eyes
Compose music and create art
How do computers solve problems?
Memory
Machine Languages
Only language computers directly understand
“Natural language” of computer
Defined by hardware design
Machine-dependent
Generally consist of strings of numbers
Ultimately 0s and 1s
Instruct computers to perform elementary operations
One at a time
Cumbersome for humans
Example:
+1300042774
+1400593419
+1200274027
Assembly Languages
C++ programs
Built from pieces called classes and functions
C++ standard library
Rich collections of existing classes and functions
“Building block approach” to creating
programs
“Software reuse”
Basics of a Typical C++ Environment
C++ systems
Program-development environment
Language
C++ Standard Library
Basics of a Typical C++ Environment
Edit Program is created in
Editor Disk the editor and stored
Phases of C++ Programs: on disk.
Preprocessor program
Preprocessor Disk
processes the code.
1. Edit Compile
Compiler creates
Compiler Disk object code and stores
2. Preprocess it on disk.
Primary
6. Execute Memory
CPU takes each
CPU
instruction and
executes it, possibly
..
storing new data
..
..
values as the program
executes.