2.5 Programming Languages and Integrated Development Enviroments Flashcards

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

What is Source code?
why was there an explosion in the use of High-level Languages?

What is assembly language reserved for?

A
  • Any program written in a high level language is known as source code. Source code must be translated into machine code before the computer can understand and execute it.

Two factors led to an explosion in the use of high-level languages:

  • Increased processor speed;
  • increased memory capacity.
  • Assembly Languages are reserved for specialist situations: Embedded systems and device drivers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Machine code?

A

Machine code is the Binary Representation of instructions in a format that the CPU can decode and execute.

Have an operation code instruction and address or data to use.

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

What are low-level Languages?

What is it used for?

A

• Written in Assembly language.
• Translated by an assembler into machine code.
• Used for embedded systems and device drivers where instructing the hardware directly is necessary.
• One instruction translated into one machine code instruction.
• The code works on one type of processor only.
The programmer works with memory directly.
harder to write and understand.
• Memory efficient.
• fast to execute.

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

What are High-level Languages?

A
  • Translated by a compiler or interpreter into machine code.
  • Makes the writing of computer programs easier by using commands that are like English.
  • One source code instruction translates to many machine code instructions.
  • Code will run on different types of processors.
  • The programmer has lots of data structures to use.
  • Code is quicker and easier to understand and write.
  • Less memory efficient.
  • slower to execute if it is not optimised.
  • Source code is written in languages as Python, C++.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the Purpose of Translators?

A

Code written in both assembly and high-level source code is converted into binary machine code for execution.

Assembly code is translated using a assembler.

There are two methods of translating high-level code:

  • *- Interpreting**
  • *- Compiling**
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Compiler?

A

Translates source code from high-level languages into object code and then into machine code ready to be processed by the CPU

The whole program is translated in one go into machine code before it is run.

High level → Object code → Machine code

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

What are the Pros of a complier

A
  • No need for translation software at run time.
  • execution is faster as
  • Code is usually optimised.
  • Original source code is kept secret.
  • A compiled program can be supplied as an executable file. An executable file is a file that is ready to run. Since an executable file cannot be easily modified, programmers prefer to supply executables rather than source code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the cons of a compiler

A
  • Programs will not run with syntax errors which can make it more difficult to write the code.
  • Code needs to be recompiled when the code is changed.
  • Designed for a specific type of processor.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a Interpreter?

A

Translates source code from high-level languages into machine code ready to be processed by the CPU.

The program is translated line by line as the program is running.

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

Pros of an interpreter

A
  • Easy to write source code because the program will always run, stopping when it finds a syntax error.
  • Code does not need to be recompiled when code is changed, and it is easy to try out commands when the program has paused after finding an error.
  • Errors can be quickly spotted - once an error is found, the program stops running and the user is notified at which part of the program the interpretation has failed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Cons of an interpreter:

A
  • Translation software is needed at run-time
  • Speed of Execution is slower as the processor has to wait for each instruction to be translated before it can be executed.
  • Code is not optimised
  • Interpreters do not produce an executable file that can be distributed. As a result, the source code program has to be supplied, and this could be modified without permission.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an IDE

A

An IDE is a set of tools which aid you in writing, debugging and testing computer programs

REMEMBER DURT

  • Debugging tools
  • Run-Time environment
  • Usability functions
  • Translator
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are Debugging Tools in an IDE

A

Debugging Tools are for finding logic errors.

  • Breakpoints – stopping at a line of code during execution.
  • Stepping through lines of code one at a time.
  • Tracing through a program to output the values of variables.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do IDE’s help identifying Syntax Errors?

A

Illustrating keyword syntax and auto-completing command entry

Error Highlighting and the complier produces an output of the error message to identify it.

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

What is a run-time enviroment?

A
  • Output window
  • Simulating Different devices the program can run on
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are Usability functions?

A
  • Comment or indent regions
  • Navigation, Showing/hiding sections of code
  • Formatting source code
  • Find and Replace
17
Q

What is a editor?

A
  • Editors are software which allow programmers to write and edit code. Editors are often fairly simple, but usually offer facilities such as:
  • automatic line numbering
  • colour coding
  • auto-correct
  • auto-suggestion
  • auto-indent

These tools help to improve the readability of code. However, they do not usually help to identify errors.

18
Q

What is a Translator?

A

Some IDEs have an inbuilt translator to test the program and make small alterations before compiling the final program into an
executable file for distribution

19
Q

Why do High-level and Assembly language need to be translated?

A
20
Q

What is an IDE and their features?

A