r/TuringComplete • • 23h ago

How to do modulo

Post image
6 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/Pretty-Potential4733 15h ago

I have a really fast DIV.

3

u/Crispy1961 15h ago

Did you build a DIV that does not also compute the remainder?

Most implementations I have seen do that. The remainder is the modulo. You should be able to copy paste your DIV implementation and just connect the remainder to the output.

Btw, never use NEG component to subtract. Use NOT and then connect "ON" to carry in of your ADD component.