0Still learning
Know0
Low-level language
Enjoying Flashcards?
Tell us what you think
Low-level language
A low-level language is a programming language that directly translates to machine code understood by the processor.
First generation language
Machine code is a first-generation language where instructions are directly executable by the processor and written in binary code.
Second generation language
Assembly code is a second-generation language that uses mnemonics that correspond almost exactly to machine code instructions.
High-level language
A high-level programming language uses English-like statements to allow users to program with easy to use code.
True or False?
Low-level languages give complete control over components and hardware.
True.
The main advantage of low-level languages is complete control over the system components and hardware.
True or False?
Low-level languages are easier to write than high-level languages.
False.
The main disadvantage of low-level languages is that they are difficult to write, understand, and more prone to errors.
State two advantages of high-level languages?
The advantages of high-level languages are that they are easier to:
read
write
debug
maintain.
State two disadvantages of high-level languages?
The disadvantages of high-level languages are:
users cannot directly manipulate hardware
the program may be less efficient.
True or False?
One line of high-level code translates to one machine code instruction.
False.
One line of high-level code translates into many machine code instructions.
Give one example of a high-level programming language.
Examples of high-level programming languages include:
Python
Java
Basic
C++.
Translator
A translator is a program that translates program source code into machine code so it can be executed by a processor.
Compiler
A compiler is a translator that translates high-level languages into machine code all in one go, typically used when a program is finished.
Interpreter
An interpreter is a translator that translates high-level languages into machine code one line at a time as the program runs.
What does an assembler do?
An assembler is used to translate low-level assembly code into machine code.
What is the key difference between a compiler and interpreter?
A compiler translates the entire program code at once, while an interpreter translates line by line as it executes.
When is a compiler typically used?
A compiler is generally used when a program is finished and has been checked for syntax errors.
When is an interpreter typically used?
An interpreter is generally used when a program is being written in the development stage.
What is an advantage of compiled code?
An advantage of compiled code is the speed of execution since it is already fully translated to machine code.
What is a disadvantage of interpreted code?
A disadvantage of interpreted code is that it requires translation software to run since it is not pre-compiled.
True or False?
If compiled code has an error, it needs to be recompiled after fixing the error.
True.
If compiled code contains any errors, after fixing, it will need to be recompiled.
IDE
An Integrated Development Environment (IDE) is software designed to make writing high-level languages more efficient by providing various tools and facilities.
Editor
An editor is an IDE tool that provides an environment to write, edit and maintain high-level code.
Error diagnostics
Error diagnostics are IDE tools that help identify, understand and fix errors in code.
Run-time environment
A run-time environment is an IDE facility that allows users to run code and see the corresponding output.
Translator
A translator is an IDE tool that compiles or interprets code without needing additional software.
What features can an editor provide?
An editor can provide basic formatting tools such as:
coloured keywords
auto-completion/correction
code commenting tools.
How do error diagnostics help with errors?
Error diagnostics can:
highlight code areas with errors
provide direct error messages
allow step-by-step debugging to find logic errors.
What is the purpose of a run-time environment?
A run-time environment allows users to run their code and see the output within the IDE.
Why is a translator useful in an IDE?
A built-in translator is useful in an IDE to compile or interpret code without needing separate software.
True or False?
IDEs make writing high-level code less efficient.
False.
IDEs are designed to make writing high-level languages more efficient by providing helpful tools and facilities.