Codele / How computers think
From your words to the chip
The chip only understands switches, but you write words like print. A translator program changes your code into switch patterns before it runs.
- The chip only understands switch patterns. Code like print(2 + 3) has to be translated first.
- The switch pattern in this lesson is a simplified illustration. Real chips use different patterns, and they differ from chip to chip.
- A compiler translates the whole program first, then the chip runs it. An interpreter translates one line, runs it, then moves to the next.
- Python and JavaScript are run by an interpreter, which does what each line says as it goes. C++ and Go are compiled first.
- Java and C# are compiled into an in-between form, which a helper program called a runtime then runs.
Loading the playable lesson…