Learn the essential computer science fundamentals that power all modern software — including how code runs, what memory and CPU do, and how programming languages interact with machines. No prior experience needed. This course builds the mindset and foundation for programming, DSA, and interviews.
When we write code in any programming language, computers don’t directly understand it. We need a way to convert that code into a form the machine can execute — that’s where compilers and interpreters come in.
A compiler is a program that translates your entire source code into machine code at once. It generates an executable file (like `.exe`) that the computer can run.
An interpreter reads and executes code line-by-line. It does not generate a separate file. Execution stops at the first error it encounters.
| Feature | Compiler | Interpreter |
|---|---|---|
| Execution | Whole program at once | Line by line |
| Speed | Faster after compilation | Slower (re-interpreted each time) |
| Error Handling | All errors shown together | Stops at first error |
| Example Languages | C, C++ | Python, JS |
Some languages (like Java) use both. Java compiles code into bytecode using a compiler, then runs it line-by-line using the JVM (interpreter).
In the next chapter, we’ll break down how a program runs — from writing source code to final execution.