Related to the "default" just use the ! before your variable:
If !buttonB then.... meaning If buttonB=0 then...
The 15th bit is the sign bit in two's complement. When the most significant bit is 1, it indicates a negative sign. Just Binary maths...
But is relative. If you use 8-bits then the 8th (most significant bit) is considered the sign bit. As long as you are thinking of positive and negative numbers. So at the end you have from -128 to +127 (1000 0000 to 0111 1111).
http://en.wikipedia.org/wiki/Two's_complement
Ioannis





Bookmarks