2.5 Flashcards

(26 cards)

1
Q

Machine code

A
  • Instructions in binary, that a processor can execute directly (low level)
  • produced by compiler, interpreter or assembler
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Low-level language

A
  • The computer’s own language
  • In binary numbers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Opcode

A

The part of the instruction that tells the CPU what operation is to be done

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

Operand

A

The part of the instruction that tells the CPU what to apply the operation to

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

Instruction set

A

The complete set of instructions that a processor can handle

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

High-level language features

A
  • One-to-many: programmer doesn’t need to write every single instruction carried out by the processor as one statement translate into many machine code instructions
  • programs are much shorter and easier to read, right and handle
  • problem-oriented: the programmer can concentrate on the logic of the problem
  • Easier to learn and understand and debug
  • translated using a compiler or interpreter
  • Machine independent: the same program can be run in many different computer platforms without needing to change the code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Advantages of low-level language

A
  • doesn’t need to be translated
  • direct control of hardware/memory
  • faster execution
  • can program for specific hardware
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Disadvantages of low-level languages

A
  • Difficult to use because every single instruction has to be specified by the programmer
  • The code is specific to a particular processor, so a program would need to be rewritten to be run in a different computer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Translation

A

The conversion of human friendly program writing to machine code

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

Translator

A

A program to convert high-level or assembly level command into machine code

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

Assembler

A

Software that translates an assembly language program into machine code

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

Assembly language

A
  • processor specific
  • translated using an assembler
  • One statement translates into one machine code instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Source code

A

The program written by the programmer in a high-level language before it is converted to machine code

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

Object code

A

The machine code produced by a compiler

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

Compiler

A

Convert all the source code into object code before the program can be run

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

Advantages of compiling code

A
  • compiled code runs faster
  • can be run multiple times without re-translating
  • shows all errors at the end
  • can produce an executable file
17
Q

Disadvantages of compiling code

A
  • when you are developing the code it has to be compiled in full
  • You can’t try out individual commands
  • A compounded program is specific to a particular processor, and it won’t run on a different one
18
Q

Interpreters

A
  • Convert the source code into machine code one line at a time, and then immediately execute it
  • If there is a problem with the source code, the program stops and has to debug the code
  • The program needs to be interpreted every time it runs
19
Q

Advantages of interpretation

A
  • easier to debug
  • Errors are picked up at the time of translation
  • It is easy to experiment and try different approaches, no need to re compile to try each change
20
Q

Disadvantages of interpretation

A
  • Code runs slower than compiled code, as translation and execution take place for each line of code
  • The code doesn’t get optimised
  • The source code must be made available to the customer so it could be adapted or copied
  • The user must have a copy of the interpreter resident in memory, occupying more storage
21
Q

Editors

A

Software that provide a platform to write code, usually offering a range of tools that make programming easier

22
Q

Editor use

A
  • Allows the user to enter new program, save, and edit an existing program
  • Find and replace all occurrences of text typed in by user
  • Auto-indent statements
  • Auto-complete statements
  • Colour code keywords and common statements
23
Q

Error Diagnostics

A
  • allows the programmer to find and fix errors
  • Allows the programmer to run the code from this point one line at a time
24
Q

IDE

A

Integrated development environment- provides all of the tools that are programmer needs to write and test programs in one place

25
Run time environment
- allows the programmer to run the code from within the IDE - The program outputs can be seen without opening additional programs
26
Purpose of a truth table
Shows all possible inputs, and the associated output for each input