0% found this document useful (0 votes)
29 views1 page

9618 MJ 12 Q4b

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 1

8

(b) Some bit manipulation instructions are shown in the table:

Instruction
Explanation
Opcode Operand
AND #n Bitwise AND operation of the contents of ACC with the operand
AND <address> Bitwise AND operation of the contents of ACC with the contents of <address>
XOR #n Bitwise XOR operation of the contents of ACC with the operand
XOR <address> Bitwise XOR operation of the contents of ACC with the contents of <address>
OR #n Bitwise OR operation of the contents of ACC with the operand
OR <address> Bitwise OR operation of the contents of ACC with the contents of <address>
<address> can be an absolute address or a symbolic address
# denotes a denary number, e.g. #123

The contents of the memory address 300 are shown:

Bit Number 7 6 5 4 3 2 1 0

300 0 1 1 0 0 1 1 0

(i) The contents of memory address 300 represent an unsigned binary integer.

Write the denary value of the unsigned binary integer in memory address 300.

..................................................................................................................................... [1]

(ii) An assembly language program needs to test if bit number 2 in memory address 300
is a 1.

Complete the assembly language instruction to perform this test.

......................... #4
[1]

(iii) An assembly language program needs to set bit numbers 4, 5, 6 and 7 to 0, but keep
bits 0 to 3 with their existing values.

Write the assembly language instruction to perform this action.

...........................................................................................................................................

..................................................................................................................................... [2]

© UCLES 2021 9618/12/M/J/21

You might also like