-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I've a few lines of code within a project, that I can't see the value of...
buffer[i] = (currentByte & 0x7F) | (currentByte & 0x80);
It reads the filebuffer from a file, stored as bytes, and then transfers then to buffer[i] as shown, but I can't understand what the overall purpose is, any…
>>> More
-
as seen on Programmers
- Search for 'Programmers'
I don't use C++ or bitwise operations at my current job but I'm thinking of applying to companies where it is a requirement to be fluent with them (on their tests anyway).
So my question is: Can anyone suggest a project which will require gaining a fluency in bitwise operations to complete?
On a…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi all
I am trying to do bit reversal in a byte. I use the code below
static int BitReversal(int n)
{
int u0 = 0x55555555; // 01010101010101010101010101010101
int u1 = 0x33333333; // 00110011001100110011001100110011
int u2 = 0x0F0F0F0F; // 00001111000011110000111100001111
int u3…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
What are some real world use cases of the following bitwise operators?
AND
XOR
NOT
OR
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello,
I have the following problems:
First: I am trying to do a 32-spaces bitwise left shift on a large number, and for some reason the number is always returned as-is. For example:
echo(516103988<<32); // echoes 516103988
Because shifting the bits to the left one space is the equivalent…
>>> More