4.2 Types of programming languages, translators, IDEs Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are the 2 types of programming languages

A

High-level languages

Low-level languages

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

What are High-level language

how is it executed
knowledge required to write HLL?

A

programming language that is independent of computer hardware, a program written in a HLL needs to be translated into machine code before it is executed.

No knowledge of hardware and instruction set of computers are required

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

Adv of HLL

A
  • ease of reading and writing code
    – ease of debugging code
    – machine independence
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Disadv of HLL

A

Programs are larger
Programs take longer to exec
Incapable of direct manipulation of hardware

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

What is LLL

A

Low-level languages - a programming language that is dependent on computer hardware

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

Adv of LLL

A

direct hardware manipulation

can write code that doesn’t take up much space
in primary memory

can write code that performs a task very quickly

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

Disadv of LLL

A

Takes longer to write and debug programs

Harder to understand

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

What is an assembly language

A

a form of low-level language that uses mnemonics

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

What is an assembler

A

a computer program that translates programming code written in assembly language into machine code

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

What is a translator

A

converts a program written in a high-level language program into machine code

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

What is a compiler

3 characteristics

A

a computer program that translates a source program written in a high-level language to machine code

An executable file of machine code is produced.
One HLL statement can be translated into several machine code instructions.
Compiled programs are run without the compiler

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

What is an interpreter

3 char

A

a computer program that analyses and executes a program written in a high-level language line by line

No executable file of machine code is produced
One HLL program statement may require several machine code instructions to be executed.
Interpreted programs cannot be run without the interpreter

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

Compiler vs interpreter vs assembler

what does it do?

A

Compiler - Translates a high-level language program into machine code
Interpreter - Executes a high-level language program one statement at a time.
Assembler - Translates a low level assembly language program into machine code.

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

Compiler vs interpreter vs assembler

Executable file of machine code?

A

Compiler - yes
interpreter - no
assembler - yes

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

Compiler vs interpreter vs assembler

How they are translated, what is required, etc

A

Compiler - One high-level language statement can be translated into several machine code instructions.

interpreter - One high-level language program statement may require several machine code instructions to be executed.

Assembler - One low-level language statement is usually translated into one machine code instruction.

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

Compiler vs interpreter vs assembler

How are programs run

A

Compiler - Compiled programs are run without the compiler.

Interpreter - Interpreted programs cannot be run without the interpreter

Assembler - Assembled programs are used without the assembler

17
Q

Compiler vs interpreter vs assembler

Where are the programs distributed

A

A compiled program is usually distributed for general use.

An interpreter is often used when a program is being developed

An assembled program is usually distributed for
general use.

18
Q

Adv and disadv of interpreters

A

easier to debug
quicker to test
easier to edit

DURING DEVELOPMENT

disadv:
programs cannot be run without the interpreter

programs can take longer to execute

19
Q

Adv and disadv of compiler

A

adv:
Executed without the compiler
Takes up less space in memory when it is executed
Executed in a shorter time

disadv:
it takes a longer time to write, test and debug programs during development

20
Q

What is an IDE

A

Integrated Development Environment -
a suite of programs used to write and test a computer program written in a high-level language

21
Q

Features of IDE

A

» code editors
» a translator
» a runtime environment with a debugger
» error diagnostics
» auto-completion
» auto-correction
» an auto-documenter and prettyprinting

22
Q

What is a code editor (IDE)

A

A code editor allows a program to be written and edited without the need to use a separate text editor

23
Q

What is a translator (IDE function)

A

Translators are provided that enable a program to be executed (compiler and/or interpreter)

24
Q

a runtime environment with a debugger (IDE function)

A

Find errors in a computer program running or tracing the program

25
Q

what is a report window

A

A separate window in the runtime environment of an IDE that shows the contents of variables during the execution of a program

26
Q

What is auto-correction (IDE function)

A

Dynamic error checking finds possible errors as the program code is being typed

27
Q

What is auto-completion (IDE function)

A

offer context-sensitive prompts with text completion for variable names and reserved words.

28
Q

What is pretty-typing (IDE function)

A

displaying source code using different colours and formatting, which make the code easier to read and understand

29
Q

error reports
compiler vs interpretter

A
  • A compiler provides an error report for the whole
    code if errors are detected
  • An interpreter stops execution when an error is
    found