Recently Browsing 0 members
No registered users viewing this page.
I found a bit of time today to write something, after criticism that people chatting don't write enough code. Well it's perhaps an old school concept, but I wanted to solve it myself. Logical shift on an infinite hex string. Well not really infinite, but it might as well be compared to the small 32/64-bit versions. Please note: it only shifts bits once. If you want an actual infinite shift value (not really recommended) then use a while loop.
Theoretically the code should run faster without calls to Int() , but this appears to be an unfortunate consequence of unfinished development. Don't ask me why that is, because I don't have an answer. Anyway forget that! This function might have been more useful to me about a year ago, but it was fun to figure out how to do it today anyway.
IMPROVED VERSION IN >POST 8
The shift value for BitShift is described as: (the) Number of bits to shift to the right (negative numbers shift left).
BitRotate description gives: Performs a bit shifting operation, with rotation.
The shift value for BitRotate is described as: (the) Number of bits to rotate to the left (negative numbers shift right).
I noticed this apparent inconsistancy recently after so my question is this: Is there a hidden deeper meaning to this, or is it just a bit of mix up?
It appears inconsistant (default) behaviour, to me at least.