Hacker News new | ask | show | jobs
by cracki 5901 days ago
i see some strange things in the truth tables.

first, the left and right operands are ordered differently. on second glance, this smells like gray code, so only one operand changes to the next line. nevermind my reaction here.

then, the NOT AND table contradicts what python evaluates the forms to.

1 comments

uh, after revisiting the tables in the PDF, i understand the situation better.

the NAND and NOR tables don't follow the same evaluation scheme.

the NOR table is "(not A) or B", which is according to python's precedence rules without parentheses.

the NAND table is "not (A and B)", which matches the common definition of NAND.