Assembly Language (Cambridge (CIE) O Level Computer Science)

Revision Note

Robert Hampton

Expertise

Computer Science Content Creator

Assembly Language

What is assembly language?

  • Assembly language is a second generation, low-level language designed to simplify the writing of machine code instructions for programmers

  • Programmers use assembly language for the following reasons:

    • Need to make use of specific hardware or parts of the hardware

    • To complete specific machine dependent instructions

    • To ensure that too much space is not taken up in RAM

    • To ensure code can completed much faster

  • Assembly languages allow programmers to program with mnemonics. e.g.

    • LDA Load - this will ensure a value is added to the accumulator

    • ADD Addition - this will add the value input or loaded from memory to the value in the accumulator

    • STO, Store - stores the value in the accumulator in RAM

  • Assembly language allowed continuation of working directly with the hardware but removed an element of complexity

  • A mnemonic is received by the computer and it is looked up within a specific table

  • An assembler is needed to check the word so that it can be converted into machine code

  • If a match from the word is found e.g. STO the word is replaced with the relevant binary code to match that sequence

Worked Example

Complete the table to identify whether each example of computer code is High-level, Assembly language or Machine code

Computer code

High-level

Assembly

Machine code

10110111

00110110

11100110

FOR X = 1 to 10

PRINT x

NEXT X

INP X

STA X

LDA Y

[3]

Answer

Computer code

High-level

Assembly

Machine code

10110111

00110110

11100110

X

FOR X = 1 to 10

PRINT x

NEXT X

X

INP X

STA X

LDA Y

X

You've read 0 of your 0 free revision notes

Get unlimited access

to absolutely everything:

  • Downloadable PDFs
  • Unlimited Revision Notes
  • Topic Questions
  • Past Papers
  • Model Answers
  • Videos (Maths and Science)

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

Robert Hampton

Author: Robert Hampton

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.