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
Redundant binary representation time proportional to log("n") (where "n" is the number of digit) compared to a constant-time in two's complement. It is, however, possible to "partially" convert only the least-significant portion of a redundantly represented number to non-redundant form. This allows operations such as masking off the low "k" bits can be done in log("k") time. Redundant binary representation A redundant binary representation (RBR) is a numeral system that uses more bits than needed to represent a single binary digit so that most numbers have several representations. An RBR is unlike usual binary numeral systems, including two's complement, which use a single