Stage 1 · Lesson 7 of 7
Compilers, interpreters and bytecode
Source code has to be turned into something the machine can run. A translates the whole program ahead of time into , the 's own instructions. C, C++, Rust and Go work this way.
An interpreter reads your code and runs it as it goes. Early Python and JavaScript worked like that. Many modern languages mix both.
Java and C# compile to bytecode, a simpler in-between code, which a virtual machine then runs. That virtual machine often has a just-in-time (JIT) compiler, which turns frequently used "hot" code into machine code while the program runs. This explains why some errors appear when you compile and others only when a line actually runs.
It also explains why a Java program needs a JVM, the Java virtual machine, installed. The theory stage returns to how compilers work inside.
Common trapcalling a language "compiled" or "interpreted" when that is a property of an implementation.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CourseFreeCS50: Introduction to Computer Science
Harvard University · Beginner
The first weeks in C teach binary, memory, pointers and the stack and heap with excellent problem sets
- VideoFreeCrash Course Computer Science
CrashCourse · Beginner
Short videos from transistors to CPUs and memory; the quickest way to see the whole picture