Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You can, for example, create a new number in which the necessary bits of the old number will be in the right places.
What is the difficulty, in the algorithm or in the implementation?
Get the value of bit 4:
mov eax, 1
shl eax, 4
mov ecx, 120
and ecx, eax
shr ecx, 4
mov eax, 1
shl eax, 4
mov ecx, 120
or ecx, eax
mov eax, 1
shl eax, 4
not eax
mov ecx, 120
and ecx, eax
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question