Notes
Notes
Main Memory
Holds both program instructions and data
Volatile -erased when the program
terminates or computer is turned off
Also called Random Access Memory
(RAM), because the CPU can access data
and instructions from any memory
location
Secondary Storage
- Holds data when the program is not
running
- Disk drive: Data is stored magnetically
- Optical: CD or DVD drive
- Flash
Program
a set of instructions directing a computer to
perform a task
Programming Language
A special language used to write programs
Processor dependent
1st Gen - binary form (low)
2nd gen - easy to remember, uses mnemonics, easier to remember(low)
5th - AI (high)
high level, processor independent.
3rd - branches, loops,
4th - form filling, computer aided graphics,
Compiler
-translates to machine code and runs
-faster and can be executed multipletimes
-detects errors during compilation, before execution
-produces an indepndent executable file
-c, c++ , java
Interperter
-translates line by line
-slower, translates during execution
-detects errors during runtime
-executes directly
-python, javascript, ruby
Source file
contains code; the input
Object file
output of a compiler.
Key words also known as reserved words have a special meaning in C++ and
cannot be used for other purposes. eg(for, if else, int, float)
Operators -
Arithmetic - +,-,/
Assignment - =
Logical - &&, ll , !
Relational - <>
Modeular operators - %