Skew binary number system non-zero digits, a form called the sparse representations of numbers by Okasaki, incrementation and decrementation can be performed in constant time. Other arithmetic operations are performed by switching between the skew binary representation and the binary representation. Given a skew binary number, its value can be computed by a loop, computing the successive values of formula_4 and adding it once or twice for each formula_5 such that the formula_5th digit is 1 or 2 respectively. A more efficient method is now given, with only bit representation and one substraction. The skew binary number of the form formula_7 without 2 and
Skew binary number system with formula_8 1s is equal to the binary number formula_9 minus formula_8. Let formula_11 represents the digit formula_12 repeated formula_13 times. The skew binary number of the form formula_14 with formula_8 1s is equal to the binary number formula_16 minus formula_8. Similarly to the preceding section, the binary number formula_18 of the form formula_7 with formula_8 1s equals the skew binary number formula_21 plus formula_8. Note that since addition is not defined, adding formula_8 corresponds to incrementing the number formula_8 times. However, formula_8 is bounded by the logarithm of formula_18 and incrementation takes constant time. Hence transforming a binary number