Hacker News new | ask | show | jobs
by Houshalter 4053 days ago
Unary is a well defined concept, but it's not "base 1".

Or if you don't want to argue about the definition of base, at the very least it doesn't have any of the properties other base systems have.

A number in any base system can be thought of as an infinite string of zeros, followed by the digits. "1" is just a convenience, it could also be written "0000000001", or "0000...0001".

And then you can extend it to decimals, and have an infinite string of zeros after the decimal point. You can't have decimals in unary.

In other words it isn't necessary to store any additional information on how many symbols you need. The symbols are fixed, you just choose what state they are in.

Unary "cheats" by using a meaningless symbol and passing all the information in the number of times the symbol is written.

All the algorithms for adding numbers, dividing, subtraction, etc, can be generalized to work in any base. But not unary. Unary requires entirely different algorithms because it's not a base number system.

The formulas for converting between two bases work for any base system except unary. The formulas for measuring the number of digits you need to represent a number work for any base system except unary.

It's just an entirely different system of representing numbers. It's more similar to Roman numerals.