|Hindu–Arabic numeral system|
|Positional systems by base|
|Non-standard positional numeral systems|
|List of numeral systems|
The ternary numeral system (also called base 3) has three as its base. Analogous to a bit, a ternary digit is a trit (trinary digit). One trit is equivalent to log2 3 (about 1.58496) bits of information.
Although ternary most often refers to a system in which the three digits are all non–negative numbers, specifically 0, 1, and 2, the adjective also lends its name to the balanced ternary system, comprising the digits −1, 0 and +1, used in comparison logic and ternary computers.
Representations of integer numbers in ternary do not get uncomfortably lengthy as quickly as in binary. For example, decimal 365 or senary 1405 corresponds to binary 101101101 (nine digits) and to ternary 111112 (six digits). However, they are still far less compact than the corresponding representations in bases such as decimal –see below for a compact way to codify ternary using nonary and septemvigesimal.
As for rational numbers, ternary offers a convenient way to represent 1/ as same as senary (as opposed to its cumbersome representation as an infinite string of recurring digits in decimal); but a major drawback is that, in turn, ternary does not offer a finite representation for 1/ (nor for 1/, 1/, etc.), because 2 is not a prime factor of the base; as with base two, one-tenth (decimal1/, senary 1/) is not representable exactly (that would need e.g. decimal); nor is one-sixth (senary 1/, decimal 1/).
The value of a binary number with n bits that are all 1 is 2n − 1.
Similarly, for a number N(b, d) with base b and d digits, all of which are the maximal digit value b − 1, we can write:
For a three-digit ternary number, N(3, 3) = 33 − 1 = 26 = 2 × 32 + 2 × 31 + 2 × 30 = 18 + 6 + 2.
Nonary (base 9, each digit is two ternary digits) or septemvigesimal (base 27, each digit is three ternary digits) can be used for compact representation of ternary, similar to how octal and hexadecimal systems are used in place of binary.
In certain analog logic, the state of the circuit is often expressed ternary. This is most commonly seen in CMOS circuits, and also in transistor–transistor logic with totem-pole output. The output is said to either be low (grounded), high, or open (high-Z). In this configuration the output of the circuit is actually not connected to any voltage reference at all. Where the signal is usually grounded to a certain reference, or at a certain voltage level, the state is said to be high impedance because it is open and serves its own reference. Thus, the actual voltage level is sometimes unpredictable.
A rare "ternary point" in common use is for defensive statics in American baseball (usually just for pitchers), to denote fractional parts of an inning. Since the team on offense is allowed three outs, each out is considered one third of a defensive inning and is denoted as .1. For example, if a player pitched all of the 4th, 5th and 6th innings, plus achieving 2 outs in the 7th inning, his innings pitched column for that game would be listed as 3.2, the equivalent of 3 2⁄3 (which is sometimes used as in alternative by some record keepers). In this usage, only the fractional part of the number is written in ternary form.
Ternary numbers can be used to convey self–similar structures like the Sierpinski triangle or the Cantor set conveniently. Additionally, it turns out that the ternary representation is useful for defining the Cantor set and related point sets, because of the way the Cantor set is constructed. The Cantor set consists of the points from 0 to 1 that have a ternary expression that does not contain any instance of the digit 1.Any terminating expansion in the ternary system is equivalent to the expression that is identical up to the term preceding the last non-zero term followed by the term one less than the last nonzero term of the first expression, followed by an infinite tail of twos. For example: 0.1020 is equivalent to 0.1012222... because the expansions are the same until the "two" of the first expression, the two was decremented in the second expansion, and trailing zeros were replaced with trailing twos in the second expression.
Ternary is the integer base with the lowest radix economy, followed closely by binary and quaternary. It has been used for some computing systems because of this efficiency. It is also used to represent three-option trees, such as phone menu systems, which allow a simple path to any branch.
A form of redundant binary representation called a binary signed-digit number system, a form of signed-digit representation, is sometimes used in low-level software and hardware to accomplish fast addition of integers because it can eliminate carries.
Simulation of ternary computers using binary computers, or interfacing between ternary and binary computers, can involve use of binary-coded ternary (BCT) numbers, with two bits used to encode each trit.BCT encoding is analogous to binary-coded decimal (BCD) encoding. If the trit values 0, 1 and 2 are encoded 00, 01 and 10, conversion in either direction between binary-coded ternary and binary can be done in logarithmic time. A library of C code supporting BCT arithmetic is available.
Some ternary computers such as the Setun defined a tryte to be six tritsor approximately 9.5 bits (holding more information than the de facto binary byte).
The bit is a basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented as either 0or1, but other representations such as true/false, yes/no, +/−, or on/off are common.
In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used for a sign or other indications.
The decimal numeral system is the standard system for denoting integer and non-integer numbers. It is the extension to non-integer numbers of the Hindu–Arabic numeral system. The way of denoting numbers in the decimal system is often referred to as decimal notation.
In mathematics and computing, hexadecimal is a positional system that represents numbers using a base of 16. Unlike the common way of representing numbers with ten symbols, it uses sixteen distinct symbols, most often the symbols "0"–"9" to represent values zero to nine, and "A"–"F" to represent values ten to fifteen.
The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Octal numerals can be made from binary numerals by grouping consecutive binary digits into groups of three. For example, the binary representation for decimal 74 is 1001010. Two zeroes can be added at the left: (00)1 001 010, corresponding the octal digits 1 1 2, yielding the octal representation 112.
The senary numeral system has six as its base. It has been adopted independently by a small number of cultures. Like decimal, it is a semiprime, though being the product of the only two consecutive numbers that are both prime it has a high degree of mathematical properties for its size. As six is a superior highly composite number, many of the arguments made in favor of the duodecimal system also apply to base-6. In turn, the senary logic refers to an extension of Jan Łukasiewicz's and Stephen Cole Kleene's ternary logic systems adjusted to explain the logic of statistical tests and missing data patterns in sciences using empirical methods.
A computer number format is the internal representation of numeric values in digital computer and calculator hardware and software. Normally, numeric values are stored as groupings of bits, named for the number of bits that compose them. The encoding between numerical values and bit patterns is chosen for convenience of the operation of the computer; the bit format used by the computer's instruction set generally requires conversion for external use such as printing and display. Different types of processors may have different internal representations of numerical values. Different conventions are used for integer and real numbers. Most calculations are carried out with number formats that fit into a processor register, but some software systems allow representation of arbitrarily large numbers using multiple words of memory.
A binary code represents text, computer processor instructions, or any other data using a two-symbol system. The two-symbol system used is often "0" and "1" from the binary number system. The binary code assigns a pattern of binary digits, also known as bits, to each character, instruction, etc. For example, a binary string of eight bits can represent any of 256 possible values and can, therefore, represent a wide variety of different items.
In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: typically "0" (zero) and "1" (one).
A numerical digit is a single symbol used alone, or in combinations, to represent numbers according to some positional numeral systems. The single digits and their combinations are the numerals of the numeral system they belong to. The name "digit" comes from the fact that the ten digits of the hands correspond to the ten symbols of the common base 10 numeral system, i.e. the decimal digits.
Quaternary is the base-4 numeral system. It uses the digits 0, 1, 2 and 3 to represent any real number.
Balanced ternary is a non-standard positional numeral system, used in some early computers and useful in the solution of balance puzzles. It is a ternary (base 3) number system in which the digits have the values –1, 0, and 1, in contrast to the standard (unbalanced) ternary system, in which digits have values 0, 1 and 2. Balanced ternary can represent all integers without using a separate minus sign; the value of the leading non-zero digit of a number has the sign of the number itself. While binary numerals with digits 0 and 1 provide the simplest positional numeral system for natural numbers, balanced ternary provides the simplest self-contained positional numeral system for integers.
The IEEE Standard for Floating-Point Arithmetic is a technical standard for floating-point arithmetic established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating-point implementations that made them difficult to use reliably and portably. Many hardware floating-point units use the IEEE 754 standard.
In computing, a fixed-point number representation is a real data type for a number that has a fixed number of digits after the radix point. Fixed-point number representation can be compared to the more complicated floating-point number representation.
Excess-3, 3-excess or 10-excess-3 binary code, shifted binary or Stibitz code is a self-complementary binary-coded decimal (BCD) code and numeral system. It is a biased representation. Excess-3 code was used on some older computers as well as in cash registers and hand-held portable electronic calculators of the 1970s, among other uses.
In computing, signed number representations are required to encode negative numbers in binary number systems.
Finger binary is a system for counting and displaying binary numbers on the fingers of one or more hands. It is possible to count from 0 to 31 (25 − 1) using the fingers of a single hand, from 0 through 1023 (210 − 1) if both hands are used, or from 0 to 1,048,575 (220 − 1) if the toes on both feet are used as well.
Non-standard positional numeral systems here designates numeral systems that may loosely be described as positional systems, but that do not entirely comply with the following description of standard positional systems:
A negative base may be used to construct a non-standard positional numeral system. Like other place-value systems, each position holds multiples of the appropriate power of the system's base; but that base is negative—that is to say, the base b is equal to −r for some natural number r.
BCD, also called alphanumeric BCD, alphameric BCD, BCD Interchange Code, or BCDIC, is a family of representations of numerals, uppercase Latin letters, and some special and control characters as six-bit character codes.