2.4 Translators and Facilities of Languages Flashcards

1
Q

What are assemblers responsible for?

A

Converting low-level assembly language into machine code.

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

How do assemblers have a one to one relationship?

A

Each line of assembly code is converted or looked up by the assembler and translates directly into one line of binary.

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

Why are assemblers processor specific?

A

Each CPU has a unique set of instructions for itself, which won’t work on other CPU’s

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

Define translator

A

Any program which converts source code (code written in a programming language) into the machine code (binary).

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

What are compilers and interpreters responsible for?

A

Converting high-level languages into binary.

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

How do compilers and interpreters have a one to many relationship?

A

Each single line of high level source code written by a programmer translates into many lines of binary.

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

How do interpreters translate a high level language?

A

They take one line of high language program code and convert it directly into binary and then run it

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

Why are interpreters useful when debugging a program?

A

Because they will stop at the first line which contains an error.

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

What is a disadvantage of interpreters debugging a program?

A

The interpreter will require access to the whole source code each time it needs to translate it.

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

How are interpreters debugging a program inefficient?

A

It’s a security issue, the code can be stolen.

The code executes quite slowly, especially for large programs.

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

How do compilers translate a high level language?

A

They take the entire program and converts it into object code which can be quite slow.

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

Why can a compiler be better than an interpreter?

A

The compiled object code will run a lot faster than an interpreted version.

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

Why can an interpreter be better than a compiler?

A

f the program needs to be updated now, the original source code would have to be changed and a new version compiled and distributed.

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

What is an integrated development environment (IDE)?

A

A program which provides resources and tools with high level languages.

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

What are some included tools?

A

Multi-window text editing.

Run Time Environment.

Built-in translator.

Integrated debugger.

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

Why do most professional programmers use more complex IDE’s?

A

Because they provide a whole host of extra features and resources to help them complete their complex programs faster.

17
Q

What is a text editor?

A

A text area used for programmers to enter code directly into the IDE.

It contains:
Syntax highlighting.
Autocomplete code.
Self-indentation support.

18
Q

What are error diagnostics?

A

A feature which reports errors (mainly syntax) in the code and potential problems along with where they’re found and often suggestion on who to fix.

19
Q

What are runtime environments?

A

Software to support the execution and running of programs.

They allow developer to run their code during development in order to check for logical error.

20
Q

What is auto-documentation?

A

A feature which tracks variables declared by the programmer in order to produce self – documentation.

It helps with:
Program maintenance.
Debugging.
Support.

21
Q

What is high-level language?

A

A programming language that uses key words such as PRINT or IF and it has a set of grammar rules (syntax) making it close to English.

E.g. python, java or C++

22
Q

What is assembly language?

A

A low level language written in mnemonics that closely reflects CPU operations used for device drivers.

23
Q

What is a driver?

A

It tells a specific hard drive what to do and is used when fast execution is required or there is limited memory / file size.

24
Q

Why does the high level language need to translated into binary?

A

Because the only thing computers understand is binary as the 1’s and 0’s represent on and off for each instruction.

25
Q

Why might someone compile their code?

A

If they made a new program worth millions and wanted to sell it to people, they could compile the code and then send them it in binary so the people can’t copy your source code.

26
Q

What is a disadvantage of compiling?

A

If there are errors in the source code, you will have to fix it and compile the code again which takes time.

27
Q

Define a program

A

Instructions which tell the computer what to do to find a solution to a problem.

28
Q

Which languages are hardware specific and not portable (needs to be modified to run on another computer?

A

Machine and assembly.

29
Q

Why might high-level languages need to be modified?

A

Because they can’t run on different OS.