The specification for the course is shown on the left. This is a modified version of the AQA AS Computer Science specification in which some parts have been made more granular. For each part of the specification, statistics are shown for how many past papers it was examined in and the percentage of the total of all past marks that it makes up (where a question covers multiple parts of a specification, marks are divided equally between them for the purpose of this calculation). You can also click to view matching flashcards and past paper questions which will be shown on the right.

Paper 2 covers sections 5-9 of the AQA AS Computer Science specification.

5 Fundamentals of data representation

5.1 Number systems

5.1.1 Natural numbers

ReferenceContentAdditional informationQuestions
5.1.1.1
View

Be familiar with the concept of a natural number and the set ℕ of natural numbers (including zero).

ℕ = {0, 1, 2, 3, …}

Exams: 8 / 16Marks: 0.38%Questions: 9

5.1.2 Integer numbers

ReferenceContentAdditional informationQuestions
5.1.2.1
View

Be familiar with the concept of an integer and the set ℤ of integers.

ℤ = { …, -3, -2, -1, 0, 1, 2, 3, … }

Exams: 7 / 16Marks: 0.24%Questions: 7

5.1.3 Rational numbers

ReferenceContentAdditional informationQuestions
5.1.3.1
View

Be familiar with the concept of a rational number and the set ℚ of rational numbers, and that this set includes the integers.

ℚ is the set of numbers that can be written as fractions (ratios of integers). Since a number such as 7 can be written as 7/1, all integers are rational numbers.

Exams: 5 / 16Marks: 0.28%Questions: 7

5.1.4 Irrational numbers

ReferenceContentAdditional informationQuestions
5.1.4.1
View

Be familiar with the concept of an irrational number.

An irrational number is one that cannot be written as a fraction, for example √2.

Exams: 8 / 16Marks: 0.47%Questions: 8

5.1.5 Real numbers

ReferenceContentAdditional informationQuestions
5.1.5.1
View

Be familiar with the concept of a real number and the set ℝ of real numbers, which includes the natural numbers, the rational numbers, and the irrational numbers.

ℝ is the set of all 'possible real world quantities'.

Exams: 6 / 16Marks: 0.28%Questions: 6

5.1.6 Ordinal numbers

ReferenceContentAdditional informationQuestions
5.1.6.1
View

Be familiar with the concept of ordinal numbers and their use to describe the numerical positions of objects.

When objects are placed in order, ordinal numbers are used to tell their position. For example, if we have a well-ordered set S = {'a', 'b', 'c', 'd'}, then 'a' is the 1st object, 'b' the 2nd, and so on.

Exams: 2 / 16Marks: 0.21%Questions: 2

5.1.7 Counting and measurement

ReferenceContentAdditional informationQuestions
5.1.7.1
View

Be familiar with the use of natural numbers for counting.

Exams: 2 / 16Marks: 0.14%Questions: 2
5.1.7.2
View

Be familiar with the use of real numbers for measurement.

Exams: 3 / 16Marks: 0.21%Questions: 3

5.2 Number bases

5.2.1 Number base

ReferenceContentAdditional informationQuestions
5.2.1.1
View

Be familiar with the concept of a number base, in particular:

  • decimal (base 10)
  • binary (base 2)
  • hexadecimal (base 16)

Students should be familiar with expressing a number's base using a subscript as follows:

  • Base 10: Number10, eg 6710
  • Base 2: Number2, eg 100110112
  • Base 16: Number16, eg AE16
Exams: 0 / 16Marks: 0.00%Questions: 0
5.2.1.2
View

Convert between decimal, binary and hexadecimal number bases.

Exams: 9 / 16Marks: 0.86%Questions: 11
5.2.1.3
View

Be familiar with, and able to use, hexadecimal as a shorthand for binary and to understand why it is used in this way.

Exams: 4 / 16Marks: 0.29%Questions: 4

5.3 Units of information

5.3.1 Bits and bytes

ReferenceContentAdditional informationQuestions
5.3.1.1
View

Know that the bit is the fundamental unit of information.

A bit is either 0 or 1.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.3.1.2
View

Know that a byte is a group of 8 bits.

Exams: 2 / 16Marks: 0.07%Questions: 2
5.3.1.3
View

Know that 2n different values can be represented with n bits.

For example, 3 bits can be configured in 23 = 8 different ways: 000, 001, 010, 011, 100, 101, 110, 111.

Exams: 4 / 16Marks: 0.18%Questions: 4

5.3.2 Units

ReferenceContentAdditional informationQuestions
5.3.2.1
View

Know the names, symbols and corresponding powers of 10 for the decimal prefixes:

  • kilo, k - 103
  • mega, M - 106
  • giga, G - 109
  • tera, T - 1012
Exams: 2 / 16Marks: 0.11%Questions: 2
5.3.2.2
View

Know the names, symbols and corresponding powers of 2 for the binary prefixes:

  • kibi, Ki - 210
  • mebi, Mi - 220
  • gibi, Gi - 230
  • tebi, Ti - 240
Exams: 1 / 16Marks: 0.04%Questions: 1
5.3.2.3
View

Know that quantities of bytes can be described using binary prefixes representing powers of 2 or using decimal prefixes representing powers of 10, eg one kibibyte is written as 1KiB = 210 B and one kilobyte is written as 1 kB = 103 B.

Historically the terms kilobyte, megabyte, etc have often been used when kibibyte, mebibyte, etc are meant.

Exams: 3 / 16Marks: 0.18%Questions: 3

5.4 Binary number system

5.4.1 Unsigned binary

ReferenceContentAdditional informationQuestions
5.4.1.1
View

Know the difference between unsigned binary and signed binary.

Students are expected to be able to convert between unsigned binary and decimal and vice versa.

Exams: 2 / 16Marks: 0.07%Questions: 2
5.4.1.2
View

Know that in unsigned binary the minimum and maximum values for a given number of bits, n, are 0 and 2n - 1 respectively.

Exams: 1 / 16Marks: 0.14%Questions: 1

5.4.2 Unsigned binary arithmetic

ReferenceContentAdditional informationQuestions
5.4.2.1
View

Be able to add two unsigned binary integers.

Exams: 5 / 16Marks: 0.43%Questions: 5
5.4.2.2
View

Be able to multiply two unsigned binary integers.

Exams: 3 / 16Marks: 0.43%Questions: 3

5.4.3 Signed binary using two's complement

ReferenceContentAdditional informationQuestions
5.4.3.1
View

Know that signed binary can be used to represent negative integers and that one possible coding scheme is two's complement.

This is the only representation of negative integers that will be examined. Students are expected to be able to convert between signed binary and decimal and vice versa.

Exams: 1 / 16Marks: 0.07%Questions: 1
5.4.3.2
View

Know how to represent negative and positive integers in two's complement.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.4.3.3
View

Know how to perform subtraction using two's complement.

Exams: 5 / 16Marks: 0.64%Questions: 5
5.4.3.4
View

Know how to calculate the range of a given number of bits, n.

Exams: 2 / 16Marks: 0.14%Questions: 2

5.4.4 Numbers with a fractional part

ReferenceContentAdditional informationQuestions
5.4.4.1
View

Know how numbers with a fractional part can be represented in fixed point form in binary in a given number of bits.

Exams: 1 / 16Marks: 0.07%Questions: 1
5.4.4.2
View

Be able to convert decimal to fixed point binary of a given number of bits.

Exams: 1 / 16Marks: 0.14%Questions: 1
5.4.4.3
View

Be able to convert fixed point binary to decimal of a given number of bits.

Exams: 4 / 16Marks: 0.57%Questions: 4

5.5 Information coding systems

5.5.1 Character form of a decimal digit

ReferenceContentAdditional informationQuestions
5.5.1.1
View

Differentiate between the character code representation of a decimal digit and its pure binary representation.

Exams: 3 / 16Marks: 0.21%Questions: 3

5.5.2 ASCII and Unicode

ReferenceContentAdditional informationQuestions
5.5.2.1
View

Describe ASCII and Unicode coding systems for coding character data.

Exams: 1 / 16Marks: 0.07%Questions: 1
5.5.2.2
View

Explain why Unicode was introduced.

Exams: 3 / 16Marks: 0.43%Questions: 3

5.5.3 Error checking and correction

ReferenceContentAdditional informationQuestions
5.5.3.1
View

Describe and explain the use of parity bits.

Exams: 8 / 16Marks: 0.89%Questions: 9
5.5.3.2
View

Describe and explain the use of majority voting.

Exams: 4 / 16Marks: 0.57%Questions: 4
5.5.3.3
View

Describe and explain the use of check digits.

Exams: 1 / 16Marks: 0.14%Questions: 1
5.5.3.4
View

Evaluate the use of parity bits, majority voting and check digits

Exams: 5 / 16Marks: 0.57%Questions: 5

5.6 Representing images, sound and other data

5.6.1 Bit patterns, images, sound and other data

ReferenceContentAdditional informationQuestions
5.6.1.1
View

Describe how bit patterns may represent other forms of data, including graphics and sound.

Exams: 0 / 16Marks: 0.00%Questions: 0

5.6.2 Analogue and digital

ReferenceContentAdditional informationQuestions
5.6.2.1
View

Understand the difference between analogue and digital:

  • data
  • signals
Exams: 3 / 16Marks: 0.43%Questions: 3

5.6.3 Analogue/digital conversion

ReferenceContentAdditional informationQuestions
5.6.3.1
View

Describe the principles of operation of an analogue to digital converter (ADC).

Exams: 5 / 16Marks: 0.86%Questions: 5
5.6.3.2
View

Describe the principles of operation of a digital to analogue converter (DAC).

Exams: 1 / 16Marks: 0.07%Questions: 1

5.6.4 Bitmapped graphics

ReferenceContentAdditional informationQuestions
5.6.4.1
View

Explain how bitmaps are represented.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.6.4.2
View

Explain resolution.

Resolution is expressed as number of dots per inch where a dot is a pixel.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.6.4.3
View

Know that colour depth is the number of bits stored for each pixel.

Exams: 2 / 16Marks: 0.14%Questions: 2
5.6.4.4
View

Know that the size of an image in pixels is width of image in pixels × height of image in pixels.

The size of an image is also alternatively sometimes described as the resolution of an image.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.6.4.5
View

Calculate storage requirements for bitmapped images and be aware that bitmap image files may also contain metadata.

Ignoring metadata, storage requirements = size in pixels x colour depth where size in pixels is width in pixels x height in pixels.

Exams: 8 / 16Marks: 1.36%Questions: 9
5.6.4.6
View

Be familiar with typical metadata.

eg width, height, colour depth.

Exams: 1 / 16Marks: 0.07%Questions: 1

5.6.5 Digital representation of sound

ReferenceContentAdditional informationQuestions
5.6.5.1
View

Describe the digital representation of sound.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.6.5.2
View

Understand sample resolution and its effect on the quality of audio recordings.

Exams: 4 / 16Marks: 0.43%Questions: 5
5.6.5.3
View

Understand sampling rate and its effect on the quality of audio recordings.

Exams: 2 / 16Marks: 0.14%Questions: 2
5.6.5.4
View

Know Nyquist's theorem.

Exams: 4 / 16Marks: 0.43%Questions: 4
5.6.5.5
View

Calculate sound sample sizes in bytes.

Exams: 8 / 16Marks: 1.43%Questions: 8

5.6.6 Musical Instrument Digital Interface (MIDI)

ReferenceContentAdditional informationQuestions
5.6.6.1
View

Describe the purpose of MIDI and the use of event messages in MIDI.

Exams: 3 / 16Marks: 0.43%Questions: 3
5.6.6.2
View

Describe the advantages of using MIDI files for representing music.

Exams: 5 / 16Marks: 0.71%Questions: 5

5.6.7 Data compression

ReferenceContentAdditional informationQuestions
5.6.7.1
View

Know why images and sound files are often compressed and that other files, such as text files, can also be compressed.

Exams: 1 / 16Marks: 0.07%Questions: 1
5.6.7.2
View

Understand the difference between lossless and lossy compression and explain the advantages and disadvantages of each.

Exams: 5 / 16Marks: 0.86%Questions: 5
5.6.7.3
View

Explain the principles behind run length encoding (RLE) for lossless compression.

Exams: 4 / 16Marks: 0.79%Questions: 6
5.6.7.4
View

Explain the principles behind dictionary-based methods for lossless compression.

Exams: 2 / 16Marks: 0.43%Questions: 3

5.6.8 Encryption

ReferenceContentAdditional informationQuestions
5.6.8.1
View

Understand what is meant by encryption and be able to define it.

Caesar and Vernam ciphers are at opposite extremes. One offers perfect security, the other doesn't. Between these two types are ciphers that are computationally secure – see below. Students will be assessed on the two types. Ciphers other than Caesar may be used to assess students' understanding of the principles involved. These will be explained and be similar in terms of computational complexity.

Exams: 1 / 16Marks: 0.07%Questions: 1
5.6.8.2
View

Be familiar with the term cipher.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.6.8.3
View

Be familiar with the term plaintext.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.6.8.4
View

Be familiar with the term ciphertext.

Exams: 0 / 16Marks: 0.00%Questions: 0
5.6.8.5
View

Be familiar with Caesar cipher and be able to apply it to encrypt a plaintext message and decrypt a ciphertext.

Exams: 6 / 16Marks: 0.64%Questions: 6
5.6.8.6
View

Be able to explain why Caesar cipher is easily cracked.

Exams: 3 / 16Marks: 0.36%Questions: 4
5.6.8.7
View

Be familiar with Vernam cipher or one-time pad and be able to apply it to encrypt a plaintext message and decrypt a ciphertext.

Since the key k is chosen uniformly at random, the ciphertext c is also distributed uniformly. The key k must be used once only. The key k is known as a one-time pad.

Exams: 4 / 16Marks: 0.75%Questions: 4
5.6.8.8
View

Explain why Vernam cipher is considered as a cypher with perfect security.

Exams: 4 / 16Marks: 0.43%Questions: 4
5.6.8.9
View

Compare Vernam cipher with ciphers that depend on computational security.

Vernam cipher is the only one to have been mathematically proved to be completely secure. The worth of all other ciphers ever devised is based on computational security. In theory, every cryptographic algorithm except for Vernam cipher can be broken, given enough ciphertext and time.

Exams: 1 / 16Marks: 0.07%Questions: 1

6 Fundamentals of computer systems

6.1 Hardware and software

6.1.1 Relationship between hardware and software

ReferenceContentAdditional informationQuestions
6.1.1.1
View

Define the term hardware.

Exams: 1 / 16Marks: 0.07%Questions: 1
6.1.1.2
View

Define the term software.

Exams: 2 / 16Marks: 0.14%Questions: 2
6.1.1.3
View

Understand the relationship between hardware and software.

Exams: 1 / 16Marks: 0.07%Questions: 1

6.1.2 Classification of software

ReferenceContentAdditional informationQuestions
6.1.2.1
View

Explain what is meant by system software.

Exams: 3 / 16Marks: 0.21%Questions: 3
6.1.2.2
View

Explain what is meant by application software.

Exams: 2 / 16Marks: 0.14%Questions: 2
6.1.2.3
View

Understand the need for, and attributes of, different types of software.

Exams: 0 / 16Marks: 0.00%Questions: 0

6.1.3 System software

ReferenceContentAdditional informationQuestions
6.1.3.1
View

Know that system software includes operating systems (OSs), utility programs, libraries and translators (compiler, assembler, interpreter).

Exams: 4 / 16Marks: 0.43%Questions: 4
6.1.3.2
View

Understand the need for, and functions of operating systems (OSs).

