4.2 Types of programming languages, translators, IDEs Flashcards Preview

Computer Science > 4.2 Types of programming languages, translators, IDEs > Flashcards

Flashcards in 4.2 Types of programming languages, translators, IDEs Deck (31)
Loading flashcards...
1
Q

What is machine code

A

a binary programming language

a program written in machine code can be loaded an executed without translation

2
Q

What is a computer program

A

list of instructions that enable a computer to perform a specific task

3
Q

What are the 2 types of programming languages

A

High-level languages

Low-level languages

4
Q

What are High-level language

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

5
Q

Adv of HLL

A

» read and understand as the language used is closer to English
» write in a shorter time
» debug at the development stage
» maintain once in use.

6
Q

Disadv of HLL

A

Programs are larger
Programs take longer to exec
Programs may not be able make use of special hardware

7
Q

What is LLL

A

Low-level languages - a programming language that
is dependent on computer hardware, both machine code and assembly language are LLLs

8
Q

Adv of LLL

A

can make use of special hardware

includes special machine-dependent instructions

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

can write code that performs a task very quickly

9
Q

Disadv of LLL

A

Takes longer to write and debug programs

Harder to understand

10
Q

What is an assembly language

A

a programming language that is dependent on computer hardware

needs to be translated into machine code before it is executed

11
Q

Why are assembly languages used

A

» to make use of special hardware
» to make use of special machine-dependent instructions
» to write code that doesn’t take up much space in primary memory
» to write code that performs a task very quickly.

12
Q

What is an assembler

3 characteristics

A

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

An executable file of machine code is produced
One LLL statement is usually translated into one machine code instruction.
Assembled programs are used without the assembler

13
Q

What is a translator

A

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

14
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

15
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

16
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.

17
Q

Compiler vs interpreter vs assembler

Executable file of machine code?

A

Compiler - yes
interpreter - no
assembler - yes

18
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.

19
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

20
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.

21
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

22
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

23
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

24
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

25
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

26
Q

What is a translator (IDE function)

A

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

27
Q

a runtime environment with a debugger (IDE function)

A

Find errors in a computer program running or tracing the program

28
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

29
Q

What is auto-correction (IDE function)

A

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

30
Q

What is auto-completion (IDE function)

A

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

31
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