1
Q

What’s an algorithm?

A

A step-by-step instruction that needs to be followed to solve a problem

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

What are the characterstics of an algorithm?

A
  1. Algorithms can have zero or more inputs
    NOTE: If there is no input, then the expected outcome should generally always be the same
  2. Algorithms ALWAYS have an output
  3. They need to be clear and concise - start, end and steps should be clearly specified
  4. They should be feasible (effective/efficient) - algorithms should not have redundant steps which makes them inefficient
  5. Finitness - algorithms should have an end point; cannot be infinite
  6. Language independent - NOT dependent on a specfic programming language
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are low-level languages?

A

Languages that communicate directly to the computer, either VERY close to computer language OR the same

There are two main types:

  • Machine language (LOWEST LEVEL, SAME AS COMPUTER LANGUAGE)
  • Assembly language (ONE LEVEL ABOVE MACHINE LANGUAGE, VERY CLOSE TO COMPUTER LANGUAGE)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the features of a program?

A
  1. Sequence - The instructions in a program are executed sequentially
  2. Repitition - The steps in programs can be looped/iterated
  3. Selection - Can designate what the steps and input will do for the program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is machine language?

What are its characteristics?

A

Low-level language that relies on a binary format.

It is OS dependent, CANNOT BE USED BY ANY OS, and NOT readable by humans.

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

What is assembly language?

A

A more readable version of machine language. Still a low level language that directly communicates with hardware.

OS independent, can be read by humans.

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

What are high level languages?

What are their characteristics?

A

These are languages that are closer to human languages than machine language. They are machine/OS independent.

Requires a compiler OR interpreter.

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

What does a compiler do?

A

Translates the whole file in one step from high level language to machine language
Errors presented at the end of compilation process, continues to run until file is compiled

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

What is an interpreter?

A

Translates high level languages by translating one instruction at a time
Interpretation stop immediately if error is spotted

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

What is a program?

A

A program is a sequence of intstructions that specifies how to perform a computation to the computer.

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

Is compilation iterative, batch, interactive or none?

A

Batch.

Not iterative and not interactive.
Batch processing is executing the several processing jobs in a group without any user interaction. The complaining process scan and translate the entire program at once.

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

What are the key components of a program?

A

Input
Output
Operations
Control Structures

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

What do operations encompass?

A

They include arithmetic and logic operations

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

What do control structures encompass?

A

They include loops and conditions (true/false)

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