Exams: 1 / 16Marks: 0.07%Questions: 1
6.1.3.3
View

Understand the need for, and functions of utility programs.

Exams: 2 / 16Marks: 0.21%Questions: 2
6.1.3.4
View

Understand the need for, and functions of libraries.

Exams: 1 / 16Marks: 0.14%Questions: 1
6.1.3.5
View

Understand the need for, and functions of translators (compiler, assembler, interpreter).

Exams: 1 / 16Marks: 0.29%Questions: 1

6.1.4 Role of an operating system (OS)

ReferenceContentAdditional informationQuestions
6.1.4.1
View

Understand that a role of the operating system is to hide the complexities of the hardware.

Exams: 2 / 16Marks: 0.14%Questions: 2
6.1.4.2
View

Know that the OS handles resource management, managing hardware to allocate processors, memories and I/O devices among competing processes.

Exams: 5 / 16Marks: 0.50%Questions: 5

6.2 Classification of programming languages

6.2.1 Classification of programming languages

ReferenceContentAdditional informationQuestions
6.2.1.1
View

Show awareness of the development of types of programming languages and their classification into low- and high-level languages.

Exams: 1 / 16Marks: 0.07%Questions: 1
6.2.1.2
View

Know that low-level languages are considered to be:

  • machine-code
  • assembly language
Exams: 1 / 16Marks: 0.07%Questions: 1
6.2.1.3
View

Know that high-level languages include imperative high-level language.

Exams: 2 / 16Marks: 0.14%Questions: 2
6.2.1.4
View

Describe machine-code language and assembly language.

Exams: 2 / 16Marks: 0.21%Questions: 2
6.2.1.5
View

Understand the advantages and disadvantages of machine-code and assembly language programming compared with high-level language programming.

Exams: 6 / 16Marks: 1.50%Questions: 6
6.2.1.6
View

Explain the term 'imperative high-level language' and its relationship to low-level languages.

Exams: 1 / 16Marks: 0.14%Questions: 1

6.3 Types of program translator

6.3.1 Types of program translator

ReferenceContentAdditional informationQuestions
6.3.1.1
View

Understand the role of assemblers.

Exams: 1 / 16Marks: 0.07%Questions: 1
6.3.1.2
View

Understand the role of compilers.

Exams: 1 / 16Marks: 0.07%Questions: 1
6.3.1.3
View

Understand the role of interpreters.

Exams: 0 / 16Marks: 0.00%Questions: 0
6.3.1.4
View

Explain the differences between compilation and interpretation. Describe situations in which each would be appropriate.

Exams: 3 / 16Marks: 0.71%Questions: 3
6.3.1.5
View

Explain why an intermediate language such as bytecode is produced as the final output by some compilers and how it is subsequently used.

Exams: 2 / 16Marks: 0.43%Questions: 4
6.3.1.6
View

Understand the difference between source and object (executable) code.

Exams: 0 / 16Marks: 0.00%Questions: 0

6.4 Logic gates

6.4.1 Logic gates

ReferenceContentAdditional informationQuestions
6.4.1.1
View

Construct truth tables for the NOT logic gate.

Students should know and be able to use ANSI/IEEE standard 91-1984 Distinctive shape logic gate symbols for these logic gates.

Exams: 0 / 16Marks: 0.00%Questions: 0
6.4.1.2
View

Construct truth tables for the AND logic gate.

Exams: 0 / 16Marks: 0.00%Questions: 0
6.4.1.3
View

Construct truth tables for the OR logic gate.

Exams: 2 / 16Marks: 0.06%Questions: 2
6.4.1.4
View

Construct truth tables for the XOR logic gate.

Exams: 4 / 16Marks: 0.24%Questions: 4
6.4.1.5
View

Construct truth tables for the NAND logic gate.

Exams: 4 / 16Marks: 0.25%Questions: 4
6.4.1.6
View

Construct truth tables for the NOR logic gate.

Exams: 3 / 16Marks: 0.17%Questions: 3
6.4.1.7
View

Be familiar with drawing and interpreting logic gate circuit diagrams involving one or more of the above gates.

Exams: 6 / 16Marks: 1.14%Questions: 7
6.4.1.8
View

Complete a truth table for a given logic gate circuit.

Exams: 10 / 16Marks: 1.86%Questions: 10
6.4.1.9
View

Write a Boolean expression for a given logic gate circuit.

Exams: 5 / 16Marks: 0.79%Questions: 5
6.4.1.10
View

Draw an equivalent logic gate circuit for a given Boolean expression.

Exams: 4 / 16Marks: 0.93%Questions: 4

6.5 Boolean algebra

6.5.1 Using Boolean algebra

ReferenceContentAdditional informationQuestions
6.5.1.1
View

Be familiar with the use of Boolean identities and De Morgan's laws to manipulate and simplify Boolean expressions.

Exams: 15 / 16Marks: 4.71%Questions: 20

7 Fundamentals of computer organisation and architecture

7.1 Internal hardware components of a computer

7.1.1 Internal hardware components of a computer

ReferenceContentAdditional informationQuestions
7.1.1.1
View

Have an understanding and knowledge of the basic internal components of a computer system.

Although exam questions about specific machines will not be asked, it might be useful to base this section on the machines used at the centre.

Exams: 0 / 16Marks: 0.00%Questions: 0
7.1.1.2
View

Understand the role of the processor.

Exams: 1 / 16Marks: 0.03%Questions: 1
7.1.1.3
View

Understand the role of main memory.

Exams: 2 / 16Marks: 0.17%Questions: 2
7.1.1.4
View

Understand the role of the address bus.

Exams: 5 / 16Marks: 0.41%Questions: 6
7.1.1.5
View

Understand the role of the data bus.

Exams: 4 / 16Marks: 0.30%Questions: 4
7.1.1.6
View

Understand the role of the control bus.

Exams: 2 / 16Marks: 0.17%Questions: 2
7.1.1.7
View

Understand the role of I/O controllers.

Exams: 2 / 16Marks: 0.17%Questions: 2
7.1.1.8
View

Be able to explain the difference between von Neumann and Harvard architectures and describe where each is typically used.

Embedded systems such as digital signal processing (DSP) systems use Harvard architecture processors extensively. Von Neumann architecture is used extensively in general purpose computing systems.

Exams: 4 / 16Marks: 0.64%Questions: 5
7.1.1.9
View

Understand the concept of addressable memory.

Exams: 0 / 16Marks: 0.00%Questions: 0

7.2 The stored program concept

7.2.1 The meaning of the stored program concept

ReferenceContentAdditional informationQuestions
7.2.1.1
View

Be able to describe the stored program concept: machine code instructions stored in main memory are fetched and executed serially by a processor that performs arithmetic and logical operations.

Exams: 5 / 16Marks: 0.57%Questions: 5

7.3 Structure and role of the processor and its components

7.3.1 The processor and its components

ReferenceContentAdditional informationQuestions
7.3.1.1
View

Explain the role and operation of the arithmetic logic unit.

Exams: 1 / 16Marks: 0.07%Questions: 1
7.3.1.2
View

Explain the role and operation of the control unit.

Exams: 1 / 16Marks: 0.21%Questions: 1
7.3.1.3
View

Explain the role and operation of the clock.

Exams: 0 / 16Marks: 0.00%Questions: 0
7.3.1.4
View

Explain the role and operation of general-purpose registers.

Exams: 2 / 16Marks: 0.14%Questions: 2
7.3.1.5
View

Explain the role and operation of the program counter.

Exams: 0 / 16Marks: 0.00%Questions: 0
7.3.1.6
View

Explain the role and operation of the current instruction register.

Exams: 1 / 16Marks: 0.05%Questions: 1
7.3.1.7
View

Explain the role and operation of the memory address register.

Exams: 1 / 16Marks: 0.04%Questions: 1
7.3.1.8
View

Explain the role and operation of the memory buffer register.

