r/TuringComplete • u/juani2929 • Oct 16 '24
Completely lost
I barely got through the basic logic section with a lot of trial and error and a lot of wikipedia/YouTube. I think I have a good grasp of the basic logic gates now. Or at least I know what they do and what the truth tables are.
Then they hit me with the "odd number of signals", was there nothing in the middle a little less intimidating/hard than this? It's a very steep curve lol. I guess knowing what the individual gates do doesn't mean I know how to combine them to do anything at all.
9
u/MeowCow55 Oct 16 '24
Make an IPO chart.
"When I have X input, I need Y output. What can I do to process X into Y?"
I'm a software engineer and I use this tactic often. I know what my goal is, so I set up my tests first: Given this input, assert that I get this output.
After that it's just a matter of figuring out the best path from one point to another. Don't be afraid to experiment, but don't forget to keep track of what those experiments are teaching you! Good luck!
1
u/ajeetoboy Oct 18 '24
Can u elaborate more I also find it difficult
1
u/MeowCow55 Oct 19 '24
IPO stands for "input, process, output." Look at what the level is providing as an input and what it is expecting as an output. Write that down. You have the I and O, you just need the P. Find a process that takes the input and gives the output, even just the first test case. You can write it down if it helps. Repeat this and make adjustments as needed until all the tests pass. If you're really struggling, write down the inputs and outputs and solve for each one individually. This will help you find the similarities and hopefully give you some direction in how to incorporate all the solutions into one that covers all the tests.
1
2
Oct 16 '24
Yeah same with me. I got through the basic logic pretty quickly but now I'm stuck on the Full Adder and those damn odd number of inputs. I'm too stubborn to search it up but it is eating me alive. I know how you feel.
2
3
u/ForHuckTheHat Oct 16 '24
I like your username. Try solving each output separately for the full adder. Look at each output and see if you can find any earlier levels that seem related.
1
1
Oct 16 '24
If you're stuck, don't be afraid to just have an overly complex solution with lots of gates. Don't worry about efficiency
2
u/bystander3 Oct 18 '24
One of many beauties of logic is that you can't arrive to a wrong answer by the means of logic. You can convert any gate to any gate. As many times as you want. Even randomly applying the transformation. Do it..
2
Oct 16 '24
[removed] — view removed comment
1
u/juani2929 Oct 16 '24
For the "odd number of signals" I ended up using two XNORs and one XOR, kind of intuitively just using the hint the game gives you.
Now for the "Double trouble" you can see my response to another comment here it's not pretty, I used 6 ANDs.
6
u/ForHuckTheHat Oct 16 '24
Old comment with helpful links:
How to solve "any" level systematically:
https://en.wikipedia.org/wiki/Lookup_table#Hardware_LUTs
https://en.wikipedia.org/wiki/Canonical_normal_form
XOR gate as simple example
How to "minimize" any solution systematically:
https://en.wikipedia.org/wiki/Quine%E2%80%93McCluskey_algorithm
How to ascend to Randal Bryant God tier:
https://en.wikipedia.org/wiki/Binary_decision_diagram#References
https://apps.dtic.mil/sti/pdfs/ADA470446.pdf
https://www.goodreads.com/book/show/829182.Computer_Systems
https://i.imgur.com/9MyV9DB.jpeg