Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To be fair, AND, OR and NOT are enough to compute any function, and you can make all the other operators out of a combination of those three. For example A XOR B is just (A OR B) AND (NOT (A AND B)). Knowing things beyond AND, OR or NOT is useful, but not strictly necessary. XOR has useful properties though: with random inputs you get TRUE 50% of the time, allowing you to chain it without trending to 0 or 1; also it's the opposite of bitwise equality.

The others aren't that interesting if you aren't dealing with hardware, and their function is obvious if you know the naming convention.



Nah, all you need are nand gates. Everything else can be implemented from those.


Yeah, similarly in mathematics they often like to build everything up from ‘implies’ where the rule is implies(a,b) = or(not(a), b) = nand(a,nand(b, b)).


You only need one of {AND, OR} too.

((a or b) is (not ((not a) and (not b))), and vice versa.)




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

Search: