Chapter 4: How do I write programs? Flashcards

1
Q

Instruction set

A

Set of basic commands or instructions that a processor can understand directly

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

Machine code

A

Instructions that can run directly on a computer’s processor

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

Program

A

Set of instructions written to perform specific tasks on a computer

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

Programming language

A

Language designed for humans to communicate instructions to computers

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

Source code

A

Instructions written in a programming language that both humans and computers can understand

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

Syntax

A

Rules that determine how the words and symbols in a valid instruction are arranged

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

Syntax error

A

Result of incorrect source code that causes the translation process from source code to machine code to fail

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

Compiler

A
  • Code translator program that translate source code to machine code completely before running the program
  • Advantages:
    • Resulting program runs at faster speed as all
      translation done beforehand
    • Compiler is not needed to run the program after
      compilation is completed
    • Syntax errors are detected before the program even
      runs
  • Disadvantages
    • Any changes to the source code require
      recompilation before taking effect
    • Compilers usually do not offer an interactive mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Interpreter

A
  • Code translator program that translates source code to machine code while the interpreted program is running
  • Advantages:
    • Changes to the source code take effect immediately
    • Interpreters usually have an interactive mode that
      facilitates learning and experimentation
  • Disadvantages:
    • The resulting program runs at a slower speed
      because translation occurs when the program is
      running
    • Needs to be run every time the program is started
    • Syntax errors may interrupt the running of the
      program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly