Re: how to shift bits in memory

new topic     » goto parent     » topic index » view thread      » older message » newer message

I don't know what all is in that zip file.
I do know that bit-shifts are nothing more than multiply or of integers of powers of 2 in euphoria.
These are not bit rotations. The left does not rotate to the right.

integer test = 6 -- 8-bits of binary 00000110 
test *= 2 -- left bit shift by 1, 00001100 
test *= 4 -- left bit shift by 2, 00110000 
test /= power(2, 3) -- power(2,3) = 8, right bit shift by 3, 00000011 
test /= 2 -- right bit shift by 1, 00000001 

Lucius L. Hilley III - unkmar

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu