r/TuringComplete • u/Impossible_Eggies • 1d ago
Solution: Divide Spoiler
Here's my working design for the Divider level. I have two custom components:
- 0f: Non-Zero Switch: If the input is not zero, the output is 1
- eq_o: Outputs 1 if A is equal to or greater than B. The design is shown at the top of the first picture.
The first section is to weed out anything that won't work, and would output a simple 0 or a 1. If the two values are completely even, it will output a 1. If one of the numbers is 0, it will output a 0. If the denominator is bigger than the numerator, it will output a 0.
The next section does long division with binary, multiplying each digit of the numerator with the denominator, and if it's equal or bigger it outputs a 1, and subtracts the value from the next step.
The second picture is the half-divider. It only works if the exceptions mentioned in step 1 have been removed.
- permalink
-
reddit
You are about to leave Redlib
Do you want to continue?
https://www.reddit.com/r/TuringComplete/comments/1ycpq54/solution_divide/
No, go back! Yes, take me to Reddit - sharecopied
- dl download all (2)
90% Upvoted


4
u/Crispy1961 1d ago
Smooth wiring. Looks great. Little tip, never use NEG to subtract. It already has ADDer in it. Use NOT instead and activate the carry in bit of the ADDer to turn the NOT to NEG.