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.
For ease of adapting the materials, audio and transcripts are available to download.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-Share Alike 4.0 International License.
Visit the author's website for more information.
Worksheet for this episode is available on the author's website. Please note that the worksheet is not under a Creative Commons License.
Computer Organization and Design Fundamentals Series was created as part of the East Tennessee State University’s Open Educational Resources (OERs) Awards Program.
Tarnoff, David, "Episode 7.05 – Flipping Bits using the Bitwise Inverse and Bitwise-XOR" (2020). Computer Organization and Design Fundamentals Series. https://dc.etsu.edu/computer-organization-design-oer/55