Does anybody have any routines for emulating a left-shift on a number as per the C "<<" operator.
I think I have successfully replicated the right-shift but do not seem to be abe to get the left shift working properly.
Printable View
Does anybody have any routines for emulating a left-shift on a number as per the C "<<" operator.
I think I have successfully replicated the right-shift but do not seem to be abe to get the left shift working properly.
Do you mean bit-shifting for numbers (x/2) or strings(rotl and rotr in asm?)?
Numbers
ie: SHL/SHR
Can't you do something like this?
Code:Dim Number As Double
Number = 1000
'bit shift?
Number = Number / 2
This does not always replicate the functions correctly and therefore does not alays return the correct value.