Questions tagged [immediate-operand]

94 questions
-1
votes
1 answer

In ARM machine code, how is the offset encoded in SUB SP, SP, #36?

Edit: My concern is how ARM instruction is encoded. Let's examine below example: 194640: e92d40f0 push {r4, r5, r6, r7, lr} 194644: e24dd024 sub sp, sp, #36 ; 0x24 --> sp decrease 36 ~ 0x24 --> Is it calculated by e24dd024 &…
-1
votes
1 answer

MIPS Pipeline stages for Load Immediate

I understand there are 5 standard stages for an instruction in MIPS. for the following pseudo instruction li $t1, 0 # pseudo-instruction for addi $t1, $zero, 0 Can anyone please confirm if this uses all 5 stages? I think underlying this is an…
Jason Hyland
  • 744
  • 1
  • 8
  • 21
-1
votes
1 answer

What if an immediate number is out of range before signed number operations

One of my homework exercises is as follows: mov al,77h sub al,80h AL=_______ CF=_______ OF=_______ When I first saw it, I thought the result of positive number minus positive number won't overflow. And I just made OF equals to 0. But my…
-2
votes
2 answers

Why opcode is 6-bit long in MIPS 32 bit Architecture

Below is Data transfer instruction format for 32-bit ARM and MIPS architecture. 32-bit ARM architecture have 4 bit opcode because there are 16 registers (2^4=16).32-bit MIPS architecture have 6 bit opcode. Should not it be 5 bits considering there…
Tom
  • 19
  • 2
  • 6
1 2 3 4 5 6
7