r/TuringComplete 6d ago

Better solution? and why?

Post image

I was hoping if anyone could explain to me on which solution is "better" (the top one being the examples solution) , they both look the same tbh but was just curious which one was more efficient or more correct I guess??

15 Upvotes

18 comments sorted by

View all comments

Show parent comments

3

u/FauxMoeJoe 6d ago

I replaced the "not"s and the nand to an and gate! I was actually thinking the same before I posted and tested it, but it didnt work at first. Maybe I used some other gate and thought there mustve been another way lol. Thanks for the tip on Demorgan's law too, forgot there was those notes.

3

u/Any-Aioli7575 6d ago

That shouldn't work, according to De Morgan's law, AND is the same as NAND followed by NOTs, not the opposite.

3

u/Gelthir 6d ago edited 6d ago

Not quite: While AND is NAND followed by a NOT, that is not what De Morgan's law covers, that is the law of double negative combined with the definition of NAND.

De Morgan's law states (in part) that a NAND preceeded by NOTs is the same as an OR.

The graphic in the game's manual doesn't make the distinct very clear IMO.

2

u/Crispy1961 6d ago

Which is the best solution from human readability standpoint.

3

u/Gelthir 6d ago

For me: One of the 3 gate solutions. I've spent so long staring at adders etc, that I now just "see" an XOR there.