12.1 Low- and High-Level Languages, Compilers and Interpreters, and IDEs
Key Takeaways
- Low-level languages (machine language and assembly) are close to the hardware, fast, and processor-specific; high-level languages are more readable, portable, and productive.
- A compiler translates an entire high-level program into machine code (object code) before execution; an interpreter translates and runs the program statement by statement, or from bytecode, at run time.
- Source code is the human-readable program a programmer writes; object code is the machine-level translation produced by a compiler, which a linker combines into an executable.
- An IDE combines a code editor, build and run tools, a debugger, and project management in one application.
- Context-aware editor features such as syntax highlighting, autocompletion, and error underlining speed up coding and reduce syntax errors, but they can hide details from beginners and slow down on large projects.
What this competency asks
Three small ETS competencies are clustered here:
- IDEs: identify the components of IDEs, the benefits and drawbacks of using IDEs, and the costs and benefits of context editors.
- Language levels: identify the characteristics of low- and high-level languages.
- Translation: identify the differences between compilation and interpretation, and between source code and object code.
ETS's sample question on this topic asks for the role of a compiler. The answer: it translates a program written in an abstract, high-level language into a program with the same behavior expressed in machine code.
Low-level vs. high-level languages
| Level | Example | Characteristics |
|---|---|---|
| Machine language | 10110000 01100001 | Binary instructions the CPU executes directly; specific to one processor family; very hard for people to read |
| Assembly language | MOV AL, 61h | Readable mnemonics that correspond almost one-to-one to machine instructions; translated by an assembler; still processor-specific |
| High-level language | Python, Java, C++, JavaScript | Close to human language and mathematics; one statement becomes many machine instructions; portable across processors; must be compiled or interpreted |
| Block-based / very high level | Scratch, Snap! | Drag-and-drop blocks remove syntax errors; ideal for beginners |
| Characteristic | Low-level | High-level |
|---|---|---|
| Abstraction | Low: registers and memory addresses | High: variables, objects, procedures |
| Readability and productivity | Low | High |
| Portability | Tied to one processor family | Runs on many platforms after translation |
| Control over hardware | Fine-grained | Limited; the language handles details |
| Typical uses | Device drivers, embedded firmware, performance-critical routines | Applications, web, data analysis, teaching |
Remember the ordering from Section 4.1: machine language is below assembly language.
Source code, object code, and the build process
- Source code: the human-readable program text a programmer writes and edits (
grades.java,game.py). - Object code: the machine-level (or intermediate) output of a compiler. It is not meant for people to read.
- Linker: combines object files and library code into one executable.
- Loader: the operating system component that places the executable in memory and starts it.
To change a program you need its source code. Companies that distribute only executables keep their source private, which is one reason open-source licenses (Section 3.1) require source availability.
Compilation vs. interpretation
| Compiler | Interpreter | |
|---|---|---|
| When translation happens | Before running, for the whole program | During running, statement by statement (often via an intermediate form) |
| Output | Object code, then an executable file | No separate executable; the interpreter runs the program |
| Error reporting | Syntax and type errors are reported before the program runs | Errors appear when the offending line is reached |
| Execution speed | Usually faster, because the work was done in advance | Usually slower, because translation happens at run time |
| Distribution | Share the executable (for a specific platform) | Share the source; users need the interpreter |
| Development cycle | Edit, compile, then run | Edit and run immediately; convenient for experimenting |
Many modern languages are hybrids. Java compiles source code to bytecode, which the Java Virtual Machine interprets or compiles "just in time" while the program runs. Python also compiles source to bytecode and runs it on its virtual machine. The distinction is still useful: a compiled workflow produces a standalone translation before execution, and an interpreted workflow translates as it executes.
Integrated development environments (IDEs)
An IDE bundles the tools of programming into one application. Examples include Visual Studio Code, IntelliJ IDEA, Eclipse, PyCharm, BlueJ, and Thonny.
| Component | What it does |
|---|---|
| Source code editor | Editing, with syntax highlighting, auto-indentation, and code completion |
| Build and run tools | Compile or interpret and run with one click; show output in a console |
| Debugger | Breakpoints, stepping through code, watching variables, viewing the call stack (Section 10.2) |
| Project or file manager | Organizes files, libraries, and settings |
| Error checking (linting) | Flags syntax errors and suspicious code while you type |
| Version control integration | Commit, branch, and review changes (Section 2.1) |
| Testing tools | Run unit tests and show results |
| Designers (some IDEs) | Drag-and-drop interface builders |
Benefits: faster development, immediate error feedback, integrated debugging, easy navigation of large projects, and consistent formatting.
Drawbacks: a learning curve for the tool itself, heavy memory and processor use, possible licensing costs, and complexity that can overwhelm beginners. By automating builds, an IDE can also hide what compiling and running involve. Some teachers start novices in simpler editors, or in beginner IDEs such as BlueJ or Thonny, for this reason.
Context-aware editors
ETS also lists context editors. These are editors, often part of an IDE, that use the context of the code being written to assist the programmer: syntax highlighting, autocompletion of variable and method names, pop-up parameter hints, and errors underlined as you type.
| Benefits | Costs |
|---|---|
| Fewer syntax and spelling errors | Suggestions can be wrong or distracting |
| Faster typing and API discovery | Beginners may rely on autocompletion instead of learning syntax |
| Immediate feedback on mistakes | More memory and processing, and slower on very large files |
| Easier navigation (jump to a definition) | Setup and configuration effort |
In a classroom, the right choice depends on the goal. Assistance helps students focus on logic, while a plainer editor can help them learn syntax precisely.
What is the role of a compiler in developing executable software?
Which statement correctly contrasts compiled and interpreted execution?
A student wants to pause a program at a particular line, execute it one statement at a time, and watch a variable's value change. Which IDE component provides this?
Which statement correctly distinguishes source code from object code?