<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki1463/index.php?action=history&amp;feed=atom&amp;title=Code</id>
	<title>Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki1463/index.php?action=history&amp;feed=atom&amp;title=Code"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki1463/index.php?title=Code&amp;action=history"/>
	<updated>2026-12-01T08:44:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki1463/index.php?title=Code&amp;diff=3095&amp;oldid=prev</id>
		<title>imported&gt;Kvng: Undid revision 1373273862 by 组行号黄旭组行号黄旭 (talk) not closely related</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki1463/index.php?title=Code&amp;diff=3095&amp;oldid=prev"/>
		<updated>2026-09-13T15:18:00Z</updated>

		<summary type="html">&lt;p&gt;Undid revision &lt;a href=&quot;/wiki1463/index.php?title=Special:Diff/1373273862&quot; title=&quot;Special:Diff/1373273862&quot;&gt;1373273862&lt;/a&gt; by &lt;a href=&quot;/wiki1463/index.php?title=Special:Contributions/%E7%BB%84%E8%A1%8C%E5%8F%B7%E9%BB%84%E6%97%AD%E7%BB%84%E8%A1%8C%E5%8F%B7%E9%BB%84%E6%97%AD&quot; title=&quot;Special:Contributions/组行号黄旭组行号黄旭&quot;&gt;组行号黄旭组行号黄旭&lt;/a&gt; (&lt;a href=&quot;/wiki1463/index.php?title=User_talk:%E7%BB%84%E8%A1%8C%E5%8F%B7%E9%BB%84%E6%97%AD%E7%BB%84%E8%A1%8C%E5%8F%B7%E9%BB%84%E6%97%AD&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:组行号黄旭组行号黄旭 (page does not exist)&quot;&gt;talk&lt;/a&gt;) not closely related&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{pp-semi-indef|small=yes}}&lt;br /&gt;
{{short description|System of rules to convert information into another form or representation}}&lt;br /&gt;
{{hatgrp|&lt;br /&gt;
{{Other uses}}&lt;br /&gt;
{{Redirect|Encoding}}&lt;br /&gt;
}}&lt;br /&gt;
{{technical reasons|prefix=y|Code#|the musical recordings|Code 01 Bad Girl{{!}}Code#01|and|Code 02 Pretty Pretty{{!}}Code#02}}&lt;br /&gt;
{{More citations needed|date=March 2010}}&lt;br /&gt;
&lt;br /&gt;
In [[communication]]s and [[Data processing|information processing]], a &amp;#039;&amp;#039;&amp;#039;code&amp;#039;&amp;#039;&amp;#039; 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 [[secret]], for communication through a [[communication channel]] or storage in a [[storage medium]]. &lt;br /&gt;
&lt;br /&gt;
An early example of a code is [[language]], which enables a person, through [[speech]], to communicate what they think, see, hear, or feel 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]] [[symbol]]s, extended the range of communication across space and [[time]].&lt;br /&gt;
&lt;br /&gt;
The process of &amp;#039;&amp;#039;&amp;#039;encoding&amp;#039;&amp;#039;&amp;#039; converts information from a [[communication source|source]] into [[symbol]]s for communication or storage. &amp;#039;&amp;#039;&amp;#039;Decoding&amp;#039;&amp;#039;&amp;#039; is the reverse process, converting code symbols back into a form that the recipient understands.&lt;br /&gt;
&lt;br /&gt;
One role of coding is to enable communication in places where ordinary [[plain language]], spoken or written, is difficult or impossible. For example, [[semaphore]], where the configuration of [[Flag semaphore|flags]] held by a signaler or the arms of a [[semaphore tower]] encodes parts of the message, typically individual letters and numbers. Another person standing a great distance away can interpret the flags and reproduce the words sent.&lt;br /&gt;
&lt;br /&gt;
== Theory ==&lt;br /&gt;
{{main|Coding theory}}&lt;br /&gt;
In [[information theory]] and [[computer science]], a code is usually considered as an [[algorithm]] that uniquely represents [[symbols]] from some source [[alphabet (computer science)|alphabet]], by &amp;#039;&amp;#039;encoded&amp;#039;&amp;#039; strings, which may be in some other target alphabet. An extension of the code for representing sequences of symbols over the source alphabet is obtained by concatenating the encoded strings.&lt;br /&gt;
&lt;br /&gt;
Before giving a mathematically precise definition, this is a brief example. The mapping&lt;br /&gt;
:&amp;lt;math&amp;gt;C = \{\, a\mapsto 0, b\mapsto 01, c\mapsto 011\,\}&amp;lt;/math&amp;gt;&lt;br /&gt;
is a code, whose source alphabet is the set &amp;lt;math&amp;gt;\{a,b,c\}&amp;lt;/math&amp;gt; and whose target alphabet is the set &amp;lt;math&amp;gt;\{0,1\}&amp;lt;/math&amp;gt;. Using the extension of the code, the encoded string 0011001 can be grouped into [[wikt:codewords|codewords]] as 0 011 0 01, and these in turn can be decoded to the sequence of source symbols &amp;#039;&amp;#039;acab&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Using terms from [[formal language theory]], the precise mathematical definition of this concept is as follows: let S and T be two finite sets, called the source and target [[alphabet (computer science)|alphabets]], respectively. A &amp;#039;&amp;#039;&amp;#039;code&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;C:\, S \to T^*&amp;lt;/math&amp;gt; is a [[total function]] mapping each symbol from S to a [[sequence of symbols]] over T. The &amp;#039;&amp;#039;&amp;#039;extension&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;C&amp;#039;&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;, is a [[Homomorphism#Formal language theory|homomorphism]] of &amp;lt;math&amp;gt;S^*&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;T^*&amp;lt;/math&amp;gt;, which naturally maps each sequence of source symbols to a sequence of target symbols.&lt;br /&gt;
&lt;br /&gt;
=== Variable-length codes ===&lt;br /&gt;
{{main|Variable-length code}}&lt;br /&gt;
In this section, we consider codes that encode each source (clear text) character by a codeword from some dictionary, and [[concatenation]] of such codewords give us an encoded string. Variable-length codes are especially useful when clear text characters have different probabilities; see also [[entropy encoding]].&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;prefix code&amp;#039;&amp;#039; is a code with the &amp;quot;prefix property&amp;quot;: there is no valid codeword in the system that is a [[prefix (computer science)|prefix]] (start) of any other valid codeword in the set. [[Huffman coding]] is the most known algorithm for deriving prefix codes. Prefix codes are widely referred to as &amp;quot;Huffman codes&amp;quot; even when the code was not produced by a Huffman algorithm. Other examples of prefix codes are [[telephone country codes]], the country and publisher parts of [[ISBN]]s, and the Secondary Synchronization Codes used in the [[UMTS]] [[WCDMA]] 3G Wireless Standard.&lt;br /&gt;
&lt;br /&gt;
[[Kraft&amp;#039;s inequality]] characterizes the sets of codeword lengths that are possible in a prefix code. Virtually any uniquely decodable one-to-many code, not necessarily a prefix one, must satisfy Kraft&amp;#039;s inequality.&lt;br /&gt;
&lt;br /&gt;
=== Error-correcting codes ===&lt;br /&gt;
{{Main|Error detection and correction}}&lt;br /&gt;
{{See also|Block code}}&lt;br /&gt;
Codes may also be used to represent data in a way more resistant to errors in transmission or storage. This so-called [[Error detection and correction|error-correcting code]] works by including carefully crafted redundancy with the stored (or transmitted) data. Examples include [[Hamming code]]s, [[Reed–Solomon]], [[Reed–Muller code|Reed–Muller]], [[Walsh–Hadamard code|Walsh–Hadamard]], [[BCH code|Bose–Chaudhuri–Hochquenghem]], [[Turbo code|Turbo]], [[Binary Golay code|Golay]], [[Algebraic geometry code|algebraic geometry codes]], [[low-density parity-check code]]s, and [[space–time code]]s.&lt;br /&gt;
Error detecting codes can be optimised to detect &amp;#039;&amp;#039;burst errors&amp;#039;&amp;#039;, or &amp;#039;&amp;#039;random errors&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
=== Codes in communication used for brevity ===&lt;br /&gt;
{{Main|Brevity code}}&lt;br /&gt;
A cable code replaces words (e.g. &amp;#039;&amp;#039;ship&amp;#039;&amp;#039; or &amp;#039;&amp;#039;invoice&amp;#039;&amp;#039;) with shorter words, allowing the same information to be sent with fewer [[character (computing)|characters]], more quickly, and less expensively.&lt;br /&gt;
&lt;br /&gt;
Codes can be used for brevity. When [[telegraph]] messages were the state of the art in rapid long-distance communication, elaborate systems of [[commercial code (communications)|commercial codes]] that encoded complete phrases into single mouths (commonly five-minute groups) were developed, so that telegraphers became conversant with such {{em|words}} as &amp;#039;&amp;#039;BYOXO&amp;#039;&amp;#039; (&amp;quot;Are you trying to weasel out of our deal?&amp;quot;), &amp;#039;&amp;#039;LIOUY&amp;#039;&amp;#039; (&amp;quot;Why do you not answer my question?&amp;quot;), &amp;#039;&amp;#039;BMULD&amp;#039;&amp;#039; (&amp;quot;You&amp;#039;re a skunk!&amp;quot;), or &amp;#039;&amp;#039;AYYLU&amp;#039;&amp;#039; (&amp;quot;Not clearly coded, repeat more clearly.&amp;quot;). Codewords were chosen for various reasons: [[length]], [[pronounceability]], etc. Meanings were chosen to fit perceived needs: commercial negotiations, military terms for military codes, diplomatic terms for diplomatic codes, any and all of the preceding for espionage codes. Codebooks and codebook publishers proliferated, including one run as a front for the American [[Black Chamber]] run by [[Herbert Yardley]] between the First and Second World Wars. The purpose of most of these codes was to save on cable costs. The use of data coding for [[data compression]] predates the computer era; an early example is the telegraph [[Morse code]] where more-frequently used characters have shorter representations. Techniques such as [[Huffman coding]] are now used by computer-based [[algorithm]]s to compress large data files into a more compact form for storage or transmission.&lt;br /&gt;
&lt;br /&gt;
=== Character encoding ===&lt;br /&gt;
{{Main|Character encoding}}&lt;br /&gt;
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]].&lt;br /&gt;
&lt;br /&gt;
=== Genetic code ===&lt;br /&gt;
{{Main|Genetic code}}&lt;br /&gt;
[[Biological]] organisms contain genetic material that is used to control their function and development. This is [[DNA]], which contains units named [[gene]]s from which [[messenger RNA]] is derived. This in turn produces [[protein]]s through a [[genetic code]] in which a series of triplets ([[codon]]s) of four possible [[nucleotides]] can be translated into one of twenty possible [[amino acid]]s. A sequence of codons results in a corresponding sequence of amino acids that form a protein molecule; a type of codon called a [[stop codon]] signals the end of the sequence.&lt;br /&gt;
&lt;br /&gt;
=== Gödel code ===&lt;br /&gt;
In [[mathematics]], a [[Gödel code]] is the basis for the proof of [[Gödel]]&amp;#039;s [[incompleteness theorem]]. Here, the idea is to map [[mathematical notation]] to a [[natural number]] (using a [[Gödel numbering]]).&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
There are codes using colors, like [[traffic lights]], the [[Electronic color code|color code]] employed to mark the nominal value of the [[electrical resistor]]s or that of the trashcans devoted to specific types of garbage (paper, glass, organic, etc.).&lt;br /&gt;
&lt;br /&gt;
In [[marketing]], [[coupon]] codes can be used for a financial discount or rebate when purchasing a product from a (usual internet) retailer.&lt;br /&gt;
&lt;br /&gt;
In military environments, specific sounds with the [[cornet]] are used for different uses: to mark some moments of the day, to command the infantry on the battlefield, etc.&lt;br /&gt;
&lt;br /&gt;
Communication systems for sensory impairments, such as [[sign language]] for deaf people and [[braille]] for blind people, are based on movement or tactile codes.&lt;br /&gt;
&lt;br /&gt;
[[Sheet music|Musical scores]] are the most common way to encode [[music]].&lt;br /&gt;
&lt;br /&gt;
Specific games have their own code systems to record the matches, e.g. [[chess notation]].&lt;br /&gt;
&lt;br /&gt;
=== Cryptography ===&lt;br /&gt;
In the [[history of cryptography]], [[Code (cryptography)|codes]] were once common for ensuring the confidentiality of communications, although [[cipher]]s are now used instead.&lt;br /&gt;
&lt;br /&gt;
Secret codes intended to obscure the real messages, ranging from serious (mainly [[espionage]] in military, diplomacy, business, etc.) to trivial (romance, games) can be any kind of imaginative encoding: [[Language of flowers|flowers]], game cards, clothes, fans, hats, melodies, birds, etc., in which the sole requirement is the pre-agreement on the meaning by both the sender and the receiver.&lt;br /&gt;
&lt;br /&gt;
== Other examples ==&lt;br /&gt;
Other examples of encoding include:&lt;br /&gt;
*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.&amp;lt;ref&amp;gt;Secret Warfare: Battle of Codes and Ciphers-Bruce Norman (1973) {{ISBN|978-0-7153-6223-5}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
*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]].)&lt;br /&gt;
*[[Semantics encoding]] of formal language A in formal language B is a method of representing all terms (e.g. programs or descriptions) of language A using language B.&lt;br /&gt;
*[[Data compression]] transforms a signal into a code optimized for [[Transmission (telecommunications)|transmission]] or [[data storage device|storage]], generally done with a [[codec]].&lt;br /&gt;
*[[Neural encoding]] - the way in which information is represented in [[neuron]]s.&lt;br /&gt;
*[[Memory encoding]] - the process of converting sensations into memories.&lt;br /&gt;
*[[Television encoding]]: [[NTSC]], [[PAL]] and [[SECAM]]&lt;br /&gt;
&lt;br /&gt;
Other examples of decoding include:&lt;br /&gt;
* [[Parsing|Decoding (computer science)]]&lt;br /&gt;
* [[Decoding methods]], methods in communication theory for decoding codewords sent over a noisy channel&lt;br /&gt;
* [[Digital signal processing]], the study of signals in a digital representation and the processing methods of these signals&lt;br /&gt;
* [[Digital-to-analog converter]], the use of analog circuit for decoding operations&lt;br /&gt;
* Word decoding, the use of [[phonics]] to decipher print patterns and translate them into the sounds of language&lt;br /&gt;
&lt;br /&gt;
== Codes in practical use ==&lt;br /&gt;
&lt;br /&gt;
In everyday usage of the term, &amp;quot;code&amp;quot; refers to an element of a &amp;quot;code system&amp;quot;. For example, the &amp;quot;[[postal code]] of my home&amp;quot; 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]].&lt;br /&gt;
&lt;br /&gt;
[[Acronym]]s and abbreviations can be also considered &amp;quot;codes&amp;quot;, and in a sense, all [[language]]s and [[writing system]]s are codes for human thought.&lt;br /&gt;
&lt;br /&gt;
[[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.&lt;br /&gt;
&lt;br /&gt;
Occasionally, a codeword achieves an independent existence (and meaning) while the original equivalent phrase is forgotten or at least no longer has the precise meaning attributed to the codeword. For example, &amp;#039;30&amp;#039; was widely used in [[journalism]] to mean &amp;quot;end of story&amp;quot;, and has been used in [[-30-|other contexts]] to signify &amp;quot;the end&amp;quot;.&amp;lt;ref&amp;gt;Kogan, Hadass [http://www.ajr.org/Article.asp?id=4408 &amp;quot;So Why Not 29&amp;quot;] {{webarchive|url=https://web.archive.org/web/20101212101705/http://ajr.org/Article.asp?id=4408 |date=2010-12-12 }} American Journalism Review. Retrieved 2012-07-03.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |title = Western Union &amp;quot;92 Code&amp;quot; &amp;amp; Wood&amp;#039;s &amp;quot;Telegraphic Numerals&amp;quot;&lt;br /&gt;
 |publisher = Signal Corps Association&lt;br /&gt;
 |year = 1996&lt;br /&gt;
 |url = http://www.civilwarsignals.org/pages/tele/wurules1866/92code.html&lt;br /&gt;
 |access-date = 2012-07-03&lt;br /&gt;
 |url-status = live&lt;br /&gt;
 |archive-url = https://web.archive.org/web/20120509135118/http://www.civilwarsignals.org/pages/tele/wurules1866/92code.html&lt;br /&gt;
 |archive-date = 2012-05-09&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
{{Commons category|Codes}}&lt;br /&gt;
* [[ADDML]]&lt;br /&gt;
* [[Asemic writing]]&lt;br /&gt;
* [[Cipher]]&lt;br /&gt;
* [[Code (semiotics)]]&lt;br /&gt;
* [[Cultural code]]&lt;br /&gt;
* [[Equipment codes]]&lt;br /&gt;
* [[Quantum error correction]]&lt;br /&gt;
* [[Semiotics]]&lt;br /&gt;
* [[Universal language]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
* {{cite journal |last1=Chevance |first1=Fabienne |title=Case for the genetic code as a triplet of triplets |journal=Proceedings of the National Academy of Sciences of the United States of America |volume=114 |issue=18 |pages=4745–4750 |pmc=5422812 |year=2017 |pmid=28416671 |doi=10.1073/pnas.1614896114 |doi-access=free |bibcode=2017PNAS..114.4745C }}&lt;br /&gt;
&lt;br /&gt;
==Further reading==&lt;br /&gt;
* {{cite book |date=1963 |title=Codes and Abbreviations for the Use of the International Telecommunication Services |edition=2nd |location=Geneva, Switzerland |publisher=International Telecommunication Union |oclc=13677884}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Encodings| ]]&lt;br /&gt;
[[Category:Signal processing]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Kvng</name></author>
	</entry>
</feed>