I am trying to decrypt some assembly code, which includes several left-handed rotations of an 8-bit binary number.
For reference, code:
lab: rol dl,1 rol dl,1 dec ecx jnz lab
dec and jnz not a problem, but you need to show that 2 rol are executed several times.
What I'm trying to do is calculate the mathematical equivalent of this code, like a formula. Of course, I am not looking for a complete formula to tell me all the code, but I would like to know if there is a formula that gives the equivalent (in denar) of one left rotation.
I tried to figure this out with a pair of different numbers, but I donβt see the connection between the two results. For example: if the start number is 115, it is displayed as 220, but if the start number is 99, it is displayed as 216.
source share