Assignment 2: MARIE and ISA
Question 1:
A digital computer has a memory unit with 24 bits per word. The instruction set consists of 199 different operations. All instructions have an operation code part (opcode) and an address part (allowing for only one address). Each instruction is stored in one word of memory.[8 marks]
- How many bits are needed for the opcode?
- How many bits are left for the address part of the instruction?
- What is the maximum allowable size for memory?
- What is the largest signed binary number that can be accommodated in one word of memory?
Question 2:
Suppose you have the instruction “Add 900”. Given the memory as follows, the contents of AC and the base register are 200 and 100 respectively.[6 marks]
Memory address value
800 900
900 1000
1000 500
1100 600
1200 800
1300 250
What would be loaded into the AC, if the addressing mode for the operand is:
- Immediate
- Direct
- Indirect
- Indexed
Question 3:
Write code to implement the expression: F = (A-B)*(C*D+E) on 0-address, 1-address and 2-address machines. In accordance with programming language practice, computing the expression should not change the values of its operands.[8 marks]
Question 4:
In a computer instruction format, the instruction length is 10 bits and the size of an address field is 3 bits. The system architect has already designed FIFTEEN 2-address instructions and SEVEN 1-address instructions. How many 0-address instruction still possible to accommodate for the instruction set architecture?
[8 marks]
This assessment task will assess the following learning outcome/s:
- be able to investigate the internal operation of the Central Processing Unit (CPU) and describe how it is used to execute instructions.
- be able to investigate and describe in detail the essential elements of computer organisation including internal bus, memory, Input/Output ( I/O) organisations and interfacing standards and discuss how these elements function.