What I need to do it implement both a bitwise left shift, and a bitwise right shift using LC-3 Assembly. Basically, every bit has to be moved over one space in the direction of the shift, and a zero fills the empty space created.
Examples:
Right Shift:
01001001
00100100→
Left Shift:
01001001
←10010010
I've successfully implemented a left shift, by taking the binary string, and adding it to itself.
I'm stumped on how to perform a right shift. Any thoughts would be greatly appreciated. I have AND, NOT, ADD operations, data movement operations, seven registers to store values and whole range of memory. I just need some basic ideas how it could be implemented.
If you need a LC-3 Instruction Set reference, there is one here.