Top "Bitwise-operators" questions

Operators which are used to perform manipulation at bit-level.

Multiplication of two integers using bitwise operators

How can I multipy two integers using bitwise operators? I found an implementation here. Is there a better way of …

bitwise-operators
How to perform a bitwise operation on floating point numbers

I tried this: float a = 1.4123; a = a & (1 << 3); I get a compiler error saying that the operand of &…

c++ floating-point genetic-algorithm bitwise-operators
Reading and interpreting data from a binary file in Python

I want to read a file byte by byte and check if the last bit of each byte is set: #!/…

python binary bitwise-operators
How do I check if an integer is even or odd using bitwise operators

How do I check if an integer is even or odd using bitwise operators

c bitwise-operators
Go << and >> operators

Could someone please explain to me the usage of << and >> in Go? I guess it is …

go bitwise-operators
Effect of a Bitwise Operator on a Boolean in Java

The bitwise operators are supposed to travel variables and operate on them bit by bit. In the case of integers, …

java boolean bitwise-operators
Pipe character in Python

I see a "pipe" character (|) used in a function call: res = c1.create(go, come, swim, "", startTime, endTime, "OK", ax|…

python pipe bitwise-operators
Mod of power 2 on bitwise operators?

How does mod of power of 2 work on only lower order bits of a binary number (1011000111011010)? What is this number …

c math bit-manipulation bitwise-operators bitwise-and
Using bitwise operators for Booleans in C++

Is there any reason not to use the bitwise operators &, |, and ^ for "bool" values in C++? I sometimes run …

c++ boolean bitwise-operators
Change a bit of an integer

We have an integer number int x = 50; in binary, it's 00110010 How can I change the fourth (4th) bit programatically?

c++ c bit-manipulation bitwise-operators