Jump to content

Radix: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
get consensus on talk page
 
(44 intermediate revisions by 29 users not shown)
Line 1: Line 1:
{{short description|Number of unique digits in a positional numeral system}}
{{Short description|Number of digits of a numeral system}}
{{other uses}}
{{other uses}}
{{Numeral systems|expand=Place-value notation|expand2=By radix/base}}
{{Table Numeral Systems}}


In a [[positional numeral system]], the '''radix''' or '''base''' is the number of unique [[numerical digit|digits]], including the digit zero, used to represent numbers. For example, for the decimal/denary system (the most common system in use today) the radix (base number) is ten, because it uses the ten digits from 0 through 9.
In a [[positional numeral system]], the '''radix''' ({{plural form}}:{{nbs}}'''radices''') or '''base''' is the number of unique [[numerical digit|digits]], including the digit zero, used to represent numbers. For example, for the [[decimal|decimal system]] (the most common system in use today) the radix is ten, because it uses the ten digits from 0 through 9.


In any standard positional numeral system, a number is conventionally written as {{nowrap|(''x'')<sub>''y''</sub>}} with ''x'' as the [[String (computer science)|string]] of digits and ''y'' as its base, although for base ten the subscript is usually assumed (and omitted, together with the pair of [[parentheses]]), as it is the most common way to express [[value (mathematics)|value]]. For example, <span class="nowrap">(100)<sub>10</sub> is equivalent to 100</span> (the decimal system is implied in the latter) and represents the number one hundred, while (100)<sub>2</sub> (in the [[binary system (numeral)|binary system]] with base 2) represents the number four.<ref name="morris_mano_p13_14"/>
In any standard positional numeral system, a number is conventionally written as {{nowrap|(''x'')<sub>''y''</sub>}} with ''x'' as the [[String (computer science)|string]] of digits and ''y'' as its base, although for base ten the subscript is usually assumed (and omitted, together with the pair of [[parentheses]]), as it is the most common way to express [[value (mathematics)|value]]. For example, <span class="nowrap">(100)<sub>10</sub> is equivalent to 100</span> (the decimal system is implied in the latter) and represents the number one hundred, while (100)<sub>2</sub> (in the [[binary system (numeral)|binary system]] with base 2) represents the number four.<ref name="morris_mano_p13_14"/>
Line 11: Line 11:


== In numeral systems ==
== In numeral systems ==
In the system with radix 13, for example, a string of digits such as 398 denotes the (decimal) number {{nowrap|3 × 13<sup>2</sup> + 9 × 13<sup>1</sup> + 8 × 13<sup>0</sup>}} = 632.
Generally, in a system with radix ''b'' ({{nowrap|''b'' > 1}}), a string of digits {{nowrap|''d''<sub>1</sub> ... ''d<sub>n</sub>''}} denotes the number {{nowrap|''d''<sub>1</sub>''b''<sup>''n''−1</sup> + ''d''<sub>2</sub>''b''<sup>''n''−2</sup> + + ''d<sub>n</sub>b''<sup>0</sup>}}, where {{nowrap|0 ≤ ''d<sub>i</sub>'' < ''b''}}.<ref name="morris_mano_p13_14">

