02 - Section 6 - Translators and IDES Flashcards
What are the two types of computer languages?
High level
low level
What are examples of high-level languages?
Python
C++
JavaScript
What is an example of machine code?
Binary
What is an example of assembly code?
Little man computer
What do low-level languages consist of?
Machine code and binary code
What are the features of high-level languages?
- one high level instruction represents many instructions of machine code
- same code works for many machines and processors
- programmer can store data without knowing the memory structure
What are the advantages of high level languages?
Code is easy to read, understand and modify
What are the disadvantages of high-level languages?
- must be translated into machine code before a computer can understand it
- less memory efficient and slower (don’t have much control over what the CPU actually does)
What are the features of low-level languages?
- one instruction of assembly code usually represents one instruction of machine code
- usually written for one type of machine or processor
- the programmer needs to know about the internal structure of the CPU and how it manages its memory
What are the disadvantages of low-level languages?
-code is difficult to read, understand and modify
What are the advantages of low-level languages?
- commands in machine code don’t need to be translated, they can be executed directly
- you control exactly what the CPU does, so programs are more memory efficient and faster
What are the three types of translators?
Assemblers
Compilers
Interpreters
What are assemblers used to translate?
Assembly language into machine code
-there are many assembly languages and each one needs its own unique assembler
What are compilers and interpreters used to translate?
High-level code into machine code
What does a compiler do?
- translates all of the source code at the same time and creates one executable file
- only needed once to create the executable file
- returns a list of errors once compiling is complete
- once compiled the program runs quickly but compiling can take a long time