A byte addressable computer has a memory capacity of \(2^{m}\) Kbytes and can perform \(2^{n}\) operations. An instruction involving 3 operands and one operator needs a maximum of
3m + n + 30 bits
Memory size \(= 2^{m}\) KB \(= 2^{m} \times 2^{10} = 2^{m+10}\) bytes.
Byte addressable, so each address needs \(m + 10\) bits.
Three operand addresses need \(3(m + 10) = 3m + 30\) bits, and \(2^{n}\) operations need an opcode of n bits.
Instruction length \(= 3m + 30 + n = 3m + n + 30\) bits.
Check: with m = 0 (1 KB memory) each address is 10 bits, and three addresses take 30 bits.
Hence, 3m + n + 30 bits.
Which of the following do not represent memory reference instruction.
| A. | 1 | opcode | mode = 1, opcode = 010 | |
| B. | 0 | opcode | mode = 0, opcode = 111 | |
| C. | 1 | opcode | mode = 1, opcode = 111 | |
| D. | 1 | opcode | mode = 1, opcode = 110 | |
| E. | 1 | opcode | mode = 1, opcode = 001 |
Choose the correct answer from the options given below:
Select the cost of given instruction
ADD 4(R1), * 8 (R2)______________
A machine has a 32-bit architecture with 1-word long instructions. It has 24 registers and supports an instruction set of size 40. Each instruction has five distinct fields, namely opcode, two source register identifiers, one destination register identifier, and an immediate value. Assuming that the immediate operand is an unsigned integer, its maximum value is ____________
A processor has 64 general-purpose registers and 50 distinct instruction types. An instruction is encoded in 32-bits. What is the maximum number of bits that can be used to store the immediate operand for the given instruction?
ADD R1, #25 // R1 = R1 + 25