Non-adjacent Form

The non-adjacent form (NAF) of a number is a unique signed-digit representation. Like the name suggests, non-zero values cannot be adjacent. For example:

(0 1 1 1)2 = 4 + 2 + 1 = 7
(1 0 −1 1)2 = 8 − 2 + 1 = 7
(1 −1 1 1)2 = 8 − 4 + 2 + 1 = 7
(1 0 0 −1)2 = 8 − 1 = 7

All are valid signed-digit representations of 7, but only the final representation (1 0 0 −1) is in NAF.

Read more about Non-adjacent Form:  Obtaining NAF, Properties

Famous quotes containing the word form:

    While they stand at home at the door he is dead already,
    The only son is dead.

    But the mother needs to be better,
    She with thin form presently drest in black,
    By day her meals untouch’d, then at night fitfully sleeping, often waking,
    In the midnight waking, weeping, longing with one deep longing,
    O that she might withdraw unnoticed, silent from life escape and
    withdraw,
    To follow, to seek, to be with her dear dead son.
    Walt Whitman (1819–1892)