Top "Bitwise-operators" questions

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

Bitwise Operations on char*

GCC gives error when compiling the code below. The commented two lines instead of the other or and shift lines …

c pass-by-reference bitwise-operators bit-shift bitwise-or
Correct usage of bitmask?

heyhey, just have a question about bitmasks. I think I know now what they are and where they can be …

java bit-manipulation bitwise-operators bit bitmask
Bitwise operations and shifts

Im having some trouble understanding how and why this code works the way it does. My partner in this assignment …

c bit-manipulation bitwise-operators twos-complement bit-shift
How does C++ do bitwise "or" operations on negative numbers?

When I give to a variable such value: e = 17|-15; , I get -15 as an answer after compiling.I can't …

c++ bitwise-operators bitwise-or
Applications of bitwise operators in C and their efficiency?

I am new to bitwise operators. I understand how the logic functions work to get the final result. For example, …

c bitwise-operators masking
How to reverse bitwise AND (&) in C?

How to reverse bitwise AND (&) in C? For example I have an operation in C like this: ((unsigned int)…

c reverse bitwise-operators
Type safe enum bit flags

I'm looking to use a set of bit flags for my current issue. These flags are (nicely) defined as part …

c++ enums bitwise-operators c++03
Difference between & and && in Scala?

I am trying to figure out the difference between & and && in Scala. I got this after searching &…

scala syntax bitwise-operators logical-operators operands
How to reverse a bitwise OR operation?

Here's what I've done: 93 | 199 which returns 223 I understand that this is because 0b1011101 | 0b11000111 is 0b11011111 However, suppose I want …

python bit-manipulation bitwise-operators bitwise-or
C# bitwise shift on ushort (UInt16)

I need to perform a bitwise left shift on a 16-bit integer (ushort / UInt16), but the bitwise operators in C# …

c# bit-manipulation bitwise-operators 16-bit