Exams: 2 / 16Marks: 0.08%Questions: 2
7.3.1.9
View

Explain the role and operation of the status register.

Exams: 1 / 16Marks: 0.14%Questions: 1

7.3.2 The Fetch-Execute cycle and the role of registers within it

ReferenceContentAdditional informationQuestions
7.3.2.1
View

Explain how the Fetch-Execute cycle is used to execute machine code programs, including the stages in the cycle (fetch, decode, execute) and details of registers used.

Exams: 7 / 16Marks: 2.10%Questions: 8

7.3.3 The processor instruction set

ReferenceContentAdditional informationQuestions
7.3.3.1
View

Understand the term 'processor instruction set' and know that an instruction set is processor specific.

Exams: 2 / 16Marks: 0.29%Questions: 2
7.3.3.2
View

Know that instructions consist of an opcode and one or more operands (value, memory address or register).

A simple model will be used in which the addressing mode will be incorporated into the bits allocated to the opcode so the latter defines both the basic machine operation and the addressing mode. Students will not be expected to define opcode, only interpret opcodes in the given context of a question.

For example, 4 bits have been allocated to the opcode (3 bits for basic machine operation, eg ADD, and 1 bit for the addressing mode). 4 bits have been allocated to the operand, making the instruction, opcode + operand, 8 bits in length. In this example, 16 different opcodes are possible (24 = 16).

OpcodeOperand
Basic Machine OperationAddressing Mode
00100101
Exams: 4 / 16Marks: 0.39%Questions: 4

7.3.4 Addressing modes

ReferenceContentAdditional informationQuestions
7.3.4.1
View

Understand and apply immediate addressing.

Immediate addressing: the operand is the datum.

Exams: 3 / 16Marks: 0.18%Questions: 3
7.3.4.2
View

Understand and apply direct addressing.

Direct addressing: the operand is the address of the datum. Address to be interpreted as meaning either main memory or register.

Exams: 2 / 16Marks: 0.11%Questions: 2

7.3.5 Machine-code/assembly language operations

ReferenceContentAdditional informationQuestions
7.3.5.1
View

Understand and apply the basic machine-code operations of:

  • load
  • add
  • subtract
  • store
  • branching (conditional and unconditional)
  • compare
  • logical bitwise operators (AND, OR, NOT, XOR)
  • logical
  • shift right
  • shift left
  • halt

Use the basic machine-code operations above when machine-code instructions are expressed in mnemonic form—assembly language, using immediate and direct addressing.

Exams: 16 / 16Marks: 6.54%Questions: 28

7.3.6 Factors affecting processor performance

ReferenceContentAdditional informationQuestions
7.3.6.1
View

Explain the effect on processor performance of multiple cores.

Exams: 2 / 16Marks: 0.19%Questions: 2
7.3.6.2
View

Explain the effect on processor performance of cache memory.

Exams: 4 / 16Marks: 0.57%Questions: 4
7.3.6.3
View

Explain the effect on processor performance of clock speed.

Exams: 4 / 16Marks: 0.42%Questions: 4
7.3.6.4
View

Explain the effect on processor performance of word length.

Exams: 3 / 16Marks: 0.28%Questions: 3
7.3.6.5
View

Explain the effect on processor performance of address bus width.

Exams: 3 / 16Marks: 0.35%Questions: 3
7.3.6.6
View

Explain the effect on processor performance of data bus width.

Exams: 4 / 16Marks: 0.35%Questions: 4

7.4 External hardware devices

7.4.1 Input and output devices

ReferenceContentAdditional informationQuestions
7.4.1.1
View

Know the main characteristics, purpose and suitability of barcode readers and understand their principles of operation.

Exams: 2 / 16Marks: 0.29%Questions: 2
7.4.1.2
View

Know the main characteristics, purpose and suitability of digital cameras and understand their principles of operation.

Exams: 3 / 16Marks: 0.68%Questions: 3
7.4.1.3
View

Know the main characteristics, purpose and suitability of laser printers and understand their principles of operation.

Exams: 2 / 16Marks: 0.96%Questions: 3
7.4.1.4
View

Know the main characteristics, purpose and suitability of RFID and understand their principles of operation.

Exams: 5 / 16Marks: 1.71%Questions: 7

7.4.2 Secondary storage devices

ReferenceContentAdditional informationQuestions
7.4.2.1
View

Explain the need for secondary storage within a computer system.

Exams: 1 / 16Marks: 0.14%Questions: 1
7.4.2.2
View

Know the main characteristics, purposes, suitability and understand the principles of operation of the hard disk.

Exams: 1 / 16Marks: 0.86%Questions: 1
7.4.2.3
View

Know the main characteristics, purposes, suitability and understand the principles of operation of the optical disk.

Exams: 2 / 16Marks: 0.50%Questions: 2
7.4.2.4
View

Know the main characteristics, purposes, suitability and understand the principles of operation of the solid-state disk (SSD).

SSD = NAND flash memory + a controller that manages pages, and blocks and complexities of writing. Based on floating gate transistors that trap and store charge. A block, made up of many pages, cannot overwrite pages; a page has to be erased before it can be written to but technology requires the whole block to be erased. Lower latency and faster transfer speeds than a magnetic disk drive.

Exams: 4 / 16Marks: 0.93%Questions: 4
7.4.2.5
View

Compare the capacity and speed of access of various media and make a judgement about their suitability for different applications.

Exams: 5 / 16Marks: 0.79%Questions: 5

8 Consequences of uses of computing

8.1 Individual (moral), social (ethical), legal and cultural issues and opportunities

ReferenceContentAdditional informationQuestions
8.1.1
View

Show awareness of current individual (moral), social (ethical), legal and cultural opportunities and risks of computing.

Understand that:

  • developments in computer science and digital technologies have dramatically altered the shape of communications and information flows in societies, enabling massive transformations in the capacity to:
    • monitor behaviour
    • amass and analyse personal information
    • distribute, publish, communicate and disseminate personal information
  • computer scientists and software engineers therefore have power, as well as the responsibilities that go with it, in the algorithms that they devise and the code that they deploy.
  • software and their algorithms embed moral and cultural values.
  • the issue of scale, for software the whole world over, creates potential for individual computer scientists and software engineers to produce great good, but with it comes the ability to cause great harm.

Be able to discuss the challenges facing legislators in the digital age.

Teachers may wish to employ two very powerful techniques, hypotheticals and case studies, to engage students in the issues.

Hypotheticals allow students to isolate quickly important ethical principles in an artificially simplified context. For example, a teacher might ask students to explain and defend how, as a Google project manager, they would evaluate a proposal to bring Google's Street View technology to a remote African village. What questions should be asked? Who should be consulted? What benefits, risks and safeguards considered? What are the trade-offs?

Case studies allow students to confront the tricky interplay between the sometimes competing ethical values and principles relevant in real world settings. For example, the Google Street View case might be used to tease out the ethical conflicts between individual and cultural expectations, the principle of informed consent, Street View's value as a service, its potential impact on human perceptions and behaviours, and its commercial value to Google and its shareholders.

There are many resources available on the Internet to support teaching of this topic.

Exams: 12 / 16Marks: 5.42%Questions: 12

9 Fundamentals of communication and networking

9.1 Communication

9.1.1 Communication methods

ReferenceContentAdditional informationQuestions
9.1.1.1
View

Define serial transmission methods.

Exams: 1 / 16Marks: 0.07%Questions: 1
9.1.1.2
View

Define parallel transmission methods.

Exams: 2 / 16Marks: 0.21%Questions: 2
9.1.1.3
View

Discuss the advantages of serial over parallel transmission.

Exams: 4 / 16Marks: 0.79%Questions: 4
9.1.1.4
View

Define and compare synchronous and asynchronous data transmission.

Exams: 3 / 16Marks: 0.43%Questions: 4
9.1.1.5
View

Describe the purpose of start and stop bits in asynchronous data transmission.

