Non-adjacent form
The non-adjacent form (NAF) of a number is a unique signed-digit representation, in which 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
Part of a series on |
Numeral systems |
---|
List of numeral systems |
All are valid signed-digit representations of 7, but only the final representation, (1 0 0 −1)2, is in non-adjacent form.
The non-adjacent form is also known as "canonical signed digit" representation.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.