An implication relation for the integers in the programming language BASIC
Arnold Koslow · 1992
The discovery of the following underlying implication relation is due to D. T. Langendoen (private communication). BASIC implication In the BASIC programming language available on IBM personal computers ( BASIC Compiler 2.00, Fundamentals , Boca Raton, Florida, 1985) there are many numeric functions called “logical operators.” These functions are defined over a finite set of integers that are encoded in binary notation as strings of sixteen bits of 0's and 1's. The first bit is 0 if the integer is positive, and 1 if negative. That leaves fifteen bits for encoding, so that the range of these functions consists of all the integers from −32768 to +32767 (−2 15 to +2 15 ). The representing string for any integer in this range, therefore, consists of an initial 0 or 1 according as it is positive or negative, and a tail end that depends on the binary representation of the integer. If the integer is positive, then the tail end consists of its binary representation; if the integer is negative, then the tail end is determined as follows: If the negative integer is − m , and the binary encoding of m has n digits, then calculate what integer together with −2 ( n −1) would sum to − m , and let its binary representation be at the tail end on the sixteen-bit string. Thus, 3, being positive, would be represented as 0000000000000011, the initial bit representing the positive character, and the tail end (11) being the binary representation of 3.