Code: Difference between revisions
Jump to navigation
Jump to search
| [unchecked revision] | [unchecked revision] |
imported>Stevebroshar →Character encodings: Get to the point |
imported>Fgnievinski |
||
| Line 5: | Line 5: | ||
{{Redirect|Encoding}} | {{Redirect|Encoding}} | ||
}} | }} | ||
{{technical reasons|prefix=y|Code#|the | {{technical reasons|prefix=y|Code#|the musical recordings|Code 01 Bad Girl{{!}}Code#01|and|Code 02 Pretty Pretty{{!}}Code#02}} | ||
{{More citations needed|date=March 2010}} | {{More citations needed|date=March 2010}} | ||
In [[communication]]s and [[Data processing|information processing]], '''code''' is a system of rules to convert [[information]]—such as a [[letter (alphabet)|letter]], [[word]], sound, image, or [[gesture]]—into another form, sometimes [[data compression|shortened]] or [[secrecy|secret]], for communication through a [[communication channel]] or storage in a [[storage medium]]. An early example is an invention of [[language]], which enabled a person, through [[speech]], to communicate what they thought, saw, heard, or felt to others. But speech limits the range of communication to the distance a voice can carry and limits the audience to those present when the speech is uttered. The invention of [[writing]], which converted spoken language into [[visual system|visual]] [[symbol]]s, extended the range of communication across space and [[time]]. | In [[communication]]s and [[Data processing|information processing]], '''code''' is a system of rules to convert [[information]]—such as a [[letter (alphabet)|letter]], [[word]], sound, image, or [[gesture]]—into another form, sometimes [[data compression|shortened]] or [[secrecy|secret]], for communication through a [[communication channel]] or storage in a [[storage medium]]. An early example is an invention of [[language]], which enabled a person, through [[speech]], to communicate what they thought, saw, heard, or felt to others. But speech limits the range of communication to the distance a voice can carry and limits the audience to those present when the speech is uttered. The invention of [[writing]], which converted spoken language into [[visual system|visual]] [[symbol]]s, extended the range of communication across space and [[time]]. | ||
| Line 46: | Line 47: | ||
=== Character encoding === | === Character encoding === | ||
{{Main|Character encoding}} | {{Main|Character encoding}} | ||
A character encoding describes how [[character]]-based data (text) is encoded. Antiquated encoding systems used a fixed number of [[bit]]s, ranging from 4 to 7, but modern systems use one or more 8-[[bit]] [[byte]]s for each character. [[ASCII]], the dominate system for decades, uses one byte for each character, and therefore, can encode up to 256 different characters. To support [[natural language]]s with more characters, other systems were invented that use [[Wide character|more than one byte]] or a [[Variable-width encoding|variable number of bytes]] for each character. A [[writing system]] with a large character set such as [[CJK characters|Chinese, Japanese and Korean]] can be represented with a multibyte encoding. Early multibyte encodings were fixed-length, meaning that each character is represented by the same number of bytes | A character encoding describes how [[Character (computing)|character]]-based data (text) is encoded. Antiquated encoding systems used a fixed number of [[bit]]s, ranging from 4 to 7, but modern systems use one or more 8-[[bit]] [[byte]]s for each character. [[ASCII]], the dominate system for decades, uses one byte for each character, and therefore, can encode up to 256 different characters. To support [[natural language]]s with more characters, other systems were invented that use [[Wide character|more than one byte]] or a [[Variable-width encoding|variable number of bytes]] for each character. A [[writing system]] with a large character set such as [[CJK characters|Chinese, Japanese and Korean]] can be represented with a multibyte encoding. Early multibyte encodings were fixed-length, meaning that each character is represented by the same number of bytes, making them suitable for decoding via a [[lookup table]]. On the other hand, a variable-width encoding is more complex to decode since it cannot be decoded via a single lookup table and must be processed sequentially, but it supports a more efficient representation of a large character set by using a smaller representation for more commonly used characters. Today, [[UTF-8]], an encoding of the [[Unicode]] character set, is the most common text encoding used on the [[Internet]]. | ||
=== Genetic code === | === Genetic code === | ||
| Line 75: | Line 76: | ||
== Other examples == | == Other examples == | ||
Other examples of encoding include: | Other examples of encoding include: | ||
*Encoding (in [[cognition]]) - a basic perceptual process of interpreting incoming stimuli; technically speaking, it is a complex, multi-stage process of converting relatively objective sensory input (e.g., light, sound) into a subjectively meaningful experience. | *Encoding (in [[cognition]]) - a basic perceptual process of interpreting incoming stimuli; technically speaking, it is a complex, multi-stage process of converting relatively objective sensory input (e.g., light, sound) into a subjectively meaningful experience.<ref>Secret Warfare: Battle of Codes and Ciphers-Bruce Norman (1973) ISBN 10: 0715362232</ref> | ||
*Text encoding uses a [[markup language]] to tag the structure and other features of a text to facilitate processing by computers. (See also [[Text Encoding Initiative]].) | *Text encoding uses a [[markup language]] to tag the structure and other features of a text to facilitate processing by computers. (See also [[Text Encoding Initiative]].) | ||
*[[Semantics encoding]] of formal language A informal language B is a method of representing all terms (e.g. programs or descriptions) of language A using language B. | *[[Semantics encoding]] of formal language A informal language B is a method of representing all terms (e.g. programs or descriptions) of language A using language B. | ||
| Line 90: | Line 91: | ||
* Word decoding, the use of [[phonics]] to decipher print patterns and translate them into the sounds of language | * Word decoding, the use of [[phonics]] to decipher print patterns and translate them into the sounds of language | ||
==Codes | == Codes in practical use == | ||
[[Acronym]]s and abbreviations can be considered codes, and in a sense, all [[language]]s and [[writing system]]s are codes for human thought. | |||
In everyday usage of the term, "code" refers to an element of a "code system". For example, the "[[postal code]] of my home" is a [[geocode]] that identifies a geographical entity in a local system (e.g. [[ZIP Code|ZIP Code system of U.S.]]). Typical codes are alphanumeric [[identifiers]]. | |||
[[Acronym]]s and abbreviations can be also considered "codes", and in a sense, all [[language]]s and [[writing system]]s are codes for human thought. | |||
[[International Air Transport Association airport code]]s are three-letter codes used to designate airports and used for [[bag tag]]s. [[Station code]]s are similarly used on railways but are usually national, so the same code can be used for different stations if they are in different countries. | [[International Air Transport Association airport code]]s are three-letter codes used to designate airports and used for [[bag tag]]s. [[Station code]]s are similarly used on railways but are usually national, so the same code can be used for different stations if they are in different countries. | ||