Computers πŸ’» | Programming Languages! Translators! IDEs! | 4.2 Flashcards Preview

IGCSEs > Computers πŸ’» | Programming Languages! Translators! IDEs! | 4.2 > Flashcards

Flashcards in Computers πŸ’» | Programming Languages! Translators! IDEs! | 4.2 Deck (33)
Loading flashcards...
1
Q

Define machine code

A

A binary programming language, for which the code can be loaded and executed without translation.

2
Q

Define high-level language

(HLL)

A

A programming language that is independent of computer hardware, that has to be translated into machine code before being executed

3
Q

Define low-level language

(LLL)

A

A programming language that is dependent on computer hardware

4
Q

What are two examples of low-level languages?

A

Assembly language and machine code

5
Q

Define assembly language

A

A programming language that is dependent on computer hardware, for which a program has to be translated into machine code before being executed. It uses mnemonics

6
Q

Machine code is usually shown in what number system?

A

Hexadecimal

7
Q

What are the advantages of high-level languages?

A
  • Independent of the type of computer being used
  • Easier to read, write, and understand programs
  • Quicker to write programs
  • Programs are easier and quicker to debug
  • Easier to maintain programs in use
  • Portable
8
Q

What are the disadvantages of high-level languages?

A
  • Programs can be larger
  • Programs can take longer to execute
  • Programs may not be able to make use of special hardware
9
Q

What are the advantages of low-level languages?

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
10
Q

What are the disadvantages of low-level languages?

A
  • It takes a longer time to write and debug programs
  • Programs are more difficult to understand
11
Q

Why are high-level languages easier to understand?

A

They are closer to english and real world languages

12
Q

Why may some programmers write programs in an assembly language?

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
13
Q

Define translator

A

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

14
Q

What is needed to translate an assembly language program into machine code?

A

An assembler

15
Q

Why is there need of translators?

A

Humans find it very difficult to read binary, but computers can only perform operations written in binary

16
Q

Define compiler

A

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

17
Q

What does a compiiler do if an error is found?

A

An error report is produced instead of a compiled program

18
Q

Define interpreter

A

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

19
Q

What does an interpreter do when it detects errors?

A

The execution of the program ceases if an error is detected on a statement. An error message is output; sometimes a suggested corrections is provided

20
Q

How does the use case of compiled, interpreted, and assembled programs differ?

A
  • Compiled and assembled programs are usually distributed for general use
  • An interpreter is often used when a program is being developed
21
Q

What are the advantages of interpreters?

A
  • Easier and quicker to debug and test programs during development
  • Easier to edit programs during development
22
Q

What are the disadvantages of interpreters?

A
  • Programs cannot be run without the interpreter
  • Programs can take longer to execute
23
Q

What are the advantages of compilers?

A
  • A compiled program can be stored ready for use
  • A compiled program can be executed without the compiler
  • A compiled program takes up less space in memory when executed
  • A compiled program is executed in a shorter time
24
Q

What are the disadvantages of compilers?

A

It takes a longer time to write, test, and debug programs during development

25
Q

Define Integrated Development Environment

(IDE)

A

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

26
Q

What are the common features of IDEs?

A
  • Code editors
  • A translator
  • A runtime environment with a debugger
  • Error diagnostics
  • Autocompletion
  • Autocorrection
  • An autodocumenter and prettyprinting
27
Q

What is the benefit of a code editor?

In an IDE

A

It allows a program to be written and edited without the need to use a seperate text editor, speeding up the program development process, as editing can be done without changing to a different piece of software each time the program needs correcting

28
Q

How are interpreters and compilers used in IDEs?

A
  • Interpreters are used for developing the program
  • Compilers are used to produce the final version of the program to be used
29
Q

Define debugger

A

A program that runs the program under development and allows the programmer to stop the execution of the program at a certain point in the source code.

30
Q

How do report windows help with debugging in an IDE?

A

They show the contents of the variables and expressions evaluated at a certain point in the program, allowing the programmer to see if there are any logic errors in the program

31
Q

Explain the function of error diagnostics and autocorrection

In an IDE

A

Dynamic error checking finds possible errors as the program code is being typed, alerting the programmer at the time and providing a suggested correction

32
Q

Explain how auto-completion works

In IDEs

A

Code editors can offer context-sensitive prompts with text completion for variable names and reserved words

33
Q

Define prettyprinting

A

Displaying source code using different colours and formatting, making the code easier to read and understand

Decks in IGCSEs Class (68):