Instruction Set and Addressing questions

Q33

GATE CS 2024 CS-1Instruction Set and AddressingNAT1 mark
Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below.

The value of the expression 3+1+5∗2/7+2−4−7−6/23 + 1 + 5 * 2 / 7 + 2 - 4 - 7 - 6 / 2 as per the above rules is __________
OperatorPrecedenceAssociativity
+ HighestLeft
- HighRight
* MediumRight
/ LowRight
Show answer without attempting

Answer: 6

Q57

GATE CS 2024 CS-2Instruction Set and AddressingNAT2 marks
A processor with 16 general purpose registers uses a 32-bit instruction format. The instruction format consists of an opcode field, an addressing mode field, two register operand fields, and a 16-bit scalar field. If 8 addressing modes are to be supported, the maximum number of unique opcodes possible for every addressing mode is _________
Show answer without attempting

Answer: 32

Q61

GATE CS 2024 CS-2Instruction Set and AddressingNAT2 marks
A processor uses a 32-bit instruction format and supports byte-addressable memory access. The ISA of the processor has 150 distinct instructions. The instructions are equally divided into two types, namely R-type and I-type, whose formats are shown below.

R-type Instruction Format:
OPCODEUNUSEDDST RegisterSRC Register 1SRC Register 2
I-type Instruction Format:
OPCODEDST RegisterSRC Register# Immediate value/address
In the OPCODE, 1 bit is used to distinguish between I-type and R-type instructions and the remaining bits indicate the operation. The processor has 50 architectural registers, and all register fields in the instructions are of equal size.

Let XX be the number of bits used to encode the UNUSED field, YY be the number of bits used to encode the OPCODE field, and ZZ be the number of bits used to encode the immediate value/address field. The value of X+2Y+ZX + 2Y + Z is ________
Show answer without attempting

Answer: 34

0/30 correct0 marks

Related topics in Computer Organization and Architecture