Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Quaternary numeral system

From Wikipedia, the free encyclopedia
Base-4 numeral system

Part ofa series on
Numeral systems
List of numeral systems

Quaternary/kwəˈtɜːrnəri/ is anumeral system withfour as itsbase. It uses thedigits 0, 1, 2, and 3 to represent anyreal number. Conversion frombinary is straightforward.

Four is the largest number within thesubitizing range and one of two numbers that is both a square and ahighly composite number (the other being thirty-six), making quaternary a convenient choice for a base at this scale. Despite being twice as large, itsradix economy is equal to that of binary. However, it fares no better in the localization of prime numbers (the smallest better base being theprimorial base six,senary).

Quaternary shares with all fixed-radix 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 ofrational numbers andirrational numbers. Seedecimal andbinary for a discussion of these properties.

Relation to other positional number systems

[edit]
Numbers zero to sixty-four in standard quaternary (0 to 1000)
Decimal0123456789101112131415
Binary0110111001011101111,0001,0011,0101,0111,1001,1011,1101,111
Quaternary0123101112132021222330313233
Octal012345671011121314151617
Hexadecimal0123456789ABCDEF
Decimal16171819202122232425262728293031
Binary10,00010,00110,01010,01110,10010,10110,11010,11111,00011,00111,01011,01111,10011,10111,11011,111
Quaternary100101102103110111112113120121122123130131132133
Octal20212223242526273031323334353637
Hexadecimal101112131415161718191A1B1C1D1E1F
Decimal32333435363738394041424344454647
Binary100,000100,001100,010100,011100,100100,101100,110100,111101,000101,001101,010101,011101,100101,101101,110101,111
Quaternary200201202203210211212213220221222223230231232233
Octal40414243444546475051525354555657
Hexadecimal202122232425262728292A2B2C2D2E2F
Decimal48495051525354555657585960616263
Binary110,000110,001110,010110,011110,100110,101110,110110,111111,000111,001111,010111,011111,100111,101111,110111,111
Quaternary300301302303310311312313320321322323330331332333
Octal60616263646566677071727374757677
Hexadecimal303132333435363738393A3B3C3D3E3F
Decimal64
Binary1,000,000
Quaternary1,000
Octal100
Hexadecimal40

Relation to binary and hexadecimal

[edit]
addition table
+123
12310
231011
3101112

As with theoctal andhexadecimal numeral systems, quaternary has a special relation to thebinary numeral system. Eachradix four, eight, and sixteen is apower of two, so the conversion to and from binary is implemented by matching each digit with two, three, or four binary digits, orbits. For example, in quaternary,

2302104 = 10 11 00 10 01 002.

Since sixteen is a power of four, conversion between these bases can be implemented by matching each hexadecimal digit with two quaternary digits. In the above example,

23 02 104 = B2416
multiplication table
×123
1123
221012
331221

Although octal and hexadecimal are widely used incomputing andcomputer programming in the discussion and analysis of binary arithmetic and logic, quaternary does not enjoy the same status.

Although quaternary has limited practical use, it can be helpful if it is ever necessary to perform hexadecimal arithmetic without a calculator. Each hexadecimal digit can be turned into a pair of quaternary digits. Then, arithmetic can be performed relatively easily before converting the end result back to hexadecimal. Quaternary is convenient for this purpose, since numbers have only half the digit length compared to binary, while still having very simple multiplication and addition tables with only three unique non-trivial elements.

By analogy withbyte andnybble, a quaternary digit is sometimes called acrumb.

Fractions

[edit]

Due to having only factors of two, many quaternary fractions have repeating digits, although these tend to be fairly simple:

Decimal base
Prime factors of the base:2,5
Prime factors of one below the base:3
Prime factors of one above the base:11
Other prime factors:7 13 17 19 23 29 31
Quaternary base
Prime factors of the base:2
Prime factors of one below the base:3
Prime factors of one above the base:5 (=114)
Other prime factors:13 23 31 101 103 113 131 133
FractionPrime factors of
the denominator
Positional
representation
Positional
representation
Prime factors of
the denominator
Fraction
1/220.50.221/2
1/330.3333... =0.30.1111... =0.131/3
1/420.250.121/10
1/550.20.03111/11
1/62,30.160.022,31/12
1/770.1428570.021131/13
1/820.1250.0221/20
1/930.10.01331/21
1/102,50.10.0122,111/22
1/11110.090.01131231/23
1/122,30.0830.012,31/30
1/13130.0769230.010323311/31
1/142,70.07142850.01022,131/32
1/153,50.060.013,111/33
1/1620.06250.0121/100
1/17170.05882352941176470.00331011/101
1/182,30.050.00322,31/102
1/19190.0526315789473684210.0031132111031/103
1/202,50.050.0032,111/110
1/213,70.0476190.0033,131/111
1/222,110.0450.0023222,231/112
1/23230.04347826086956521739130.002302011211131/113
1/242,30.04160.0022,31/120
1/2550.040.0022033113111/121
1/262,130.03846150.00213122,311/122
1/2730.0370.00211323131/123
1/282,70.035714280.00212,131/130
1/29290.03448275862068965517241379310.002031033130231311/131
1/302,3,50.030.0022,3,111/132
1/31310.0322580645161290.002011331/133
1/3220.031250.00221/200
1/333,110.030.001333,231/201
1/342,170.029411764705882350.001322,1011/202
1/355,70.02857140.00131111,131/203
1/362,30.0270.00132,31/210

Occurrence in human languages

[edit]
See also:Quaternary counting system

Many or all of theChumashan languages (spoken by the Native AmericanChumash peoples) originally used a quaternary numeral system, in which the names for numbers were structured according to multiples of four and sixteen, instead of ten. There is a surviving list ofVentureño language number words up to thirty-two written down by a Spanish priest ca. 1819.[1]

TheKharosthi numerals (from the languages of the tribes of Pakistan and Afghanistan) have a partial quaternary numeral system from one to ten.

Hilbert curves

[edit]

Quaternary numbers are used in the representation of 2DHilbert curves. Here, a real number between 0 and 1 is converted into the quaternary system. Every single digit now indicates in which of the respective four sub-quadrants the number will be projected.

Genetics

[edit]
Main article:Bioinformatics

Parallels can be drawn between quaternary numerals and the waygenetic code is represented byDNA. The four DNAnucleotides inalphabetical order, abbreviatedA,C,G, andT, can be taken to represent the quaternary digits innumerical order 0, 1, 2, and 3. With this encoding, thecomplementary digit pairs 0↔3, and 1↔2 (binary 00↔11 and 01↔10) match the complementation of thebase pairs: A↔T and C↔G and can be stored as data in DNA sequence.[2] For example, the nucleotide sequence GATTACA can be represented by the quaternary number 2033010 (=decimal 9156 orbinary 10 00 11 11 00 01 00). Thehuman genome is 3.2 billion base pairs in length.[3]

Data transmission

[edit]

Quaternaryline codes have been used for transmission, from theinvention of the telegraph to the2B1Q code used in modernISDN circuits.

The GDDR6X standard, developed byNvidia andMicron, uses quaternary bits to transmit data.[4]

Computing

[edit]

Some computers have usedquaternary floating point arithmetic including theIllinois ILLIAC II (1962)[5] and the Digital Field System DFS IV and DFS V high-resolution site survey systems.[6]

See also

[edit]

References

[edit]
  1. ^Beeler, Madison S. (1986). "Chumashan Numerals". In Closs, Michael P. (ed.).Native American Mathematics. University of Texas Press.ISBN 0-292-75531-7.
  2. ^"Bacterial based storage and encryption device"(PDF).iGEM 2010.The Chinese University of Hong Kong. 2010. Archived fromthe original(PDF) on 14 December 2010. Retrieved27 November 2010.
  3. ^Chial, Heidi (2008)."DNA Sequencing Technologies Key to the Human Genome Project".Nature Education.1 (1): 219.
  4. ^"NVIDIA GeForce RTX 30 Series GPUs Powered by Ampere Architecture".
  5. ^Beebe, Nelson H. F. (22 August 2017). "Chapter H. Historical floating-point architectures".The Mathematical-Function Computation Handbook - Programming Using the MathCW Portable Software Library (1 ed.). Salt Lake City, UT, USA:Springer International Publishing AG. p. 948.doi:10.1007/978-3-319-64110-2.ISBN 978-3-319-64109-6.LCCN 2017947446.S2CID 30244721.
  6. ^Parkinson, Roger (7 December 2000)."Chapter 2 - High resolution digital site survey systems - Chapter 2.1 - Digital field recording systems".High Resolution Site Surveys (1 ed.).CRC Press. p. 24.ISBN 978-0-20318604-6. Retrieved18 August 2019.[...] Systems such as the [Digital Field System] DFS IV and DFS V were quaternary floating-point systems and used gain steps of 12 dB. [...] (256 pages)

External links

[edit]
Wikimedia Commons has media related toQuaternary numeral system.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Quaternary_numeral_system&oldid=1297261921"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp