internal-representation

boolean true -- positive 1 or negative 1?

I'm designing a language, and trying to decide whether true should be 0x01 or 0xff. Obviously all non-zero values will be converted to true, but I'm trying to decide on the exact internal representation. What are the pros and cons for each choice? ...

Why is two's complement used to represent negative numbers?

I'm just curious if there's a reason why in order to represent -1 in binary, two's complement is used: flipping the bits and adding 1? -1 is represented by 11111111 (two's complement) rather than (to me more intuitive) 10000001 which is binary 1 with first bit as negative flag. Disclaimer: I don't rely on binary arithmetic for my job! ...

What is the internal representation of datetime in sql server?

What is the underlying datastructure of datetime values stored in SQL Server (2000 and 2005 if different)? Ie down to the byte representation? Presumably the default representation you get when you select a datetime column is a culture specific value / subject to change. That is, some underlying structure that we don't see is getting ...