Inverting or flipping the bits of an integer is the third and last method of "bit bashing" we will discuss. There are two ways to invert bits: either flip all of them at once or use a mask to identify which bits to flip and which to leave alone.

Podden och tillhörande omslagsbild på den här sidan tillhör Intermation. Innehållet i podden är skapat av Intermation och inte av, eller tillsammans med, Poddtoppen.

Senast besökta

Geek Author

Flipping Bits using the Bitwise Inverse and Bitwise-XOR

00:00