Top "Bit-shift" questions

A bit shift operation moves the bits contained in a binary numeral or bit pattern to the left or to the right.

Meaning of <<= and |=

What is the meaning of <<= and |= in C? I recognise << is bitshift etc. but I don't …

c operators semantics bit-shift logical-operators
What is the JavaScript >>> operator and how do you use it?

I was looking at code from Mozilla that add a filter method to Array and it had a line of …

javascript operators bit-shift
Have you ever had to use bit shifting in real projects?

Have you ever had to use bit shifting in real programming projects? Most (if not all) high level languages have …

bit-manipulation bit-shift
Should I bit-shift to divide by 2 in Java?

Possible Duplicates: Is shifting bits faster than multiplying and dividing in Java? .NET? Quick Java Optimization Question Many years ago …

java performance bit-manipulation division bit-shift
Set Specific Bit in Byte Array

I want to know how to set a specific bit in a 16 byte array (128 bits). For example ... if I wanted …

c# arrays bit-shift
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
Left bit shifting 255 (as a byte)

Can anyone explain why the following doesn't compile? byte b = 255 << 1 The error: Constant value '510' cannot be …

c# bit-manipulation bit-shift
Is BitArray faster in C# for getting a bit value than a simple conjuction with bitwise shift?

1). var bitValue = (byteValue & (1 << bitNumber)) != 0; 2). using System.Collections.BitArray with a Get(int index) method What is faster? …

c# performance bit-shift logical-operators bitarray
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
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