The ALGOL INTEGER function is used to convert EBCDIC characters to integers. These integers are then handled as number-to-number conversions. (Refer to “Truncation” later in this section for EBCDIC representations of numbers.) The integer representation is returned (for example, "1234" becomes 1234). When an item is converted to a Boolean item, the value of the new item is determined by the contents of the old item. If the old item is an alpha item, the Boolean value is obtained from the least significant bit of the rightmost character. If the old item is a group, the Boolean value is obtained from the least significant bit of the leftmost character. Special EBCDIC characters are handled in the following way:
The high-order four bits are disregarded.
If the binary value of the low-order four bits is less than or equal to 9, that value is returned.
If the binary value of the low-order four bits is greater than 9, the value is set to 8 or 9 by turning off bits 1 and 2. For example, a dollar sign ($), which has a hexadecimal value of 5B, becomes a 9; an equal sign (=), which has a hexadecimal value of 7E, becomes an 8.