3 ms·
One reason CPUs don't trap on overflow is that it lets them use the same instruction for unsigned values and two's complement values. The instruction can then
by mjw1007 3y ago
One reason CPUs don't trap on overflow is that it lets them use the same instruction for unsigned values and two's complement values.
The instruction can then set one condition code that means "if you intended this as an unsigned addition, the answer was out of range" and a different one that means "if you intended this as a two's complement addition, the answer was out of range".