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.

​

Computer Science · Translators

One program, two ways of writing it

  1. 1 Find
  2. 2 Find
  3. 3 Explore
  4. 4 Translate
  5. 5 Spot the mismatch
  6. 6 Challenge

Model. A made-up, simplified instruction set, for illustration only: it is not the instruction set of any real processor. Here every machine-code instruction is 8 bits: four bits for the mnemonic, then four bits for the operand written as a binary number.

Step 1 · Find

Which line of machine code came from the assembly instruction that has the operand 3? Tap it.

What the assembler produces: binary, one line for each instruction above.

Computer Science · The journey

From program to running code

the order in which these happen, from the start of the journey to the end

1 · Happens first4 · Happens last
  1. The processor executes the machine code

  2. The assembler translates the program

  3. Machine code is produced

  4. A programmer writes the program in assembly language

Computer Science · Side by side

Assembly language or machine code?

Tick every property that is true of each form. Then check: the cells where you differ are dashed.

Assembly language
Machine code

Computer Science · What do you think?

What does an assembler actually do?

Three students are arguing about assemblers.

Which idea is closest to what you think right now?
How sure are you?

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?

Exam practice · Eduqas

Say it the way the mark scheme wants

(a) State the purpose of an assembler. [1 mark] (b) Explain why a program written in assembly language must be assembled before the processor can execute it. [2 marks] [3 marks]

0 words · your answer stays on this page and is not sent anywhere.

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

1An assembler is a translator that converts assembly language into machine code.
2The processor can execute machine code directly; it cannot execute assembly language directly.
3Each mnemonic instruction is converted into its equivalent machine-code instruction.
4Assembly language is specific to a type of processor, so the machine code is for that type of processor.

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?
A program that converts code written in one language into another language.
What kind of program is an assembler?
A type of translator: it converts assembly language into machine code.
What is assembly language?
A low-level programming language in which each instruction is a short memorable code called a mnemonic.
What is a mnemonic?
A short memorable code for an instruction, such as ADD.
What is an operand?
A value or memory address that often follows the mnemonic in an instruction.
What is machine code?
The set of binary instructions that the processor can execute directly.
Can a processor execute assembly language directly?
No. The program must first be translated into machine code.
How many machine-code instructions does one assembly instruction generally give?
One: the assembler converts each mnemonic instruction into its equivalent.
What happens to the machine code an assembler produces?
The processor can then execute it.
Which processors can run the machine code an assembler produces?
Those of the type it was produced for, because assembly language is specific to a particular 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 posted

More Eduqas GCSE Computer Science topics

See the full Eduqas Computer Science curriculum →

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.