![]() |
|
|
| |
|
||||
In mathematics, hexadecimal or simply hex is a numeral system with a radix or base of 16 usually written using the symbols 0–9 and A–F or a–f. For example, the decimal numeral 79 whose binary representation is 01001111 can be written as 4F in hexadecimal (4 = 0100, F = 1111). It is a useful system in computers because there is an easy mapping from four bits to a single hex digit. A byte can be represented as two consecutive hexadecimal digits. However, this mixed representation (arabic digits up to nine and for zero, other symbols for the six other hexadecimal digits) is ambiguous and needs prefix, suffix or subscripts to be clear.
Representing hexadecimal
There are many ways to denote hexadecimal numerals:
There is no single agreed-upon standard, so all the above conventions are in use, sometimes even in the same paper. However, as they are quite unambiguous, little difficulty arises from this. The most commonly used (or encountered) notations are the ones with a prefix "0x" or a subscript-base 16, for hex numbers. For example, both 0x2BAD and 2BAD16 represent the decimal number 11181 (or 1118110). The word "hexadecimal" is strange in that hexa is derived from the Greek έξι (hexi) for "six" and decimal is derived from the Latin for "ten". An older term was the pure Latin "sexidecimal", but that was changed because some people thought it too risqué, and it also had an alternative meaning of "base 60". However, the word "sexagesimal" (base-60) retains the prefix. A common use of hexadecimal numerals is found in HTML and CSS. They use hexadecimal notation to specify colors on web pages; there is just the # symbol, not a separate symbol for "hexadecimal". Twenty-four-bit color is represented in the format #RRGGBB, where RR specifies the value of the Red component of the color, GG the Green component and BB the Blue component. For example, a shade of red that is 238,9,63 in decimal is coded as #EE093F. See Web colors. In URLs, special characters can be coded hexadecimally, with a percent sign used to introduce each byte; e.g., http://en.wikipedia.org/wiki/Main%20Page The canonical written form of numeric IPv6 addresses represents each group of 16 bits as a separate hexadecimal number, to ease reading and transcription of the 128-bit addresses. FractionsAs with other numeral systems, the hexadecimal system can be used in forming fractions, although recurring decimals are common:
See also
External links
Calculator
da:Hexadecimale talsystem de:Hexadezimalsystem eo:Deksesuma fr:Système hexadécimal ko:16진수 it:Sistema numerico esadecimale he:בסיס הקסדצימלי nl:Hexadecimaal ja:十六進記数法 no:Sekstentallsystemet pl:Szesnastkowy system liczbowy ru:Шестнадцатеричная система счисления fi:Heksadesimaalijärjestelmä sl:Å estnajstiÅ¡ki_Å¡tevilski_sistem zh-cn:十六进制
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
Copyright 2008 WordIQ.com - Privacy Policy
::
Terms of Use
:: Contact Us
:: About Us This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Hexadecimal". |