Computers don't understand English. They need instructions written in a special way—a programming language. Some of these languages are easy for humans to understand, and others are designed to talk directly to the computer’s hardware. In this lesson, you'll learn the difference between high-level languages (like Python) and low-level ones (like assembly). You’ll also see how code changes as it goes from what you write to what the computer runs.
Learning Objectives
By the end of this lesson, I will be able to:
Explain what high- and low-level programming languages are.
Understand the difference between source code, machine code, and assembly code.
Give examples of where each type of language might be used.
High-Level Language – Easy to read, uses words like print or if (e.g., Python).
Low-Level Language – Harder to read, works directly with hardware (e.g., Assembly).
Source Code – The code you write in a language like Python.
Assembly Code – A step closer to machine code, using short keywords like ADD or LDA.
Machine Code – The 1s and 0s the CPU actually understands.
Think of programming languages like giving instructions to a robot. If you said, "Clean the room," the robot wouldn't understand unless you were very specific, like "move forward 2 steps, turn left, pick up toy." High-level languages let us talk more like humans, while low-level languages speak more like the robot.
High-level languages are designed for people to write easily. You don’t need to worry about the inner workings of the computer.
Examples: Python, Java, Scratch
Why use them?
Easy to understand and use
Work on many computers (portable)
Great for making apps, websites, and games
Example:
print("Hello World!")
This line tells the computer to show the message "Hello World!"—simple!
Low-level languages are more detailed and give you control over what the computer is doing, step-by-step. They’re like giving exact instructions to a robot arm in a factory.
Examples: Assembly code, machine code
Why use them?
Very fast to run
More control over hardware (good for devices like smartwatches or traffic lights)
Used where memory and performance really matter
Example of Assembly:
LDA 10
ADD 11
STA 12
This adds two numbers from memory and stores the result.
🚫 Mistake: Believing Python is "better" just because it’s easier.
✅ Tip: Different languages are useful in different situations.
Imagine building a smart speaker (like Alexa). The app that listens and talks to you might be written in Python. But the small chip that controls the speaker’s volume or buttons? That might use a low-level language so it works faster and with less power.
You’re designing a digital watch. Would you use Python or assembly language to control the time display and battery use? Why?
What does the CPU actually run—source code or machine code?
Why are high-level languages easier to learn?
What is one benefit of using a low-level language?
In your own words, what is "source code"?
Give one real-life device that might use a low-level language.