Top "Bitwise-operators" questions

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

Remove a Paint Flag in Android

My code looks like this: TextView task_text = (TextView) view.findViewById(R.id.task_text); task_text.setPaintFlags( task_text.…

android bitwise-operators
Ampersand (&) operator in a SQL Server WHERE Clause

Sorry for the very basic question. What does the & operator do in this SQL WHERE (sc.Attributes & 1) = 0 sc …

sql-server tsql bitwise-operators
Performance wise, how fast are Bitwise Operators vs. Normal Modulus?

Does using bitwise operations in normal flow or conditional statements like for, if, and so on increase overall performance and …

c++ bit-manipulation bitwise-operators
Can you control what a bitwise right shift will fill in C?

As far as I know when you use a left shift bitwise operator in C it's guaranteed that the vacant …

c bitwise-operators
Bitwise Multiply and Add in Java

I have the methods that do both the multiplication and addition, but I'm just not able to get my head …

java bit-manipulation bitwise-operators multiplication addition
Mask and extract bits in C

I've been looking at posts about mask but still can't get my head around how to extract certain bits from …

c mask bitwise-operators bit-shift bitwise-and
Is there a difference between using a logical operator or a bitwise operator in an if block in Java?

The contents of both of the following if blocks should be executed: if( booleanFunction() || otherBooleanFunction() ) {...} if( booleanFunction() | otherBooleanFunction() ) {...} So what's …

java operators bitwise-operators logical-operators
Java: right shift on negative number

I am very confused on right shift operation on negative number, here is the code. int n = -15; System.out.…

java bit-manipulation bitwise-operators bit-shift negative-number
XOR from only OR and AND

How do you do the XOR bitwise operation if you only have available the AND and the OR operations?

bitwise-operators xor bitwise-and
use of the bitwise operators to pack multiple values in one int

Low level bit manipulation has never been my strong point. I will appreciate some help in understanding the following use …

java bitwise-operators packing bit-packing