v0.31 Talk:Fluid logic

From Dwarf Fortress Wiki
Jump to navigation Jump to search

Logic Gate Misconception[edit]

Hello, I'm a newbie here, both to Dwarf Fortress and to any type of wiki in general, but I study electronics and all that's implied in the form of logic gates and circuits and noticed that you guys seem to have your NAND and NOR gates mixed up.

A NAND gate is the opposite of an AND gate; whenever an AND gate would normally be off (zero [0] from now on) a NAND gate would normally be on, (1) and vice-versa.

X Y AND NAND
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0

This is the same as putting an inverter over the output of an AND gate. Using bridges instead of floodgates to invert the inputs of an AND gate instead, however, is not the same beast; the two middle terms for the NAND gate will be 0 instead of 1 in this case, describing the behavior of a NOR gate. This is known as DeMorgan's Theorem, and the converse holds true for your NOR gate implementation; it's actually a NAND gate.

tldr; the NAND gate described by the article is actually a NOR gate, and the NOR gate is actually a NAND gate. JacaByte 17:53, 9 January 2011 (UTC)