A controlled switch and pull-up resistor make a simple inverted output node. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Below threshold leaves the pull-up high
A 2 volt control is below the 3 volt threshold, so the switch stays open and the output is 12 volts.
2V<3V
Above threshold pulls the output low
A 5 volt control closes the switch. The output becomes 0 volts and the pull-up current is 2 amperes.