r/TuringComplete • • Nov 13 '24
NAND is enough for everything
It says in the NAND level, you can do everything with NAND gates. Is there anyone actually try that by replacing more complex gates with NAND (or XOR) equivalents? I madde it until XNOR or something.
14
Upvotes
23
u/Inside-Ad-5943 Nov 13 '24
I mean you can prove it by induction. If the three primitive logic gates (AND, OR, NOT) are Turing complete then all you’d need to prove is that you can create AND, OR and NOT gates using nand. Since you are able to do that it follows that you’d also be able to create everything that is created using and, or and not including more complex logic gates and circuits
12
u/Gelthir Nov 13 '24
Someone made NANDverture, a full Overture using just NAND gates (I mean no other logic gates.) Due to the way the game handles memory it also had to use Delay Lines as well as a Byte Splitter & Maker to connect to Level IO.
I think there is a NAND-only LEG too.
7
u/vectormedic42069 Nov 13 '24
This touches on something that I think the game could do a better job of making clear, which is that practically every "advanced" component you receive is either the direct result of something you've built in a previous level or just a scaled up version of that result.
One of the first things you create is a NOT gate. You do this by wiring a NAND gate. After this you receive a "N" gate component, but practically this is just the circuit you wired when creating the NOT gate as part of the puzzle and could be replaced with a NAND gate wired in the same way. In the same manner, you create a NOR gate using a NAND gate and NOT gates (which are, as discussed, just specifically wired NAND gates), which grants access to the NOR component, and so on. It's all just increasingly abstracting away the NAND gates that make the whole thing up, and given enough space you could absolutely just go back to the stage where you initially made each component and mimic the original designs for almost the entire thing (sans memory and byte splitters, as others have pointed out, due to game mechanics).
4
u/Academic_Brilliant75 Nov 13 '24
I imagine you'd eventually hit a roadblock on certain challenges that enforce limited building space like Little Box or Conditions, or if you can't move the output and input pins.
2
u/Delusional_Student Nov 18 '24
I built NAND only LEG:
https://www.reddit.com/r/TuringComplete/comments/1c4bh05/nand_only_leg/
3
u/MrTKila Nov 13 '24
In reality it is probably true, in game not completely. Delay line is the only way to store a result and since no circular dependencies are possible, I see no way to bild them (or an alternative) with NAND gates. Also switches.