Instruction Groups (Cambridge (CIE) A Level Computer Science) : Revision Note

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Updated on

Categories of instructions

What are the categories of instructions?

  • Assembly language instructions can be grouped into:

    • Data movement

    • Input and output of data

    • Arithmetic operations

    • Unconditional and conditional instructions

    • Compare instructions

  • For each category, a table containing the instruction (Opcode and Operand), and an explanation is given

Category

Opcode

Operand

Explanation

Data Movement

LOAD

A

Loads the value stored at memory location A into the accumulator.

STORE

B

Stores the value from the accumulator into memory location B.

MOV

A, B

Copies the value from register/memory A to register/memory B.

CLEAR

ACC

Clears the accumulator (sets it to 0).

DATA

5

Declares a constant or data value (e.g. DATA 5 stores the value 5).

Input and Output of Data

IN

Takes input from a user or input device and stores it in the accumulator.

OUT

Outputs the value in the accumulator to a screen or output device.

Arithmetic Operations

ADD

A

Adds the value at memory location A to the accumulator.

SUB

B

Subtracts the value at memory location B from the accumulator.

INC

Increments the accumulator by 1.

DEC

Decrements the accumulator by 1.

Unconditional and Conditional

JMP

LABEL

Unconditionally jumps to the instruction at LABEL.

JZ

LABEL

Jumps to LABEL if the accumulator is zero.

JNZ

LABEL

Jumps to LABEL if the accumulator is not zero.

JC

LABEL

Jumps to LABEL if the carry flag is set.

HLT

Stops the program (halts execution).

Compare Instructions

CMP

A

Compares the accumulator with the value at memory location A.

TEST

A

Performs a logical AND between accumulator and A; sets flags, no output.

You've read 0 of your 5 free revision notes this week

Unlock more, it's free!

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

Expertise: Computer Science Content Creator

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.

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.