Signed-digit representation
From Wikipedia, the free encyclopedia
Numeral systems by culture | |
---|---|
Hindu-Arabic numerals | |
Western Arabic Eastern Arabic Khmer |
Indian family Brahmi Thai |
East Asian numerals | |
Chinese Japanese |
Korean |
Alphabetic numerals | |
Abjad Armenian Cyrillic Ge'ez |
Hebrew Ionian/Greek Sanskrit |
Other systems | |
Attic Etruscan Roman |
Babylonian Egyptian Mayan |
List of numeral system topics | |
Positional systems by base | |
Decimal (10) | |
2, 4, 8, 16, 32, 64, 128 | |
3, 9, 12, 24, 30, 36, 60, more… | |
Signed-digit representation of numbers indicates that values can be prefixed with a − (minus) sign to indicate that they are negative.
Signed-digit representation can be used in low-level software and hardware to accomplish fast high speed addition of integers because it can eliminate carries. In the binary numeral system one special case of signed-digit representation is the non-adjacent form which can offer speed benefits with minimal space overhead.
Note that signed-digit representation is not necessarily unique. For instance:
- (0 1 1 1) = 4 + 2 + 1 = 7
- (1 0 −1 1) = 8 − 2 + 1 = 7
- (1 −1 1 1) = 8 − 4 + 2 + 1 = 7
- (1 0 0 −1) = 8 − 1 = 7
The non-adjacent form does guarantee a unique representation for every value.