x86-64 Assembly Bit Manipulation: AND, OR, XOR, NOT, Shifts & Rotates Tutorial

Neural Lantern 2025-12-29

Views 1

In this hands-on tutorial, we dive into bit manipulation in x86-64 assembly using Yasm on Ubuntu. We cover the basics of logical operations like AND, OR, XOR, and NOT, then move into shifting (logical vs arithmetic), rotating bits, and why signed vs unsigned matters for shifts.

I explain each concept on paper first, then show real code examples running in GDB to prove how the bits change. We look at patterns in registers, see what happens with negative numbers in two's complement, and even touch on how shifts can multiply or divide by powers of 2.

Perfect if you're learning low-level programming, reverse engineering, or just curious about how bits work under the hood. No prior assembly knowledge needed, but it'll help if you've seen my other videos.

Like and subscribe for more assembly tutorials!

Thanks for watching!

Find us on other social media here:
- https://www.NeuralLantern.com/social

Please help support us!

- Subscribing + Sharing on Social Media
- Leaving a comment or suggestion
- Subscribing to our Blog
- Watching the main "pinned" video of this channel for offers and extras


Share This Video


Download

  
Report form