in LC-3 machine language how can a number of 16 bits left shifted by n bits? like if we have 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 and the binary numbers are | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 |
then how can we left shift 3?
Because LC-3 apparently has no shift operations you have to do it yourself.
some folks dicussing an LC-3 simulator and bit shift operations here http://www.asmcommunity.net/board/index.php?topic=28978.0 indicate that:
for each bit position of shift to the left, its multiply by 2 (or add it to itself if you like)
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With