Exams: 4 / 16Marks: 0.39%Questions: 5

9.1.2 Communication basics

ReferenceContentAdditional informationQuestions
9.1.2.1
View

Define baud rate.

Exams: 2 / 16Marks: 0.14%Questions: 2
9.1.2.2
View

Define bit rate.

Exams: 2 / 16Marks: 0.14%Questions: 2
9.1.2.3
View

Define bandwidth.

Exams: 4 / 16Marks: 0.30%Questions: 4
9.1.2.4
View

Define latency.

Exams: 3 / 16Marks: 0.16%Questions: 3
9.1.2.5
View

Define protocol.

Exams: 3 / 16Marks: 0.29%Questions: 3
9.1.2.6
View

Differentiate between baud rate and bit rate.

Bit rate can be higher than baud rate if more than one bit is encoded in each signal change.

Exams: 4 / 16Marks: 0.23%Questions: 4
9.1.2.7
View

Understand the relationship between bit rate and bandwidth.

Bit rate is directly proportionate to bandwidth.

Exams: 4 / 16Marks: 0.23%Questions: 4

9.2 Networking

9.2.1 Network topology

ReferenceContentAdditional informationQuestions
9.2.1.1
View

Understand and explain the operation of a physical star topology.

Exams: 2 / 16Marks: 0.29%Questions: 2
9.2.1.2
View

Understand and explain the operation of a logical bus network topology.

A network physically wired in star topology can behave logically as a bus network by using a bus protocol and appropriate physical switching.

Exams: 2 / 16Marks: 0.36%Questions: 2
9.2.1.3
View

Differentiate between the physical star topology and the logical bus network topology.

Exams: 3 / 16Marks: 0.36%Questions: 3

9.2.2 Types of networking between hosts

ReferenceContentAdditional informationQuestions
9.2.2.1
View

Explain peer-to-peer networking and describe situations where it might be used.

In a peer-to-peer network, each computer has equal status.

Exams: 5 / 16Marks: 0.89%Questions: 6
9.2.2.2
View

Explain client-server networking and describe situations where it might be used.

In a client-server network, most computers are nominated as clients and one or more as servers. The clients request services from the servers, which provide these services, for example file server, email server.

Exams: 5 / 16Marks: 0.68%Questions: 5

9.2.3 Wireless networking

ReferenceContentAdditional informationQuestions
9.2.3.1
View

Explain the purpose of WiFi.

A wireless local area network that is based on international standards.

Used to enable devices to connect to a network wirelessly.

Exams: 2 / 16Marks: 0.28%Questions: 2
9.2.3.2
View

Be familiar with the components required for wireless networking.

  • Wireless network adapter
  • Wireless access point
Exams: 1 / 16Marks: 0.07%Questions: 1
9.2.3.3
View

Be familiar with the purpose of Service Set Identifier (SSID).

Exams: 3 / 16Marks: 0.29%Questions: 3
9.2.3.4
View

Be familiar with how wireless networks are secured using WPA (Wifi Protected Access)/WPA2.

Exams: 4 / 16Marks: 0.43%Questions: 4
9.2.3.5
View

Be familiar with how wireless networks are secured by disabling SSID (Service Set Identifier) broadcasting.

Exams: 6 / 16Marks: 0.65%Questions: 6
9.2.3.6
View

Be familiar with how wireless networks are secured using a MAC (Media Access Control) address allow list.

Exams: 6 / 16Marks: 0.79%Questions: 6
9.2.3.7
View

Explain the wireless protocol Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) with and without Request to Send/Clear to Send (RTS/CTS).

Exams: 3 / 16Marks: 1.14%Questions: 3

No flashcards added yet.

AS-Level2024June8open4 marks

Registers R1 and R3 each store a different positive number.

Write a program using the standard AQA assembly language that will:

  • store the greater of these two numbers in R1
  • store 1 in R2 if the value originally in R1 is greater than the value in R3, storing 3 in R2 otherwise.
  • Comparing the values in R1 and R3
    A. Indirect comparisons
  • Using a branch instruction to execute different blocks of code.
  • Always terminating with the greater number stored in R1.
  • Terminating with 1 stored in R2 when the greater number was in R1 and 3 stored in R2 otherwise.

Max 3 marks for programming if any syntax incorrect or program does not work correctly under all circumstances

Example 1
CMP R1, R3
BGT r1bigger
MOV R1, R3
MOV R2, #3
B Done
r1bigger: MOV R2, #1
done: HALT

Example 2
SUB R2, R1, R3
CMP R2, #0
BGT finish
MOV R2, #1
B done
finish: MOV R1, R3
MOV R2, #3
done: HALT

Example 3
MOV R2, #1
CMP R1, R3
BGT done
MOV R1, R3
MOV R2, #3
done: HALT

AS-Level2023June9openDiagram4 marks

Figure 4 shows an algorithm written in pseudo-code. It is used to calculate the value of the contents of variable A multiplied by the contents of variable B.

Line numbers are included in the pseudo-code but are not part of the algorithm.

Write a sequence of assembly language instructions that would perform the same function as the pseudo-code in Figure 4.

Registers R1, R2 and R3 are used to hold the values of A, B and C respectively. The assembly language code equivalent to line numbers 1 to 3 in Figure 4 have been completed for you.

Marks are for AO3 (programming):

1 mark: Comparing R2 against #0 and having a BGT/BEQ, or #1 and having a BLT

1 mark: Adding R1 to R3 and storing result in R3

1 mark: Subtracting #1 from R2 and storing result in R2

1 mark: Having a B to branch to the start

Max 3 marks for programming if any syntax incorrect or program does not work correctly under all circumstances.

AS-Level2022June9.1multiple-choiceDiagram1 mark

Shade one lozenge to show which of the assembly instructions in Figure 7 uses immediate addressing.

Figure 7

InstructionImmediate Addressing
A LDR R3, 42
B MOV R3, #42
C STR R3, 101
D SUB R3, R2, R1
  • A:LDR R3, 42
  • B:MOV R3, #42
  • C:STR R3, 101
  • D:SUB R3, R2, R1
  • B MOV R3, #42;
  • R. More than one lozenge shaded.
AS-Level2022June9.2open4 marks

A computer program is required that will multiply the value stored in X by 2 if it is less than 50 and leave it unchanged if it is 50 or more.

The algorithm for this task can be written in pseudocode as:

IF X < 50 THEN
X ← X * 2
ENDIF

Write an assembly language program using the AQA assembly language instruction set shown in Table 1 to carry out this task.

