MIT 6.00 Week 1 Flashcards
What are the two kinds of knowledge?
Declarative and imperative
What is declarative knowledge?
Statements of fact.
What is imperative knowledge?
Knowledge of how to do something, instructions to accomplish a task.
Algorithm
A description of how to perform a computation
What is it called when an algorithm has halted?
The algorithm has converged.
What is flow control?
An order of execution for the steps of an algorithm
The condition under which the algorithm stops
termination condition
What kind of computer is hard coded to do a certain set of calculations?
Fixed program computer
What kind of computer treats both input and the commands to manipulate that input as data?
Stored program computer.
Why two primary ways that stored program computers are superior to fixed program computers
They are infinitely flexible
They allow programs to create programs
What is the interpreter?
A program that can execute any valid set of instructions
Alan Turing proved that:
With 6 primitive instructions you can do anything that can be done with a computer (rough)
What determines the difference between different programming languages?
Instructions
Flow control
What are the three characteristics of a programming language?
Syntax
Static semantics
Semantics
Syntax:
What sequence of characters and symbols constitute a well formed string.
Static Semantics
Provides restrictions on syntactically correct expressions to ensure that the expression is meaningful
Semantics
Provides rules for the meaningful interpretation of a syntactically correct expression
What are the possible negative consequences of running a program?
Crash
Infinite loop
Run to completion with an incorrect answer
What process does a program written in an interpreted language go through when it is run?
source code - checker - interpreter - output
What process does a program written in a compiled language go through in order to be run?
source code - checker/compiler - object code - interpreter - output