@donnie You can't just overflow exactly for the reason mentioned above.
Overflow works like a clamp, if you have
clamp(0, 0.5, 1) it will produce 0.5
0.5 is the same as a component of grey in the above screenshot.
And you want something like round(0.5) so that no values between 0 or 1 occur, so it either black or white.
You can try to mimic the behaviour of round by subtracting the value and multiplying it by a very large number, but that is just an awful way of mimicking round that can produce wrong results anyways.
Take clamp(0, (y - 0.5) * -1000, 1) as an example, if y has a value 0.4999 the resulting value will be between 0 and 1, and so will be slightly grayish.
That is what you do in the first example of yours, but instead of 0.5 it is 128 there, it is just a way of mimicking round. Such hack can work if you increase that multiplicator by a lot, as floating point numbers and colors don't have infinite precision in them and some numbers are rounded to the nearest representable one, but it is better to just use round function and save yourself from possible troubles.