At the start, the value of X is stored in memory location 101.

  • 1 mark for each program point:
    • Loading value from 101 into R1 (e.g., LDR R1, 101);
    • Comparing R1 against the operand 50 (e.g., CMP R1, #50);
    • Branching using BGT and BEQ, or BLT, with a suitable label;
    • Using a logical shift left to double the number (e.g., LSL R1, R1, #1);
    • Storing the value (even if incorrect) in R1 back to memory location 101;
  • MAX 3 marks for programming if any syntax incorrect or program does not work correctly under all circumstances.
  • Max 4
AS-Level2020June7.1openDiagram4 marks

Write an assembly language program to encrypt a single character using the Caesar cipher. The character to be encrypted is represented using a character set consisting of 26 characters with character codes 0–25. The output of the process should be the character code of the encrypted character.

Memory location 100 contains the character code to be encrypted, which is in the range 0–25. Memory location 101 contains an integer key to be used for encryption, which is in the range 0–25. The program should store the character code of the encrypted character in memory location 102.

Example 1:
LDR R0, 100
LDR R1, 101
ADD R2, R0, R1
CMP R2, #26
BLT store
SUB R2, R2, #26
store: STR R2, 102

Example 2:
LDR R0, 100
LDR R1, 101
ADD R2, R0, R1
CMP R2, #25
BGT adjust
STR R2, 102
HALT
adjust: SUB R2, R2, #26
STR R2, 102

Example 3:
LDR R0, 100
LDR R1, 101
ADD R2, R0, R1
CMP R2, #25
BGT adjust
B end
adjust: SUB R2, R2, #26
end: STR R2, 102

A. Use of alternative registers
A. Any label name in place of store / adjust
DPT. Use of invalid register name eg Rd
DPT. Use of incorrect addressing mode
DPT. Inclusion of invalid symbols in commands

Programming Marks:

  • 1 Mark for LDR R0, 100, LDR R1, 101 and STR R2, 102
  • 1 Mark for ADD R2, R0, R1
  • 1 Mark for SUB R2, R2, #26
  • 1 Mark for either:
    • CMP R2, #26, BLT store and store: aligned to a STR instruction or
    • CMP R2, #25, BGT adjust and adjust: aligned to a SUB instruction

Max 3 if any errors.

AS-Level2019June10.1openDiagram7 marks

Write a sequence of assembly language instructions that perform multiplication using the same method shown in Figure 2. Assume that registers 0, 1, 2, and 3 are used to store the values represented by variables W, X, Y, and Z accordingly. Some lines, including those equivalent to line numbers 1 to 5 in Figure 2, have been completed for you.

Figure 2

1 W ← 9
2 X ← 12
3 Y ← 0
4 REPEAT
5 Z ← W LOGICAL BITWISE AND 1
6 IF Z = 1 THEN
7 Y ← Y + X
8 END IF
9 W ← W DIV 2
10 X ← X * 2
11 UNTIL W = 0

MOV R0, #9
MOV R1, #12
MOV R2, #0
startloop: AND R3, R0, #1
CMP R3, #1
BNE jump
ADD R2, R2, R1 // ADD R2, R1, R2
jump:
LSR R0, R0, #1
LSL R1, R1, #1
CMP R0, #0
BEQ endloop
B startloop
endloop:

Alternative Answer 1:
LSL R1, R1, #1 could be replaced with ADD R1, R1, R1

Alternative Answer 2:
BNE jump could be replaced with:
BEQ doadd
B jump
doadd:

AO2 (analyse) – 2 marks

1 mark: Recognising that logical shift (LSR/LSL) is needed to perform integer division by 2 / multiplication by 2 even if the syntax used is incorrect.

1 mark: Recognise that two comparisons and two branch instructions are needed even if the syntax is incorrect or the wrong types of branch instructions are used.

AO3 (program) – 5 marks

1 mark: CMP R3, #1 before the jump: label and syntactically correct.

1 mark: BNE jump before the jump: label and syntactically correct.

1 mark: ADD R2, R2, R1 is before the jump: label and syntactically correct.

1 mark: LSR R0, R0, #1 and LSL R1, R1, #1 are after the jump: label and syntactically correct. I. order of commands

1 mark: CMP R0,#0 and BEQ endloop are after the jump: label, before B startloop and syntactically correct.

Max 4 marks for programming if any syntax incorrect or program does not work correctly under all circumstances

A. Answers that use hexadecimal or binary values

DPT Missing hash for immediate addressing

DPT incorrect use of commas, colons, semi-colons, line numbers, etc.

AS-Level2018June10.1diagram4 marks

Complete the program in Figure 3.

You should assume that R1 has already been assigned a value to divide.

You may not need to use all four lines for your solution and you should not write more than one instruction per line.

Figure 3:

MOV R3, #0

loopstart: CMP R1, #10

...

end:
HALT

Mark as follows:

AO3 (design) – 1 mark

1 mark for identifying the need for two branch commands

AO3 (program) – 3 marks

For the AO3 (program) marks, the syntax used must be correct for the language as described on the question paper.

  • 1 mark: Subtracting 10 from R1 and storing the result in R1
  • 1 mark: Adding 1 to R3 and storing the result in R3
  • 1 mark: Having two branches with the correct condition(s)

Max 2 marks for programming if any syntax incorrect or program does not work correctly under all circumstances

DPT incorrect use of commas, colons, semi-colons, etc. Note this does not apply to #.

Refer alternative answers to team leaders

  • BLT end
  • SUB R1, R1, #10
  • ADD R3, R3, #1
  • B loopstart
AS-Level2017June7.1diagramDiagram4 marks

Figure 5 shows an incomplete assembly language program. The intended purpose of the code is to count from 1 to 10 inclusive, writing the values to memory location 17, which is used to control a motor.

Complete the code in Figure 5. You may not need to use all four lines for your solution and you should not write more than one instruction per line.

Figure 5

MOV R0, #1
startloop:
STR R0, 17
_______________________
_______________________
_______________________
_______________________
endloop:
HALT

Answer 1

  1. ADD R0, R0, #1 ;
  2. CMP R0, #11 ;
  3. BNE; startloop ;

Answer 2

  1. ADD R0, R0, #1 ;
  2. CMP R0, #11 ;
  3. BEQ endloop ;
  4. B startloop ;

Answer 3

  1. CMP R0, #10 ;
  2. BEQ endloop ;
  3. ADD R0, R0, #1 ;
  4. B startloop ;

Answer 4

  1. ADD R0, R0, #1 ;
  2. CMP R0, #11 ;
  3. BLT; startloop ;

Stop marking when the first incorrect command is encountered. Mark response against whichever alternative gives the highest mark.

I. Any extra commands which do not effect operation of program.

AS-Level2017June7.2calculation1 mark

R1 contains the decimal value 7. What value will be contained in R1 after the instruction below is executed?

LSL R1, R1, #2

2810 // (000)111002;

TO. If two answers given and one is incorrect.
I. Lack of subscript.

AS-Level2016June4.2open1 mark

All even numbers are represented by bit patterns ending with a 0; all odd numbers are represented by bit patterns ending with a 1.

Complete the assembly language instruction below to help identify if register R1 contains an odd number, storing the result of this operation in register R3.

AND R3, R1, _____

#1;
R. 1
I. zeroes between # and 1
Refer answers that start with #1 and then have any other writing to senior examiner

AS-Level2016June4.3open6 marks

Figure 4 shows a block of code, written in a high-level language, that is used to find out if the number stored in the variable A is even. If the value is even then the number 69 is stored in the variable B, otherwise the number 79 is stored in the variable B.

Figure 4

IF IsEven(A)
THEN B ← 69
ELSE B ← 79
ENDIF

Write a sequence of assembly language instructions that would perform the same operations as the high-level language code in Figure 4.

Assume that register R1 currently stores the value associated with A, that register R2 stores the value currently associated with B and that register R3 is available for general use, if necessary.

Your answer to question 04.2 can be reused as part of your answer to this question.

AO3 (design) – 2 marks:
1 mark: Identifying that a comparison and branch are required to have the same effect as the IF statement, even if the syntax or comparison made are incorrect
1 mark: Identifying that one or more labels are needed for branching to work

AO3 (programming) – 4 marks:
For the AO3 (programming) marks, the syntax used must be correct for the language as described on the question paper.

1 mark: Comparing R3 against 1 or 0 and having a branch with the correct logical condition
1 mark: For moving 69 to R2 in the equivalent of the THEN part A. moving 69 to R2 in equivalent of ELSE part if this is appropriate for compare and branch statements used
1 mark: For having an unconditional branch that results in skipping over 2nd move instruction or HALT in appropriate place
1 mark: For moving 79 to R2 in the equivalent of the ELSE part A. moving 79 to R2 in equivalent of THEN part if this is appropriate for compare and branch statements used

Max 3 marks for programming if any syntax incorrect or program does not work correctly under all circumstances

I. Missing AND instruction at start of answer.
I. Incorrect AND instruction at start of answer.
I. Load instruction to setup R1 from A.
I. Store instruction to store R2 into B.
A. Labels given in any sensible format
A. Answers that use hexadecimal or binary values
A. Line numbers as equivalent to labels if they are used as the target of branches. Note: in future this will not be accepted as line numbers are not part of the AQA assembly language.
DPT Missing hash for immediate addressing
DPT incorrect use of commas, colons, semi-colons, etc…
Refer alternative answers to team leaders

Example solutions:
AND R3, R1, #1
CMP R3, #1
BEQ odd
MOV R2, #69
B end
odd:
MOV R2, #79
end:
//
AND R3, R1, #1
CMP R3, #1
BEQ odd
MOV R2, #69
HALT
odd:
MOV R2, #79
//
AND R3, R1, #1
CMP R3, #1
BNE even A. BLT instead of BNE
MOV R2, #79
B end
even:
MOV R2, #69
end:
//
AND R3, R1, #1
CMP R3, #0
BNE odd A. BGT instead of BNE
MOV R2, #69
B end
odd:
MOV R2, #79
end:
//
AND R3, R1, #1
CMP R3, #0
BEQ even
MOV R2, #79
B end
even:
MOV R2, #69
end:

AS-Level2016June4.4multiple-choice1 mark

Shade in one lozenge to indicate which addressing mode is being used with the second operand in the assembly language instruction MOV R2, #0.

  • A:Direct
  • B:Immediate

Immediate;
R. More than one lozenge shaded

A-Level2024June10.1tableDiagram6 marks

Complete the trace table below to show the results of executing the program in Figure 7 when the initial value in memory location 130 is 83

Each register can hold an 8-bit value.

You may find it easier to understand the operation of the program if you write the contents of memory location 130 and register R1 out in both binary and decimal.

You may not need to use all the rows in the table.

1 mark: Correct initial values loaded into R1, R2 and R4 – Area 1.

1 mark: First increment of R2 and R4 and first logical AND of R3 – Area 2.

1 mark: Contents of R1 shifted right 7 times – Area 3.

1 mark: R2 counts up from 2 to 7 – Area 4.

1 mark: R3 shows correct values of ANDing R1 and 1 and R4 increments from 2 to 4 – Area 5.

1 mark: R4 set to 0, MSB of R1 set to 1 and contents of R1 copied to memory location 130 – Area 6.

Award marks for the correct values in the indicated areas. The values do not need to be in the exact cells shown for marks to be awarded, but must be in the correct sequence in the column they are in.

Award marks for values written in either decimal or binary. If binary and decimal values are written in one cell and one is correct but the other incorrect then treat the cell as being correct.

Max 5 if any incorrect values in table (ignore cells where one of the binary and decimal is incorrect but the other correct).

A-Level2023June7.1table1 mark

In binary, show the result of applying the instruction AND R0, R1, #15 when register R1 contains the decimal value 70 which is 46 in hexadecimal.

R1  0 1 0 0 0 1 1 0

15  0 0 0 0 1 1 1 1

R0  

Award 1 mark for correct value in R0:

R101000110
1500001111
R000000110

Reject: Any cells of R0 left empty

A-Level2023June7.2table1 mark

In binary, show the result of applying the instruction ORR R0, R1, #48 when register R1 contains the decimal value 6 which is 6 in hexadecimal.

R1  0 0 0 0 0 1 1 0

48  0 0 1 1 0 0 0 0

R0  

Award 1 mark for correct value in R0:

R100000110
4800110000
R000110110

Reject: Any cells of R0 left empty

A-Level2023June7.3openDiagram10 marks

A computer program is required to display the value of the contents of a memory location that stores an 8-bit value. The value should be displayed on the screen of the computer in hexadecimal.

Part of the process required to do this is to convert the value stored in the memory location into the correct ASCII codes for each of the two digits that represent that value in hexadecimal.

Write an assembly language program using the AQA assembly language instruction set that will load a value from memory location 100 and store the ASCII code of the first (lefthand) digit of the hexadecimal representation of this value in memory location 101 and the ASCII code of the second (righthand) digit of the hexadecimal representation of this value in memory location 102.

Your program should use masking and/or shifting to complete this task.

The ASCII codes of the hexadecimal digits are shown in Table 2 and the AQA assembly language instruction set is in Table 3 on page 23.

6 marks (programming syntax must be correct):

  • MP1: Value in memory location 100 is loaded into a register;
  • MP2: After some manipulation has been carried out (whether correct or not) values are stored into memory locations 101 and 102 (do not award if it is the same value stored twice);
  • MP3: Binary pattern of one digit correctly isolated from the input value (for leftmost digit must also be shifted so bits in correct place);
  • MP4: Binary pattern of one digit correctly translated into ASCII for one of numeric digits or letter digits (ignore if the pattern is later changed again to be incorrect);
  • MP5: Binary pattern of one digit correctly translated into ASCII for both numeric digits and letter digits (ignore if the pattern is later changed again to be incorrect);
  • MP6: Conversion process fully working for the both digits (ASCII codes must be correct when program terminates);

Note: If MP3 not awarded MP4, MP5, MP6 cannot be awarded

Acceptable: Any understandable method for identifying labels

DPT. Use of invalid register names eg R27, Rn

DPT. Use of binary for immediate operand values

DPT. Omission of # to indicate immediate operand values

DPT. R before memory address eg R100

DPT. Use of MOV instead of LDR or STR, or vice-versa

DPT. Repeated use of incorrect delimiters eg ; < > . " ' (occasional errors can be ignored)

4 marks (concept must be understood, syntax need not be correct):

  • MP7: Attempt to use masking and/or shifting to identify one digit;
  • MP8: Attempt to use masking and/or shifting a second time to identify the second digit;
  • MP9: Attempt to use comparison and branching to make program treat numeric digits and letter digits differently for at least one of the two digits (whether threshold values correct or not);
  • MP10: Use of addition or masking to attempt to convert a digit to an ASCII code (whether correct ASCII codes produced or not);

Note: If MP3 not awarded MP10 cannot be awarded

Max 9 if solution not fully working

A-Level2022June9.1openDiagram1 mark

State the name of the addressing mode used in the instruction ADD R3, R3, R0

Direct (addressing);

A-Level2022June9.2tableDiagram5 marks

Memory location 120 contains the value 23 and memory location 121 contains the value 5.

Complete the trace table to show how the contents of the memory locations and registers change when the program in Figure 7 is executed.

Memory LocationsRegisters
120121122R0R1R2R3
2352350
123
462
9211115
1840
115115

1 mark: Correct initial values loaded into registers R0, R1 and R3: 23, 5, 0

1 mark: R2 has initial value 1 and R3 is updated to 23

1 mark: R0 shifted left to give 46 and R1 shifted right to give 2

1 mark: R0 changes to 92 then 184, R1 changes to 1 then 0, R2 changes to 0 then 1

1 mark: R3 and memory location 122 set to 115

Max 4 if any incorrect values written into table

A-Level2022June9.3openDiagram1 mark

State the purpose of the program in Figure 7.

(To) multiply (the two numbers in memory locations 120 and 121 together, storing the result in memory location 122);

A. multiplication

A-Level2021June6.1tableDiagram6 marks

Figure 4 shows an assembly language program which has been written using the AQA assembly language instruction set. The instruction set is explained in Table 1 on page 15.

The program takes its input values from registers R1 and R2 and stores its output in registers R0 and R1.

Complete the trace table below to show the results of executing the program in Figure 4 when the initial values in registers R1 and R2 are 34 and 6.

Each register can hold a 16-bit value.

You may find it easier to understand the operation of the program if you write the contents of the registers out in both binary and decimal.

You may not need to use all the rows in the table.

R0R1R2R3R4
1100010 (34)110 (6)
20 (0)1 (1)1100 (12)10 (2)
311000 (24)100 (4)
4110000 (48)1000 (8)
511000 (24)100 (4)
6100 (4)1010 (10)0 (0)
1100 (12)10 (2)0 (0)
110 (6)1 (1)
101 (5)100 (4)1 (1)
0 (0)

1 mark: Correct initial values loaded into R0 and R3 – Area 1
1 mark: Logical shifting left of register values in loop – Area 2
1 mark: Exiting loop and shifting right – Area 3
1 mark: First addition and subtraction on R0 and R3 – Area 4
1 mark: Addition and subtraction loop – Area 5
1 mark: Correct final values in registers R0 and R1 – Area 6

Award marks for the correct values in the indicated areas. The values do not need to be in the exact cells shown for marks to be awarded, but must be in the correct sequence in the column they are in.

Award marks for values written in either decimal or binary. If a binary and decimal value are written in one cell and one is correct but the other incorrect then treat the cell as being correct

Max 5 if any incorrect values in table.

A-Level2021June6.2openDiagram2 marks

The initial values for the program (its inputs) are stored in R1 and R2 and the final values stored in R0 and R1 are its outputs.

By considering the inputs and the outputs in your trace table for Question 06.1, describe the purpose of the program.

Performs (integer) division // outputs the quotient after performing a division // outputs how many times one number (R2) goes into another (R1) // R0 is the quotient;

Outputs the remainder / what is left over after performing (integer) division // R1 is the remainder;

A-Level2020June9.3open3 marks

The Vernam cipher encrypts a plaintext character by performing a logical operation between a character in the plaintext and part of the key.

Write an assembly language program, using the AQA assembly language instruction set shown on page 28 in Table 2, to encrypt a plaintext character using this method.

You should assume that:

  • the character code of the plaintext character to be encrypted is stored in memory location 101
  • the part of the key to use to encrypt the character is stored in memory location 102

The encrypted ciphertext character should be stored in memory location 103

Values in memory locations 101 and 102 loaded into two different registers;

Contents of the two registers are exclusive ORed;

A. Memory addresses used as operands directly if no other marks awarded for this question part ie EOR 103, 101, 102

A. Exclusive or achieved in another way eg use of two ANDs, two NOTs and an OR

Value of register storing the result of exclusive or operation is stored into memory location 103;

A. result of an incorrect combination of the values in locations 101 and 102 stored in location 103

DPT. Use of invalid register name eg Rd

DPT. Use of incorrect addressing mode

DPT. Inclusion of invalid symbols in commands

Example Solution

LDR R1, 101
LDR R2, 102
EOR R3, R1, R2
STR R3, 103

A-Level2019June10.1openDiagram8 marks

The greatest common divisor of two positive integers A and B is the largest positive integer that divides both of the numbers without leaving a remainder.

The method shown in Figure 7 is a famous method for determining the greatest common divisor of two positive integers, A and B.

Write a program using the AQA assembly language instruction set, shown on page 18 in Table 1, that uses the method described in Figure 7 to calculate the greatest common divisor of two positive integers.

  • At the start, the positive integer A will be stored in memory location 102 and the positive integer B in memory location 103. Your program should use these values to find their greatest common divisor.
  • When your program terminates it should store the greatest common divisor of these two numbers in memory location 104.

Values in memory locations 102 and 103 loaded into two different registers;

Comparison made between the values in the two registers;

If the values in the two registers are the same then the code will exit (after performing any other necessary instructions); A. end of program reached if not HALT instruction.

If A is greater than B then the value in the register representing B is subtracted from the value in the register representing A and result stored in register representing A;

Note: Award this mark even if further incorrect changes would also be made to values in registers.

If A is less than (or equal to B) / then the value in the register representing A is subtracted from the value in the register representing B and result stored in register representing B;

Note: Award this mark even if further incorrect changes would also be made to values in registers.

Before the algorithm exits, in all circumstance, the value in the register representing A (or the register representing B) is stored into memory location 104 (regardless of whether or not this is the gcd); A. if this is done on every iteration of a loop instead of just once.

The need for a loop has been identified and instructions are used to make the program loop back to before the comparison(s) after each subtraction has taken place;

The response provided follows the correct method to calculate the gcd of A and B, regardless of whether the syntax is correct or not, although an attempt must have been made to use the AQA instruction set;

Max 7 if solution not fully working

Note: Any register numbers can be used and any understandable method to identify a label.

DPT use of invalid register names eg R27, Rn

A-Level2018June12.1openDiagram2 marks

The pseudo-code in Figure 12 shows one method for carrying out encryption of a single character using the Caesar Cipher. If the character to be encrypted is a capital letter, then the encrypted character will be shifted along the alphabet by the number of positions specified by the key. If the character is not a capital letter, then the encrypted character is set to be equal to the original character.

Figure 13 shows an incomplete assembly language program that has been written to implement the pseudo-code algorithm shown in Figure 12.

By analysing the assembly language program in Figure 13, explain the purpose for which the registers R1, R2 and R3 have been used.

One mark for correct purposes given for one or two registers OR two marks for correct purposes given for all three registers.

RegisterPurpose
R1The plaintext letter // the letter before it has been encrypted // the original letter // the characterCode
R2The key // the number of positions to shift letters by // the value to add to the letter // the keyValue
R3The ciphertext letter // the encrypted letter // the encryptedCode

A. "letter" for "character" and vice-versa

A-Level2018June12.2openDiagram1 mark

On Figure 13, write the assembly language instruction that is missing from position 1.

MOV R3, R1;

I. missing comma
A. another command which would achieve the same affect eg ORR R3, R1, #0

A-Level2018June12.3openDiagram3 marks

On Figure 13, write the assembly language instructions that are missing from position 2.

  • R3 compared to 90 or 91as first command;
  • 26 subtracted from R3 and result stored back into R3 after comparison (whether comparison is correct or not);
  • Fully working code;

DPT omission of # for immediate addressing values
DPT use of register number other than R3
I. missing commas

Example Solution 1

CMP R3, #91
BLT finished
SUB R3, R3, #26
B finished

Example Solution 2

CMP R3, #90
BGT moveBack
B finished
moveBack:
SUB R3, R3, #26
B finished

Example Solution 3

CMP R3, #90
BLT finished
BEQ finished
SUB R3, R3, #26
B finished
A-Level2017June5.2tableDiagram4 marks

Figure 5 shows an assembly language program together with the contents of a section of the main memory of the computer that the program will be executed on. Each main memory location and register can store a 16-bit value.

Complete the trace table below, in decimal, to show how the values stored in the registers and main memory change as the program in Figure 5 is executed. You may not need to use all of the rows.

Register ContentsMain Memory Location Contents
R1R2R3R4100101102
10
50
405011

1 mark: Value of 10 is first value in R1.

1 mark: Value of 40 is only value in R2.

A. Value in R2 is four times the value in R1, if value in R1 was incorrect

1 mark: Value of 50 in both R1 and R3, as the second and final value in R1 and only value in R3.

A. Value stored in R1 is five times the initial value in R1, if this was incorrect and R3 contains only 50

A. Value stored in R1 is equal to contents of R2 and previous contents of R1 added together, if either of these were incorrect and R3 contains only 50

1 mark: Value of 1 stored in both R4 and memory location 102. It should be the only value in R4 but could be preceded by 80 in memory location 102. It must be the final value in memory location 102. This mark should only be awarded if the contents of R1 and R3 are equal, otherwise see accept point below.

A. Value of 0 instead of 1 stored in both R4 and memory location 102 if contents of registers R1 and R3 are not equal

I. Values of 10 and 50 written in the columns for main memory locations 100 and 101 and value of 80 written above value of 1 in column for memory location 102

Note: Values do not have to be written in the same rows as in the table above, but must be in the same order ie for R1, the value 10 must be assigned above the value 50. Individual values eg 50 may be written out multiple times.

A-Level2017June5.3openDiagram1 mark

Explain what the assembly language program in Figure 5 does.

Check if the value stored in memory location 101 is five times the value stored in memory location 100 // check if value in memory location 100 is a fifth of that in memory location 101 (if so, store a 1 in memory location 102 if it is and a 0 if it is not);

A. Check if a number is five times another number // a fifth of another number as BOD