In: Computer Science
Provide the instruction type, assembly language instruction, and binary representation of the instruction described by the following LEGv8 fields:
op = 0x458, Rm = 14, Rn = 16, Rd = 18, shamt = 0
Instruction type: R-type (refer below)
Assembly language Instruction: ADD X18, X16, X14 // (since, opcode 0x458(hex) = 1112(decimal) which is ADD arithmetic operation)
// register X18 contains the sum of the contents of X14 & X16 (refer below)
Instruction |
op = 0x458(hex) (11 bits) |
Rm = 14 (5 bits) |
Shamt=0 (6 bits) |
Rn =16 (5 bits) |
Rd = 18 (5 bits) |
Decimal represntation | 1112 | 14 | 0 | 16 | 18 |
Hexa decimal representation | 0000 0000 458 | 0000E | 000000 | 00010 | 00012 |
Binary representation | 100 0101 1000 | 01110 | 000000 | 10000 | 10010 |