logoalt Hacker News

numerilast Sunday at 6:35 PM1 replyview on HN

No, balanced ternary, for example, uses {-1, 0, 1}. The system you're discussing is balanced quinary (base 5).

https://en.wikipedia.org/wiki/Signed-digit_representation


Replies

less_lesslast Sunday at 9:32 PM

It isn't balanced quinary, but rather redundant balanced quaternary (base 4). In balanced quinary (base 5), each digit has 5x the significance of the previous one, but in Booth's encoding algorithm it's 4x.

If digit i has significance b^i, then b (the base of the exponentiation) is the base (or radix) of the number system.

The page you linked explicitly mentions the binary version of Booth encoding as having base b=2 and three signed digits {-1, 0, 1}. The quaternary version similarly has b=4 and five signed digits {-2, -1, 0, 1, 2} ... and possibly sometimes -0 in practice, not sure.