2 ms·
>As developers, we love our booleans. They map perfectly into how computers work at a low level no, booleans do not map perfectly onto how computers work at a
by fsckboy 2y ago
>As developers, we love our booleans. They map perfectly into how computers work at a low level
no, booleans do not map perfectly onto how computers work at a low level: what happens when you add two booleans together?
C handles booleans how computers work at a low level.
Now you might say, well, adding two booleans together is an xor for that bit, and an and for the carry bit... would that were true, but we don't have access to that part of the ALU, it is already configured to be a full adder.
the only parts of the lowlevel bitwise boolean/binary mix that C is missing (and should be added) is the overflow flag and the carry flag