alokagarwaljgd
New User
Joined: 02 Jun 2006 Posts: 28
|
|
|
|
Hi,
Can anyone please let me know the answers to the following questions?
1) what is the difference between SLA and SLL instruction? I read about them and they majorly seem to be doing the same job.
2) Will the instruction SLL Rx,31 and SRL Rx,31 make the register value Rx to be zero, if yes how?
Thanks,
Alok Agarwal |
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
SLA operates on 31bits of a 32bit signed number whereas SLL operates on all 32bitsof a register
Assuming Rx contains b'00000000 00000000 00000000 00000001',
would give b'10000000 0000000 0000000 00000000' after which
should give b'00000000 00000000 00000000 00000001'
Code: |
SLL Rx,32
SRL Rx,32 |
would give zero. You need to shift-out all the bits in the SLL.
It wold be easier to
or
Garry. |
|