Question | Answer |
What is a Compiler? | > Translator that converts source code into an executable binary file > Translates the whole program in one go > Provides a list of errors once it has attempted the compilation process, making debugging easier > C, C++, Visual Basic, Swift etc. are all compiled languages |
What are the Advantages of Compilers? | > There is no need to repeat the process every time the program is run > Compilers hide the source code from the end user, protecting developers' intellectual property |
What are the Disadvantages of Compilers? | > Process can be very slow > This can slow development if many small changes need to be made |
What is an Interpreter? | > Translator that converts high-level source code into executable binary line-by-line > Python, JavaScript etc. are interpreted languages |
What are the Advantages of Interpreters? | > Stop as soon as an error is encountered - this is useful for debugging > Interpreted languages are portable, meaning the high-level code can be run on many different architectures, as long as the interpreter has been written for it |
What are the Disadvantages of Interpreters? | > Running an interpreted program is slower because each line must be translated every time > Interpreted programs do not produce one final, compiled executable file |
What is an Assembler? | > Translate each line of low-level assembly code into a binary sequence > Both the opcode and the operand are replaced with the relevant binary, since each instruction directly corresponds to a binary sequence |
What are the Advantages of Assemblers? | > Provides control over the hardware, meaning the code can take up little space and be quick to execute > Can be used on low-spec machines |
What are the Disadvantages of Assemblers? | > Unlike high-level languages, assembly (and therefore assemblers) are difficult to use, and require deep knowledge of the specific CPU and memory > Assembly code is not portable, and cannot be run on different machines |
Want to create your own Flashcards for free with GoConqr? Learn more.