http://qs1969.pair.com?node_id=11108858


in reply to Re^8: Can I access and use UV types from perl?
in thread Can I access and use UV types from perl?

You seem to be over-complicating things. In a computer, registers and memory words hold a collection of bits (e.g. 64 bits). How we interpret those bits is up to the programmer and/or the CPU's ALU. One common way is to treat the bit pattern as as an unsigned binary number. Another common way is to treat them as a two's complement signed value - where values with the high bit set are treated as negative numbers from the point of view of comparisons etc. Other possibilities in the past have included just using one bit as a sign bit, and using one's complement.

The big advantage of two's complement as a way of representing negative numbers is that they can be added and subtracted exactly the same way as unsigned numbers, the only differences being when the overflow flag on the ALU should be set.

But we now seem to be a long way off from anything that has to do with perl.

Dave.