less_retarded_wiki/unary.md
2024-11-02 20:06:14 +01:00

1.4 KiB

Unary

Unary generally refers to having "one of a thing". In different contexts it may specifically signify e.g.:

  • unary numeral system: A base for writing numbers (just as binary, decimal, hexadecimal etc.). This base is kind of an extreme, using only one symbol (0) and has at least two possible versions:
    • The most primitive "caveman" system of recording numbers with a single symbol, recording a number simply by writing "that many symbols", e.g. using the symbol 0, one is written as 0, two as 00, three as 000 etc. Zero itself is represented by an empty string (writing nothing). Though primitive, this system is actually usable.
    • A regular computer system that has some fixed number of unary places for storing each number (just as in binary we may have e.g. 8 bits for storing a number). However since each of those places can only hold one value (the single symbol of the unary system, usually set to be 0), the system is a joke, because no matter how many places, we can only ever record one number -- zero. The advantage is that we can store zero even with zero places, i.e. we don't even need any memory or computer at all to store the number, so such system is equivalent to just nothings.
  • unary function, operator etc.: function, operator etc. that only has one parameter (e.g. square root, ...).
  • ...