Compilers and Interpreters
Compilers and Interpreters
Questions Notes
What is assembly code? Assembly Code is translated into machine code using an assembler.
High-level Source code is translated into machine code using either:
What are the 2 factors Interpreter
that source code is Compiler
translated using? Compiler
Our code will not run when we have a syntax error
What is a compiler? We have an error on line 2 which prevents our programs from running
Prin(counter)
What is an Interpreter? This error needs correcting before the program will run as shown here
Summary:
Assembly code is translated into machine code using an assembler, while high-level
source code is translated into machine code using an interpreter or compiler.
Compilers have advantages like faster execution, optimized code, and secret source
code. Interpreters have advantages like easy writing, recompilation, and a specific
processor type, but also require translation software at runtime.