9608_w16_qp_11
A paper of Computer Science, 9608
Questions:
8
Year:
2016
Paper:
1
Variant:
1

Login to start this paper & get access to powerful tools

1
3
5
7
8
The table shows assembly language instructions for a processor which has one general purpose register, the Accumulator (ACC) and an Index Register (. Instruction Explanation Op code Operand LDD Direct addressing. Load the contents of the given address to ACC. LDX Indexed addressing. Form the address from + the contents of the index register. Copy the contents of this calculated address to ACC. STO Store contents of ACC at the given address. ADD Add the contents of the given address to ACC. CMP Compare contents of ACC with contents of JPE Following a compare instruction, jump to if the compare was True. JPN Following a compare instruction, jump to if the compare was False. JMP Jump to the given address. OUT Output to the screen the character whose ASCII value is stored in ACC. END Return control to the operating system. The diagram shows the contents of the main memory: Main memory 0110 0100 0111 1100 1001 0111 0111 0011 1001 0000 0011 1111 0000 1110 1110 1000 1000 1110 1100 0010 : : 1011 0101 Show the contents of the Accumulator after execution of the instruction: LDD 802 Accumulator: Show the contents of the Accumulator after execution of the instruction: LDX 800 Index Register: Accumulator: Explain how you arrived at your answer. Complete the trace table below for the following assembly language program. This program contains denary values. LDD 800 ADD 801 STO 802 LDD 803 CMP 802 JPE 107 JPN 110 STO 802 OUT JMP 112 LDD 801 OUT END : : Selected values from the ASCII character set: ASCII code Character ( P Z d Trace table: ACC Memory address OUTPUT There is a redundant instruction in the code in part . State the address of this instruction. The program used the ASCII coding system for character codes. An alternative coding system is Unicode. Give two disadvantages of using ASCII code. Describe how Unicode is designed to overcome the disadvantages of ASCII.