DecodeBin

Declaration: DecodeBin(ix: integer): integer;
The function DecodeBin returns an integer value which has the bit ix set and all other bits reset. A value of ix outside the valid range (0..31) results in a zero return value. The least significant bit (LSB) has the index 0, the most significant bit (MSB) is addressed by the index 31.

The following figure shows the results of a call to DecodeBin(10), which sets bit 10 to one and all other bits to zero. The resulting bit pattern is interpreted as an integer number: