Top "Bit-manipulation" questions

The manipulation of individual bits.

How does this work? Weird Towers of Hanoi Solution

I was lost on the internet when I discovered this unusual, iterative solution to the towers of Hanoi: for (int …

algorithm language-agnostic bit-manipulation towers-of-hanoi
How can I shuffle bits efficiently?

I need to shuffle a 16 bit unsigned integer in a way that the even indexes land in the lower byte, …

c++ c bit-manipulation z-order-curve
LSB to MSB bit reversal on ARM

I need to reverse an YUV image with each byte in LSB instead of MSB. I have read Best Algorithm …

arm bit-manipulation neon
How is this bitwise AND operator masking the lower seven order bits of the number?

I am reading The C Programming Language by Brian Kernigan and Dennis Ritchie. Here is what it says about the …

c bit-manipulation bit bitwise-operators
Comparing Bitfields of Different Sizes

What happens if you use a bitwise operator (&, |, etc.) to compare two bitfields of different sizes? For example, comparing 0 1 1 0 …

c++ bit-manipulation low-level bit-fields
Qt QImage pixel manipulation problems

I'm currently in the process of writing a steganography application with Qt. I am trying to hide my message bits …

c++ qt bit-manipulation steganography qimage
Understanding bset and bclr

I've run across an example my professor made which made me question my understanding of the bset and bclr assembly …

assembly bit-manipulation 68hc12
How to write a bitstream

I'm thinking about writing some data into a bit stream using C. There are two ways come in mind. One …

c bit-manipulation bitstream