Bitwise Operations Refresher
AND, OR, XOR, NOT, and bit-shift operations explained visually.
Welcome
Bitwise operations work directly on binary representations of numbers. They are the fundamental operations inside every symmetric cipher, hash function, and MAC.
AND Operation
AND returns 1 only when BOTH bits are 1.
0101 AND 0011 = 0001
Use case: masking — extracting specific bits.
mask = 0xFF; low_byte = value & mask
All lessons in this course
- Bitwise Operations Refresher
- XOR Encryption & the One-Time Pad
- Why XOR Alone Is Not Secure
- XOR Inside AES & Stream Ciphers