ADVERTISEMENT
Google AdSense Slot (headerLeaderboard)

Set your Publisher ID in src/config/ads.ts to display live ads.

Introduction to Computer Programming• 6 min read

What is Code & How Computers Execute It

Understand how human-readable source code is translated into binary CPU machine instructions, and explore the architecture of modern processors.

From English to Machine Code

Computers at their core are physical machines made of billions of microscopic transistors that switch electrical current on or off, representing binary 1s and 0s. Programming languages give humans a structured, expressive vocabulary to instruct the hardware without writing raw binary.

Source code undergoes translation to be executable by a CPU:

Source Code: Human-readable text written in Python, C, JavaScript, or Java.
Assembly Language: A low-level mnemonic representation of CPU architecture instructions (e.g. MOV, ADD, JMP).
Machine Code: Pure binary hexadecimal opcodes directly decoded by the CPU execution units.

The Von Neumann Architecture

Modern computers follow the Von Neumann architecture, consisting of:

1Central Processing Unit (CPU): Executes arithmetic and logical instructions via an instruction cycle (Fetch, Decode, Execute).
2Random Access Memory (RAM): High-speed volatile memory where active programs and data reside.
3Storage (SSD/HDD): Non-volatile persistent storage where files remain saved after power off.
ADVERTISEMENT
Google AdSense Slot (inContentBanner)

Set your Publisher ID in src/config/ads.ts to display live ads.

Test Yourself With Exercise

+15 XP

What is the native language directly decoded and executed by a computer's Central Processing Unit (CPU)?