Alyce Sep 22, 2006
=Bit Shift Functions= [[user:CarlGundel]] [[toc]] This is really easy to do: ==Shift Left== [[code format="vbnet"]] function shiftLeft(bitsValue) shiftLeft = bitsValue * 2 end function [[code]] ==Shift Right== [[code format="vbnet"]] function shiftRight(bitsValue) shiftRight = int(bitsValue / 2) end function [[code]] ==Remove High Bit== If you want to remove the high bit when shifting left, just write a function for that, like so: [[code format="vbnet"]] function shiftByteLeft(bitsValue) shiftByteLeft = 255 and (bitsValue * 2) end function [[code]] Get the idea? :) -Carl [[user:CarlGundel]]