Languages and Translators Flashcards
What is a high-level language?
A language that is programmer friendly. It is easy for humans to understand, debug and maintain
What type of translator does a HL language need?
Needs a compiler or interpreter to translate into machine code
What are some examples of HL languages?
Python
JavaScript
C#
C++
Ruby
What are the advantages of HL languages?
Hardware independent; can run on any system and are easily portable from one device to another
Little to no hardware knowledge is required to write programs
Syntax very similar to English language, therefore easier to write, understand and debug
What are the disadvantages of HL languages?
Not memory efficient -> consumes more memory than LL languages
Must be compiled/interpreted before it can be run
What is a low-level language?
A language that is machine-friendly. It is difficult for humans to understand, but easy for a machine to interpret
What type of translator do LL languages require?
Needs an assembler for direct translation of the language instructions
What are the examples of LL languages?
Machine language
Assembly language
What are the advantages of LL languages?
Memory efficient
Execute very quickly
What are the disadvantages of LL languages?
Hard for humans to read and knowledge of hardware is a prerequisite to write programs
Very machine-dependent and not portable between different devices
What is machine code?
Binary representation of instructions in a format that the CPU can decode and execute
What are the three types of translators?
Compiler
Interpreter
Assembler
What does an Assembler do?
Translates assembly language into machine code
Converts basic commands and operations into binary code that can be understood by a specific type of processor
What are the advantages of Assemblers?
Programs written in machine language can be replaced with mnemonics
Memory efficient
Speed of execution is faster
Hardware-oriented
What are the disadvantages of Assemblers?
Takes a long time to write the program and it is difficult to remember syntax
Lack of portability between computers of different makes can not have the same assembler