With Pentacalc's programming calculator, you have the option of working in either signed or unsigned mode.

You can select signed mode by clicking on the Sign check box at the upper right corner of the programming calculator. When the box is not checked, PentaCalc Pro performs programming operations in unsigned mode. In unsigned mode, negative numbers cannot be represented. In signed mode, the most significant bit (of binary notation) is the sign bit. When the most significant bit is one, the number is negative. When the most significant bit is 0, the number is positive. For example, in the binary base and 8-bit word size, you may enter the number 10000001. If you are in unsigned mode, this represents the decimal number 129. If you are in signed mode, this represents the decimal number -127..

Signed or unsigned mode

The signed or unsigned mode will not affect most of the operations you perform, just how they are interpreted. However, there are two exceptions to this. The first exception is converting between any base and decimal. If the most significant bit is 1 when you convert to decimal in signed mode, the result will be negative; in unsigned mode, the result will be positive. Another exception is left and right shifting. When the Sign box is not checked, the shift left / arithmetic shift left and the shift right / arithmetic shift right) buttons perform an unsigned shifting operation. When the Sign box is checked, the the shift left / arithmetic shift left and the shift right / arithmetic shift right buttons buttons perform a signed shifting operation. Arithmetic shifts are signed shifts. They will preserve the most significant bit or sign bit of the number. More information on shifting and arithmetic shifting can be found in the Shifting and Rotating topic.