Quaternary numeral system
Encyclopedia
Quaternary is the base- numeral system
Numeral system
A numeral system is a writing system for expressing numbers, that is a mathematical notation for representing numbers of a given set, using graphemes or symbols in a consistent manner....

. It uses the digit
Numerical digit
A digit is a symbol used in combinations to represent numbers in positional numeral systems. The name "digit" comes from the fact that the 10 digits of the hands correspond to the 10 symbols of the common base 10 number system, i.e...

s 0, 1, 2 and 3 to represent any real number
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...

.

It shares with all fixed-radix
Radix
In mathematical numeral systems, the base or radix for the simplest case is the number of unique digits, including zero, that a positional numeral system uses to represent numbers. For example, for the decimal system the radix is ten, because it uses the ten digits from 0 through 9.In any numeral...

 numeral systems many properties, such as the ability to represent any real number with a canonical representation (almost unique) and the characteristics of the representations of rational number
Rational number
In mathematics, a rational number is any number that can be expressed as the quotient or fraction a/b of two integers, with the denominator b not equal to zero. Since b may be equal to 1, every integer is a rational number...

s and irrational number
Irrational number
In mathematics, an irrational number is any real number that cannot be expressed as a ratio a/b, where a and b are integers, with b non-zero, and is therefore not a rational number....

s. See decimal
Decimal
The decimal numeral system has ten as its base. It is the numerical base most widely used by modern civilizations....

 and binary
Binary numeral system
The binary numeral system, or base-2 number system, represents numeric values using two symbols, 0 and 1. More specifically, the usual base-2 system is a positional notation with a radix of 2...

 for a discussion of these properties.

Relation to other positional number systems

Numbers one to twenty-seven in standard quaternary
Quaternary 1 2 3 10 11 12 13 20 21
Binary 1 10 11 100 101 110 111 1000 1001
Decimal 1 2 3 4 5 6 7 8 9
Quaternary 22 23 30 31 32 33 100 101 102
Binary 1010 1011 1100 1101 1110 1111 10000 10001 10010
Decimal 10 11 12 13 14 15 16 17 18
Quaternary 103 110 111 112 113 120 121 122 123
Binary 10011 10100 10101 10110 10111 11000 11001 11010 11011
Decimal 19 20 21 22 23 24 25 26 27

Relation to binary

As with the octal
Octal
The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Numerals can be made from binary numerals by grouping consecutive binary digits into groups of three...

 and hexadecimal
Hexadecimal
In mathematics and computer science, hexadecimal is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen...

 numeral systems, quaternary has a special relation to the binary numeral system
Binary numeral system
The binary numeral system, or base-2 number system, represents numeric values using two symbols, 0 and 1. More specifically, the usual base-2 system is a positional notation with a radix of 2...

. Each radix
Radix
In mathematical numeral systems, the base or radix for the simplest case is the number of unique digits, including zero, that a positional numeral system uses to represent numbers. For example, for the decimal system the radix is ten, because it uses the ten digits from 0 through 9.In any numeral...

 4, 8 and 16 is a power of 2, so the conversion to and from binary is implemented by matching each digit with 2, 3 or 4 binary digits, or bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

s. For example, in base 4,
302104 = 11 00 10 01 002.

Although octal and hexadecimal are widely used in computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

 and programming in the discussion and analysis of binary arithmetic and logic, quaternary does not enjoy the same status.

By analogy with bit, a quaternary digit is sometimes called a crumb.

Occurrence in human languages

Many or all of the Chumashan languages
Chumashan languages
Chumashan is a family of languages that were spoken on the southern California coast by Native American Chumash people.From the Coastal plains and valleys of San Luis Obispo to Malibu), neighboring inland and Transverse Ranges valleys and canyons east to bordering the San Joaquin Valley; and on...

 originally used a base 4 counting system, in which the names for numbers were structured according to multiples of 4 and 16 (not 10). There is a surviving list of Ventureño language number words up to 32 written down by a Spanish priest ca. 1819.

The Kharosthi numerals has a partial base 4 counting system from 1 to 10.

Hilbert curves

Quaternary numbers are used in the representation of 2D Hilbert curve
Hilbert curve
A Hilbert curve is a continuous fractal space-filling curve first described by the German mathematician David Hilbert in 1891, as a variant of the space-filling curves discovered by Giuseppe Peano in 1890....

s. Here a real number between 0 and 1 is converted into the quaternary system. Every single digit now indicates in which of the respective 4 sub-quadrants the number will be projected.

Genetics

Parallels can be drawn between quaternary numerals and the way genetic code
Genetic code
The genetic code is the set of rules by which information encoded in genetic material is translated into proteins by living cells....

 is represented by DNA
DNA
Deoxyribonucleic acid is a nucleic acid that contains the genetic instructions used in the development and functioning of all known living organisms . The DNA segments that carry this genetic information are called genes, but other DNA sequences have structural purposes, or are involved in...

. The four DNA nucleotide
Nucleotide
Nucleotides are molecules that, when joined together, make up the structural units of RNA and DNA. In addition, nucleotides participate in cellular signaling , and are incorporated into important cofactors of enzymatic reactions...

s in alphabetical order, abbreviated A
Adenine
Adenine is a nucleobase with a variety of roles in biochemistry including cellular respiration, in the form of both the energy-rich adenosine triphosphate and the cofactors nicotinamide adenine dinucleotide and flavin adenine dinucleotide , and protein synthesis, as a chemical component of DNA...

, C
Cytosine
Cytosine is one of the four main bases found in DNA and RNA, along with adenine, guanine, and thymine . It is a pyrimidine derivative, with a heterocyclic aromatic ring and two substituents attached . The nucleoside of cytosine is cytidine...

, G
Guanine
Guanine is one of the four main nucleobases found in the nucleic acids DNA and RNA, the others being adenine, cytosine, and thymine . In DNA, guanine is paired with cytosine. With the formula C5H5N5O, guanine is a derivative of purine, consisting of a fused pyrimidine-imidazole ring system with...

 and T
Thymine
Thymine is one of the four nucleobases in the nucleic acid of DNA that are represented by the letters G–C–A–T. The others are adenine, guanine, and cytosine. Thymine is also known as 5-methyluracil, a pyrimidine nucleobase. As the name suggests, thymine may be derived by methylation of uracil at...

, can be taken to represent the quaternary digits in numerical order
Collation
Collation is the assembly of written information into a standard order. One common type of collation is called alphabetization, though collation is not limited to ordering letters of the alphabet...

 0, 1, 2, and 3. With this encoding, the complementary digit pairs 0↔3, and 1↔2 (binary 00↔11 and 01↔10) match the complementation of the base pair
Base pair
In molecular biology and genetics, the linking between two nitrogenous bases on opposite complementary DNA or certain types of RNA strands that are connected via hydrogen bonds is called a base pair...

s: A↔T and C↔G and can be stored as data in DNA sequence.

For example, the nucleotide sequence GATTACA can be represented by the quaternary number 2033010 (= decimal 9156).

Data transmission

Quaternary line code
Line code
In telecommunication, a line code is a code chosen for use within a communications system for baseband transmission purposes...

s have been used for transmission, from the invention of the telegraph to the 2B1Q
2B1Q
Two-binary, one-quaternary is a physical layer encoding used for Integrated Services Digital Network Basic Rate Interface implementations...

 code used in modern ISDN circuits.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK