Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

XOR

The bit operation that gives 1 where the two bits differ and 0 where they match; XOR with 1 flips a bit.

Exclusive or, written ^ in code and ⊕ in math, gives 1 exactly when its inputs differ; x ^ x = 0 and x ^ 0 = x.

Examples

  • 1100 XOR 1010 = 0110, and xor eax, eax gives 0.

Read the full section →