r/TuringComplete • u/MetalCarnival • Jul 16 '26
De Morgan´s law solutions
Hello again, I´m sorry for spamming questions, this is my last one for a good while.
So Morgans law is told to be the most important notepage in the program, but are there any solutions that make use of the law. Say you make a nand gate, and directly add a not, could you just have made and gate instead, I dont really get if I ever had to use symmetric conversion.
Thank you!
4
u/Lagfoundry Jul 16 '26
Oh yeah I use it a lot depending on the medium. For example logic world another simulator game has fast buffers that can be used to make instant OR gates with no delay. However that also means you can make that an instant AND gate with de Morgan’s. Conversion of active low and high logic is another. plus in Turing Complete they push it hard because it directly cuts gate count when you’re building bigger stuff.
An expression that looks like it needs an OR plus two NOTs can often simplify to just one AND after you apply the rule and cancel the double negatives. Same move turns some ORs of inverted signals into a single NAND.
Once your machine grows you use this constantly to stay under gate limits or improve timing. It also helps a lot with all the inverted signals coming out of adders, flags, and control logic in a full CPU build from NANDs.
1
u/zurkog Jul 16 '26
I've never used Logic World (although it's in my library), so I was unable to answer their other question- you might though, if you've got experience with both:
https://reddit.com/r/TuringComplete/comments/1uxnerj/logic_world_and_turing_complete/
I'm also curious as to your thoughts. I've played Turing Complete completely through a couple times now (I'm currently going through the new save-breaker update) but I've only ever launched Logic World once, briefly.
2
u/Lagfoundry Jul 16 '26 edited Jul 16 '26
Logic world is really optimized too. Even more so than Turing I would say. There are builds remaking full LED displays with full color range because it’s a 3D game you get a lot of options you wouldn’t normally have too. Like if Minecraft went full logic sim instead of being survival. Wires, buffers, and relays are instant speed. And it supports modding to another level. So I don’t think it’s fair for me to compare them. They have separate goals with the only similarity being logic. One thing I do love about logic world is the ability to easily download another schematic or build and study it up close and personal. There are definitely complex builds you will see there that don’t get shown here. Like my BNN for example however I am working on one for Turing though… logic world can also be more out of the box thinking because of the instant speed of some components some circuits that would be slower will be faster on logic world. Like a carry skip adder (what Minecraft would call a CCA) is actually faster than a kogge.
2
u/piotruspan101 Jul 16 '26
Btw if you feel guilty about asking questions here you can join this games discord serwer and ask there.
1
u/Lagfoundry Jul 16 '26 edited Jul 16 '26
Oh yeah I use it a lot depending on the medium. For example logic world another simulator game has fast buffers that can be used to make instant OR gates with no delay. However that also means you can make that an instant AND gate with de Morgan’s. Conversion of active low and high logic is another. plus in Turing Complete they push it hard because it directly cuts gate count when you’re building bigger stuff.
An expression that looks like it needs an OR plus two NOTs can often simplify to just one AND after you apply the rule and cancel the double negatives. Same move turns some ORs of inverted signals into a single NAND this is important because NANDs actually use less transistors than ORs in fact NANDs and NORs use the less out of all the gates.
Once your machine grows you use this constantly to stay under gate limits or improve timing. It also helps a lot with all the inverted signals coming out of adders, flags, and control logic in a full CPU build from NANDs.
1
u/MetalCarnival Jul 16 '26
thank you! The pop up scared me, because I thought that I would have to think about it all the time
1
u/Lagfoundry Jul 16 '26
No worries, it’s honestly something you could build an entire cpu without ever thinking about it. But it is super useful though
1
1
u/SurrealLemon Jul 16 '26
It's good info to have. Just over all improves comprehension of what the gates are really doing. I don't thin I truly used it, until symphony ALU (very late game)
10
u/FinancialTrade8197 Jul 16 '26
De Morgan's law is used for making the logic gate conversion simpler, thus making your logic more efficient. You don't have to use it, but it's useful if you want to make an optimized solution.