Question 7

AQA Computer Science November 2020 Paper 2 (7516/2)AS6 marks

On the specification

7.1
3.7 Fundamentals of computer organisation and architecture3.5 Fundamentals of data representation
7.2
3.7 Fundamentals of computer organisation and architecture
7.3
3.5 Fundamentals of data representation
Question text

7 1 box . 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. The assembly language instruction set that you should use to write the program is listed in Table 1. Table 2 shows the character codes and the characters they represent. Table 2 Code Character Code Character Code Character 0 A 9 J 18 S 1 B 10 K 19 T 2 C 11 L 20 U 3 D 12 M 21 V 4 E 13 N 22 W 5 F 14 O 23 X 6 G 15 P 24 Y 7 H 16 Q 25 Z 8 I 17 R • 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 [4 marks] 7 2 box . An instruction uses immediate addressing. What is immediate addressing? [1 mark] 7.3 Another method of encryption is the Vernam cipher. Explain why, under the correct conditions, the Vernam cipher is perfectly secure. [1 mark]