More generally, in a system with radix ''b'' ({{nowrap|''b'' > 1}}), a string of digits {{nowrap|''d''<sub>1</sub> … ''d<sub>n</sub>''}} denotes the number {{nowrap|''d''<sub>1</sub>''b''<sup>''n''−1</sup> + ''d''<sub>2</sub>''b''<sup>''n''−2</sup> + … + ''d<sub>n</sub>b''<sup>0</sup>}}, where {{nowrap|0 ≤ ''d<sub>i</sub>'' < ''b''}}.<ref name="morris_mano_p13_14">
{{cite book
{{cite book
| first1=M. Morris | last1=Mano
| first1=M. Morris | last1=Mano
Line 23: Line 21:
| isbn=978-1-292-02468-4
| isbn=978-1-292-02468-4
| pages=13–14 | edition=4th
| pages=13–14 | edition=4th
}}</ref> In contrast to decimal, or radix 10, which has a ones' place, tens' place, hundreds' place, and so on, radix ''b'' would have a ones' place, then a ''b''<sup>1</sup>s' place, a ''b''<sup>2</sup>s' place, etc.<ref>{{Cite web|url=https://experimonkey.com/articles/?aid=binary-how-do-computers-talk|title=Binary: How Do Computers Talk? {{!}} Experimonkey|website=experimonkey.com|access-date=2018-12-02 }}{{Dead link|date=February 2020}}</ref>
}}</ref> In contrast to decimal, or radix 10, which has a ones' place, tens' place, hundreds' place, and so on, radix ''b'' would have a ones' place, then a ''b''<sup>1</sup>s' place, a ''b''<sup>2</sup>s' place, etc.<ref>{{Cite web|url=https://experimonkey.com/facts/computer-science/binary|title=Binary|website=experimonkey.com|access-date=2023-05-14}}</ref>

For example, if ''b'' = 12, a string of digits such as 59A (where the letter "A" represents the value of ten) would represent the value {{nowrap|''5'' × ''12''<sup>''2''</sup> + ''9'' × ''12''<sup>''1''</sup> + ''10'' × ''12''<sup>''0''</sup>}} = 838 in base 10.


Commonly used numeral systems include:
Commonly used numeral systems include:
Line 33: Line 33:
| 2
| 2
| [[Binary numeral system]]
| [[Binary numeral system]]
| Used internally by nearly all [[computer]]s, is [[base 2]]. The two digits are "0" and "1", expressed from switches displaying OFF and ON, respectively. Used in most electric [[counter (digital)|counter]]s.
| Used internally by nearly all [[computer]]s. The two digits are "0" and "1", expressed from switches displaying OFF and ON, respectively. Used in most electric [[counter (digital)|counter]]s.
|-
|-
| 8
| 8
Line 41: Line 41:
| 10
| 10
| [[Decimal|Decimal system]]
| [[Decimal|Decimal system]]
| Used by humans in the vast majority of cultures. Its ten digits are "0"–"9". Used in most [[mechanical counter]]s.
| Used by humans in the wide majority of cultures. Its ten digits are "0"–"9". Used in most [[mechanical counter]]s.
|-
|-
| 12
| 12
Line 53: Line 53:
| 20
| 20
| [[Vigesimal|Vigesimal system]]
| [[Vigesimal|Vigesimal system]]
| Traditional numeral system in several cultures, still used by some for counting. Historically also known as the ''score system'' in English, now most famous in the phrase "four score and seven years ago" in the [[Gettysburg Address]].
| Traditional numeral system in several cultures, still used by some for counting. Historically also known as the ''[[score (number)|score]] system'' in English, now most famous in the phrase "four score and seven years ago" in the [[Gettysburg Address]].
|-
|36
|[[Base36]]
|'''Base36''' is a [[binary-to-text encoding]] scheme that represents [[binary data]] in an [[ASCII]] string format by translating it into a [[radix]]-36 representation. The choice of 36 is convenient in that the digits can be represented using the [[Arabic numerals]] 0–9 and the [[Latin alphabet|Latin letters]] A–Z (the [[ISO basic Latin alphabet]]). Each base36 digit needs less than 6 bits of information to be represented.
|-
|-
| 60
| 60
| [[Sexagesimal|Sexagesimal system]]
| [[Sexagesimal|Sexagesimal system]]
| Originated in ancient [[Sumer]] and passed to the [[Babylonia]]ns.<ref>
| Originally used in modified form in ancient [[Sumer]] and passed to the [[Babylonia]]ns.<ref>
{{cite book
{{cite book
| last1=Bertman | first1=Stephen
| last1=Bertman | first1=Stephen
Line 70: Line 74:
|}
|}


{{for|a larger list|list of numeral systems}}
{{for|a larger list|List of numeral systems}}


The octal and hexadecimal systems are often used in computing because of their ease as shorthand for binary. Every hexadecimal digit corresponds to a sequence of four binary digits, since sixteen is the fourth power of two; for example, hexadecimal 78<sub>16</sub> is binary {{gaps|111|1000}}<sub>2</sub>. Similarly, every octal digit corresponds to a unique sequence of three binary digits, since eight is the cube of two.
The octal and hexadecimal systems are often used in computing because of their ease as shorthand for binary. Every hexadecimal digit corresponds to a sequence of four binary digits, since sixteen is the fourth power of two; for example, hexadecimal 78<sub>16</sub> is binary {{gaps|111|1000}}<sub>2</sub>. Similarly, every octal digit corresponds to a unique sequence of three binary digits, since eight is the cube of two.
Line 108: Line 112:
*[[Radix sort]]
*[[Radix sort]]
*[[Non-standard positional numeral systems]]
*[[Non-standard positional numeral systems]]
*[[List of numeral systems]]


== Notes ==
== Notes ==
Line 117: Line 122:
==External links==
==External links==
{{wiktionary|radix}}
{{wiktionary|radix}}
*[https://baseconvert.com Base Convert, a floating-point base calculator]
*[http://mathworld.wolfram.com/Base.html MathWorld entry on base]
*[http://mathworld.wolfram.com/Base.html MathWorld entry on base]



Latest revision as of 10:27, 2 November 2024

In a positional numeral system, the radix (pl.: radices) or base is the number of unique digits, including the digit zero, used to represent numbers. For example, for the decimal system (the most common system in use today) the radix is ten, because it uses the ten digits from 0 through 9.

In any standard positional numeral system, a number is conventionally written as (x)y with x as the string of digits and y as its base, although for base ten the subscript is usually assumed (and omitted, together with the pair of parentheses), as it is the most common way to express value. For example, (100)10 is equivalent to 100 (the decimal system is implied in the latter) and represents the number one hundred, while (100)2 (in the binary system with base 2) represents the number four.[1]

Etymology

[edit]

Radix is a Latin word for "root". Root can be considered a synonym for base, in the arithmetical sense.

In numeral systems

[edit]

Generally, in a system with radix b (b > 1), a string of digits d1 ... dn denotes the number d1bn−1 + d2bn−2 + … + dnb0, where 0 ≤ di < b.[1] In contrast to decimal, or radix 10, which has a ones' place, tens' place, hundreds' place, and so on, radix b would have a ones' place, then a b1s' place, a b2s' place, etc.[2]

For example, if b = 12, a string of digits such as 59A (where the letter "A" represents the value of ten) would represent the value 5 × 122 + 9 × 121 + 10 × 120 = 838 in base 10.

Commonly used numeral systems include:

Base/radix Name Description
2 Binary numeral system Used internally by nearly all computers. The two digits are "0" and "1", expressed from switches displaying OFF and ON, respectively. Used in most electric counters.
8 Octal system Used occasionally in computing. The eight digits are "0"–"7" and represent 3 bits (23).
10 Decimal system Used by humans in the wide majority of cultures. Its ten digits are "0"–"9". Used in most mechanical counters.
12 Duodecimal (dozenal) system Sometimes advocated due to divisibility by 2, 3, 4, and 6. It was traditionally used as part of quantities expressed in dozens and grosses.
16 Hexadecimal system Often used in computing as a more compact representation of binary (1 hex digit per 4 bits). The sixteen digits are "0"–"9" followed by "A"–"F" or "a"–"f".
20 Vigesimal system Traditional numeral system in several cultures, still used by some for counting. Historically also known as the score system in English, now most famous in the phrase "four score and seven years ago" in the Gettysburg Address.
36 Base36 Base36 is a binary-to-text encoding scheme that represents binary data in an ASCII string format by translating it into a radix-36 representation. The choice of 36 is convenient in that the digits can be represented using the Arabic numerals 0–9 and the Latin letters A–Z (the ISO basic Latin alphabet). Each base36 digit needs less than 6 bits of information to be represented.
60 Sexagesimal system Originally used in modified form in ancient Sumer and passed to the Babylonians.[3] Used today as the basis of modern circular coordinate system (degrees, minutes, and seconds) and time measuring (minutes, and seconds) by analogy to the rotation of the Earth.

The octal and hexadecimal systems are often used in computing because of their ease as shorthand for binary. Every hexadecimal digit corresponds to a sequence of four binary digits, since sixteen is the fourth power of two; for example, hexadecimal 7816 is binary 11110002. Similarly, every octal digit corresponds to a unique sequence of three binary digits, since eight is the cube of two.

This representation is unique. Let b be a positive integer greater than 1. Then every positive integer a can be expressed uniquely in the form

where m is a nonnegative integer and the r's are integers such that

0 < rm < b and 0 ≤ ri < b for i = 0, 1, ... , m − 1.[4]

Radices are usually natural numbers. However, other positional systems are possible, for example, golden ratio base (whose radix is a non-integer algebraic number),[5] and negative base (whose radix is negative).[6] A negative base allows the representation of negative numbers without the use of a minus sign. For example, let b = −10. Then a string of digits such as 19 denotes the (decimal) number 1 × (−10)1 + 9 × (−10)0 = −1.

See also

[edit]

Notes

[edit]
  1. ^ a b Mano, M. Morris; Kime, Charles (2014). Logic and Computer Design Fundamentals (4th ed.). Harlow: Pearson. pp. 13–14. ISBN 978-1-292-02468-4.
  2. ^ "Binary". experimonkey.com. Retrieved 2023-05-14.
  3. ^ Bertman, Stephen (2005). Handbook to Life in Ancient Mesopotamia (Paperback ed.). Oxford [u.a.]: Oxford Univ. Press. p. 257. ISBN 978-019-518364-1.
  4. ^ McCoy (1968, p. 75)
  5. ^ Bergman, George (1957). "A Number System with an Irrational Base". Mathematics Magazine. 31 (2): 98–110. doi:10.2307/3029218. JSTOR 3029218.
  6. ^ William J. Gilbert (September 1979). "Negative Based Number Systems" (PDF). Mathematics Magazine. 52 (4): 240–244. doi:10.1080/0025570X.1979.11976792. Retrieved 7 February 2015.

References

[edit]
[edit]