Say we want to find a shortest possible sequence of x86 instructions to move the $9^{th} - 16^{th}$ bit of the $eax$ register to the $24^{th} - 31^{th}$ bit of the $ebx$ register without changing the other bits of the $ebx$ register, where the least significant bit is defined to be the $0^{th}$ bit.
An obvious solution is:
ror eax, 1
rol ebx, 8
mov bl, ah
ror ebx, 8
But how do I prove this is the shortest possible? Is there a nice way to do it? If not, is there a nice piece of FOSS software to brute force it?