Introduction to Computation Flashcards

1
Q

What does a computer do?

A

1) Performs calculations

2) Remembers the results

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What makes a computer turing complete?

A

6 Primitives

Right: Move the Machine’s head to the right of the current square
Left: Move the Machine’s head to the left of the current square
Print: Print a symbol on the current square
Scan: Identify any symbols on the current square
Erase: Erase any symbols presented on the current square
Nothing/halt: Do nothing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What can’t a computer do?

A

Turing’s halting problem.

Problems that take too long to solve (encryption relies on this).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an algorithm vs a program?

A

An algorithm is a conceptual idea.

A program contains concrete instantiations of algorithms.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the types of knowledge?

A

Declarative knowledge - Statements of fact.

Imperative knowledge - Methods for finding new information (algorithm).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a fixed vs stored program computer?

A

A fixed program computer is designed to perform specific functions.
A stored program computer stores and manipulates sequences of instructions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a programming language?

A

A programming language provides a set of primitive operations with mechanisms to combine these into more complex but legal expressions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is syntax?

A

Expressions that are valid within a language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is static semantics?

A

Which syntactically valid expressions have a meaning.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is formal semantics?

A

What meaning is associated with static sematically valid expressions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are errors of syntax, static and formal semantics?

A

Sytax: Incorrect code
Static semantic: Code does’t make sense (i.e 5/@)
Formal semantic: Crashes
Infinite loop
Produces undesired answer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you float an object?

A

float(

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you int an object?

A

int(

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you get the type of an object?

A

type(

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you get the length of an object?

A

len(

How well did you know this?
1
Not at all
2
3
4
5
Perfectly