Hacker News new | past | comments | ask | show | jobs | submit login

Easy way to remember it: Never both together (NBT)



It’s easier to remember it as a bit inverter, or as boolean “not equal”, IMO. And “exclusive or” pretty much already spells out what it does.

Regarding the first one I might be biased by learning XOR from https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/xor/#..., however.


Red pill VS Blue pill, that's how I use to memorise it. You must choose one.

Now, it just means 'not equal', 'different', 'not same' etc.


I use this to remember what it does and also like thinking of XOR as an operation you can apply with a mask to flip bits (the linked article mentions this).


Sounds like NAND.


that would just be "not both"




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: