GCSE · Computer Science · AQA · Spec 8525
Assembler
A processor can't read a word of our programs, only binary. So how do names like LDA and ADD ever run? Watch the simplest translator do it, and count.
Computer Science · Translators
Watch an assembler work
A processor can only run machine code, which is instructions written in binary. Assembly language is the same kind of instructions written as short readable names called mnemonics, such as LDA and ADD. The assembler is the translator that swaps one for the other.
Predict before you press Next: this program has 4 assembly lines. How many machine code instructions will the assembler hand to the processor?
1 LDA 62 ADD 73 STO 84 HLT
Variables
Output
0001 0110
Step 1: LDA 6 means 'load the value at address 6'. LDA is the mnemonic and the 6 is the operand, the address it works on. The assembler swaps this one line for one instruction: 0001 is the code for LDA on this made-up processor, and 0110 is 6 in binary.
Press Next. The chips count lines read and instructions written, and the Output box is the machine code program growing, one instruction per line.
Predict, then check
You have just seen what an assembler does to one line. Now put two very different lines through translation.
ADD 7 is one line of assembly language. total = a + b is one statement of high-level code. Both are translated into machine code. How many machine code instructions does each one become?
Assembly and the processor
Reason it through
Why will a program written in assembly language generally only run on one type of processor?
First link · your turn
Every assembly instruction stands for one machine code instruction. Which processor's machine code instructions does it stand for?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
The simplest translator of all, and why high-level code needs a different one.
What you need to know
- A processor can only run machine code, which is binary.
- Assembly language is a readable form of machine code, written with mnemonics such as LDA, ADD and STO.
- An assembler translates assembly language into machine code, with exactly one machine code instruction for each assembly instruction.
- A compiler or interpreter translates high-level code, and one high-level statement becomes several machine code instructions.
- Assembly language is written for one type of processor, so its machine code generally only runs on that type.
The big picture
An assembler translates assembly language into machine code, swapping each assembly instruction for exactly one machine code instruction for one type of processor. Compilers and interpreters translate high-level code instead, where one statement becomes several machine code instructions.
Key points
Worked example
Problem
A made-up processor uses these 4-bit codes: LDA = 0001, STO = 0011, HLT = 1111. An address is written as 4-bit binary, and HLT has no address so its address half is 0000. Assemble this program, then say how many lines go in and how many machine code instructions come out. LDA 5 STO 9 HLT
⚠ Watch out
Treating assembly language as if it were machine code, or treating the assembler as just another compiler. Assembly is the readable form and machine code is the binary the processor runs. The assembler swaps one line for one instruction, where a compiler or interpreter turns one high-level statement into several.
Memory hook
ONE in, ONE out. An assembler is like a phrasebook that swaps each word for exactly one word. (The picture breaks at one point: an assembler swaps into binary for one type of processor.)
Check yourself
An assembly program has 9 lines: how many machine code instructions result? Same answer for 9 high-level statements? Answer: 9; no, each statement becomes several.
Flashcards
(11)What is the only kind of code a processor can run?
What is a mnemonic?
What is assembly language?
What does an assembler do?
How many machine code instructions does one assembly instruction become?
What does a compiler or interpreter do with one high-level statement?
Name the three translators from this lesson.
Which translator takes assembly language as its input?
In LDA 6, which part is the operand?
What is an instruction set?
Why does assembly generally run on only one type of processor?
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 AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)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 2 October 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.