I am writing a program that will reverse the order of ASCII code. The user input a character and output the reverse 7 bits of it.
EX: 011001 to 100110.
I am trying to understand the sll and srl instructions better and how they are used because they seem to be what I need to use.
Do they start with the rightmost bit? So doing srl would move the pointer to the leftmost?
Also, could I copy 1 bit at a time into a new register in reverse order? I know how to move whole registers but i do not understand how to copy 1 bit from a register. Is there an instruction I am missing?
I could run a loop that would SLL a register while SRL another register and copying a bit on each loop.
Am I going the wrong way trying to copy one bit at a time?
Any help clearing anything up?