If, for example, one has an input voltage of 5 Volts, and one wants to obtain this voltage modulo 3, as:
$$V_\text{out} = 5\mod 3\text,$$ then how does one perform this operation using simple circuitry?
This is perhaps an unusual question, but the aim is to try and replicate the basic programming math operations (+,-,*,/,%) using the simplest circuitry possible, and with voltages.
So far, I found this old question from 2013 on the topic, , Is there a device to get modulo of voltage value? but over here (from what I understood), there's only the possibility of modulo 2n, n being the number of cascaded stages. If, one wants modulo 3 or 5, then how does one change/replace the circuit mentioned in the attached question's answer to do this?
There is also a circuit mentioned in this paper: https://www.academia.edu/2309394/An_8-bit_Voltage_Mode_Analog_to_Digital_Converter_Based_on_Integer_Division but even this states that the reference number for division (modulo) should be a proper power of 2?