GCSE · Computer Science · Eduqas · Spec C500QS
Assemblers
Your processor does not understand LOAD, ADD or STORE. So how does a program full of them ever run? Something has to translate it first.
Predict, then check
A program has been assembled into machine code for one type of processor.
That machine code is copied onto a computer with a different type of processor. What do you predict?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a program written in assembly language becomes machine code the processor can execute.
What you need to know
- A translator is a program that converts code written in one language into another language, and an assembler is one type.
- Assembly language is low-level: each instruction is a short memorable code called a mnemonic.
- A mnemonic is often followed by an operand, such as a value or a memory address.
Have a goLook at the assembly instruction SUB 3. Which part is the mnemonic and which part is the operand?
SUB is the mnemonic. 3 is the operand.
The mnemonic is the short memorable code; the operand is the value or memory address that follows it.
- Machine code is the set of binary instructions that the processor (CPU) can execute directly.
- Here is the catch: a processor cannot execute assembly language directly, so the program has to be translated first.
Have a goSam says: "Assembly language is low-level, so the processor just runs it." Which step has Sam skipped?
Translating the program into machine code.
Being low-level does not make assembly language directly executable; it must first be translated into machine code.
- That is the purpose of an assembler: it translates a program written in assembly language into machine code.
- Each assembly instruction generally corresponds to one machine-code instruction, so the assembler converts each mnemonic instruction into its equivalent.
Have a goAn assembly program has 12 instructions. Roughly how many instructions will its machine code have?
About 12: one machine-code instruction for each.
Each assembly instruction generally corresponds to one equivalent machine-code instruction, so the counts match.
- Once the assembler has produced machine code, the processor can execute it.
- Finally, assembly language is specific to a particular type of processor, so the machine code is for that type too.
The big picture
An assembler is a translator that converts a program written in assembly language into machine code. Each mnemonic instruction is converted into its equivalent machine-code instruction, and the processor can then execute the machine code. It cannot execute assembly language directly.
Key points
Worked example
Problem
A two-line assembly program reads: MOV 9, then JMP 2. A made-up assembler turns MOV into 0101 and JMP into 0110, and writes each operand in four-bit binary. Write the machine code it produces, and say what the processor can do with it.
⚠ Watch out
Thinking the processor can run assembly language because it is low-level, or that the assembler runs the program. The assembler only translates; the processor executes the machine code it produces.
Memory hook
Assemble first, execute second: the assembler translates, then the processor executes the machine code.
Check yourself
Without looking back: say in one sentence what an assembler does, and in another sentence why the processor needs it.
Flashcards
(10)What is a translator?
What kind of program is an assembler?
What is assembly language?
What is a mnemonic?
What is an operand?
What is machine code?
Can a processor execute assembly language directly?
How many machine-code instructions does one assembly instruction generally give?
What happens to the machine code an assembler produces?
Which processors can run the machine code an assembler produces?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Eduqas GCSE Computer Science topics
How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.