I just had my "Langage de Programmation" exam, which was about knowledge and use of assembly code. One of the questions asked this and I was unsure what the answer should have been:
Let N1 be an unsinged integer over 32 bits. Give the assembly code allowing to realise the following operation:
A right shift of 2 bit order of N1, but ONLY of the bits in an even position as shown in the following illustration:
I only have 8 rep so I cant upload the image, only a link to it, sorry. Thanks for the help!
P.S: What I tried to do was evaluate every bit if its index was even but I'm not sure that is the only way, or how it would be written in assembly.