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