Top "Bitwise-operators" questions

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

Understanding the behavior of a single ampersand operator (&) on integers

I understand that the single ampersand operator is normally used for a 'bitwise AND' operation. However, can anyone help explain …

c# operators bitwise-operators
What is equivalent php chr() and ord() functions in javascript

I have used bitwise operator in php code which return decode string in base64. I want implement that php code …

javascript encoding base64 bitwise-operators
Is it possible to implement bitwise operators using integer arithmetic?

I am facing a rather peculiar problem. I am working on a compiler for an architecture that doesn't support bitwise …

bitwise-operators discrete-mathematics compiler-optimization
Bitmask switch statement

I have this code in a section of my project: enum myEnum { invalid = -1, val1 = 1, val2 = 2, val3 = 4 }; int bitmask = val1 | …

c++ switch-statement bitwise-operators bitmask bit-masks
how to find left most 1 in a 32bit int in C

Possible Duplicate: Find the highest order bit in C How can I write a C function that will generate a …

c bitwise-operators bitmask
When should I use a bitwise operator?

I read the following Stack Overflow questions, and I understand the differences between bitwise and logical. Difference between & and &…

php bitwise-operators logical-operators
Is there a Python class/enum for flag/bit mask operations?

I know of base classes Enum and IntEnum. Both are very helpful but I miss features for flag operations. I …

python-3.x enums bitwise-operators
Would you use num%2 or num&1 to check if a number is even?

Well, there are at least two low-level ways of determining whether a given number is even or not: 1. if (num%2 == 0) { /* …

c++ numbers readability low-level bitwise-operators
What is the meaning of double tilde (~~) in Java?

When browsing the source code of Guava, I came across the following piece of code (part of the implementation of …

java gwt bit-manipulation bitwise-operators
Change XOR to XNOR

I am working with a XNOR encrypted file whose key is not known. I want to modify the xortool which …

python bit-manipulation bitwise-operators xor bitwise-xor