Top "Bitwise-operators" questions

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

Are the results of bitwise operations on signed integers defined?

I know that the behavior of >> on signed integer can be implementation dependent (specifically, when the left operand …

c++ c bitwise-operators
Understanding PHP & (ampersand, bitwise and) operator

I often use ($var & 1) in my code, which returns true if $var is an odd number and false if …

php operators bit-manipulation bitwise-operators
Is there a built-in function to reverse bit order

I've come up with several manual ways of doing this, but i keep wondering if there is something built-in .NET …

c# .net bitwise-operators
The difference between logical shift right, arithmetic shift right, and rotate right

I've been reading the classic Hacker's delight and I am having trouble understanding the difference between logical shift right,arithmetic …

bit-manipulation bitwise-operators bit bit-shift
LC3 Assembly Bitwise Right Shift

What I need to do it implement both a bitwise left shift, and a bitwise right shift using LC-3 Assembly. …

assembly bitwise-operators bit-shift lc3
How does the bitwise operator XOR ('^') work?

I'm a little confused when I see the output of following code: $x = "a"; $y = "b"; $x ^= $y; $y ^= $x; $…

php bitwise-operators
How to set/unset a bit at specific position of a long?

How to set/unset a bit at specific position of a long in Java ? For example, long l = 0b001100L ; // …

java bit-manipulation bitwise-operators
Difference between some operators "|", "^", "&", "&^". Golang

Recently I read golang specification and faced with some interesting operators: & bitwise AND integers | bitwise OR integers ^ bitwise XOR …

math go operators bitwise-operators
Why are JavaScript negative numbers not always true or false?

-1 == true; // false -1 == false // false -1 ? true : false; // true Can anyone explain the above output? I know I could …

javascript boolean-logic bitwise-operators
How does !!~ (not not tilde/bang bang tilde) alter the result of a 'contains/included' Array method call?

If you read the comments at the jQuery inArray page here, there's an interesting declaration: !!~jQuery.inArray(elm, arr) Now, …

javascript jquery operators bitwise-operators