2.5 Programming Languages and IDEs Flashcards

1
Q

What is machine code?

A
  • Binary representation of instructions in a format that the CPU can decode and execute
  • Have operation code instruction and address or data to use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are low level languages?

A
  • Written in Assembly language
  • Translated by an assembler into machine code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are low level languages used for?

A
  • Used for embedded systems and device drivers where instructing hardware directly is necessary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some features of low level languages?

A
  • 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
5
Q

What are high level languages?

A
  • Source code written in languages such as Python, C++, Java, Visual Basic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are high level languages translated by?

A
  • Translated by compiler or interpreter into machine code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does one source code instruction in a high level language translate to?

A
  • Translates to many machine code instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Features of High level languages?

A
  • Quicker and easier to understand and write
  • Less memory efficient
  • Could be slower to execute if not optimised
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does a compiler do?

A
  • Translates source code from high level languages into object code and then into machine code ready to be processed by the CPU
  • Whole program is translated to machine code before it is run
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the advantages of a compiler?

A
  • No need for translation software at run-time
  • Speed of execution is faster
  • Code is usually optimised
  • Original source code kept secret
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the disadvantages of a compiler?

A
  • Program won’t run with syntax errors, making it more difficult to write the code
  • Code needs to be recompiled when it is changed
  • Designed for a specific type of processor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does an interpreter do?

A
  • Translates source code from a high level language into machine code ready to be processed by CPU
  • Program is translated line by line while running
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the advantages of an interpreter?

A
  • Easy to write source code as it’s always running, stopping when finding a syntax error
  • Code doesn’t need to be recompiled when changed
  • Interpreted languages made very easy for beginner programmers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the disadvantages of an interpreter?

A
  • Translation software is needed at run time
  • Speed of execution is slower
  • Code not optimised
  • Source code needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What functions do IDEs provide?

A
  • Debugging tools for finding logic errors
  • Help with preventing and identifying syntax errors
  • Providing a run time environment
  • Usability functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does an IDE help debug tools for finding logic errors?

A
  • Breakpoints - stopping program at line of code during execution
  • Stepping through lines of code one at a time to check which lines are executing
  • Tracing through a program to output values of variables
17
Q

How does an IDE help with preventing and identifying syntax errors?

A
  • Illustrating keyword syntax and auto completing command entry
  • Error highlighting
  • Compiler producers an output of the error message to help identify it
18
Q

How does an IDE provide a run time environment?

A
  • Output window
  • Simulating different devices the program can run on
19
Q

What usability functions does an IDE provide?

A
  • Navigation, showing/hiding sections of code
  • Formatting source code
  • Find and replace
  • Comment or indent regions