by MrYellowP · 6y ago · 0 comments
Result has no bit set = both terms equal Result's sign bit is set = second term bigger Result's sign bit isn't set = first term bigger
Multiplying by the result of comparisons (aka 0 and 1, as you state) is actually a common performance optimization. Does not work for everything, but when it works it works well.
result = if condition { a } else { b }
in circuit programming, we normally do result = condition * a + (1 - condition) * bAlso unbounded loops can’t practically finish even on a Turing machine :)