We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bitwise AND/OR and left/right shifts would be very useful when working with integers that are encoding multiple sub-values based on bit position.
The text was updated successfully, but these errors were encountered:
Workaround: use combinations of %% 2^n, %/% 2^n, * 2^n to extract and manipulate contiguous bits.
%% 2^n
%/% 2^n
* 2^n
E.g. to emulate bitwise AND with 0b111110000 and extract bits 9 to 5:
0b111110000
> input integer64 [1] 123456789 987654321 > as.bitstring(input) [1] "0000000000000000000000000000000000000111010110111100110100010101" "0000000000000000000000000000000000111010110111100110100010110001" > as.bitstring(input %% 2^9 %/% 2^4 * 2^4) [1] "0000000000000000000000000000000000000000000000000000000100010000" "0000000000000000000000000000000000000000000000000000000010110000"
Sorry, something went wrong.
No branches or pull requests
Bitwise AND/OR and left/right shifts would be very useful when working with integers that are encoding multiple sub-values based on bit position.
The text was updated successfully, but these errors were encountered: