Skip to content

“TIS-100” – SIGNAL DIVIDER (SEGMENT 61212)

TIS-100 index

full solution

First appearance of my two-unit divider, which is put to great use later in PRIME FACTOR CALCULATOR:

main code segment

The left unit reads in the dividend and the right unit reads in the divisor, and the left unit repeatedly subtracts the divisor from its accumulator until it hits a negative number, keeping track of how many subtractions it’s performed. At the end, the left unit sends out both the remainder and the quotient in that order.