On the CPU, there is a part called a binary comparator.
There are a lot of ways to implement one. But let’s just talk about that 8>3 example in an inefficient but easy way.
You can compare bit by bit. Ignore everything else, 1>0 and 0<1. The most significant bits are more important, so the fact that the 1s and2s place are bigger in 3 doesn’t matter, because the8’s place is 1 in 8 and 0 in 3.
It’s all just a matter of building the circuits so it follows a truth table.
If you want to see the actual lay out, just look up digital comparator.
Latest Answers