Misplaced Pages

Code: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 23:00, 17 December 2001 view sourceHagedis (talk | contribs)3 edits historical note on programming usage, ok not algorithm this time.← Previous edit Revision as of 15:43, 25 February 2002 view source Conversion script (talk | contribs)10 editsm Automated conversionNext edit →
Line 1: Line 1:
In ], a '''code''' is a rule for converting a piece of information (for example, In ], a '''code''' is a rule for converting a piece of information (for example,

a letter, word, or phrase) into another object or action, not necessarily of the same sort. a letter, word, or phrase) into another object or action, not necessarily of the same sort.

One reason for this is to enable communication in places where ordinary spoken or written language One reason for this is to enable communication in places where ordinary spoken or written language

is difficult or impossible. is difficult or impossible.

For example, ] converts patterns of dots and dashes typed on a telegraph key into For example, ] converts patterns of dots and dashes typed on a telegraph key into

letters of the alphabet, allowing text to be sent over telegraph wires, flashing lights, or other channels letters of the alphabet, allowing text to be sent over telegraph wires, flashing lights, or other channels

that cannot carry speech or written text directly. that cannot carry speech or written text directly.

Another example is the use of ], where the configuration of flags Another example is the use of ], where the configuration of flags

held by a signaller or the arms of a semaphore tower encodes the message. held by a signaller or the arms of a semaphore tower encodes the message.

Another person standing a great distance away can interpret the flags and reproduce the letters, Another person standing a great distance away can interpret the flags and reproduce the letters,

enabling the signaller to communicate with someone too far away to hear ordinary speech. enabling the signaller to communicate with someone too far away to hear ordinary speech.




Codes can be used for brevity. Codes can be used for brevity.

In the days when Morse code was widely used, elaborate commercial codes that encoded complete phrases In the days when Morse code was widely used, elaborate commercial codes that encoded complete phrases

into single words (five-letter groups) were developed, so that telegraphers became conversant with into single words (five-letter groups) were developed, so that telegraphers became conversant with

such "words" as BYOXO ("Are you trying to crawl out of it?"), LIOUY ("Why do you not answer my question?"), such "words" as BYOXO ("Are you trying to crawl out of it?"), LIOUY ("Why do you not answer my question?"),

and AYYLU ("Not clearly coded, repeat more clearly."). and AYYLU ("Not clearly coded, repeat more clearly.").

The purpose of these codes was to save on cable costs. The purpose of these codes was to save on cable costs.




Probably the most widely known communications code in use today is ]. Probably the most widely known communications code in use today is ].

It is employed by nearly all personal ]s, ]s, It is employed by nearly all personal ]s, ]s,

]s, and other communication equipment. ]s, and other communication equipment.

It represents 128 ]s with seven-bit binary numbers--that is, as a string of seven 1s and 0s. It represents 128 ]s with seven-bit binary numbers--that is, as a string of seven 1s and 0s.

In ASCII a lowercase "a" is always 1100001, an uppercase "A" always 1000001, and so on. In ASCII a lowercase "a" is always 1100001, an uppercase "A" always 1000001, and so on.

Extensions to ASCII have included 8-bit characters (for letters of European languages and such things Extensions to ASCII have included 8-bit characters (for letters of European languages and such things

as card suit symbols), and in fullest flowering have included glyphs from essentially all of the as card suit symbols), and in fullest flowering have included glyphs from essentially all of the

world's writing systems (see ]). world's writing systems (see ]).




Another use of codes is ], where a code or ] is used to disguise a message, Another use of codes is ], where a code or ] is used to disguise a message,

preventing those not in on the secret from understanding a transmission. preventing those not in on the secret from understanding a transmission.

One simple method is to use a "codebook" with a list of common phrases replaced by phrases with One simple method is to use a "codebook" with a list of common phrases replaced by phrases with

completely different meanings, so that people without the codebook who may intercept the message completely different meanings, so that people without the codebook who may intercept the message

hear a conversation that is entirely unrelated to the real intended message. hear a conversation that is entirely unrelated to the real intended message.




] and abbreviations can be considered codes, and in a sense all ] ] and abbreviations can be considered codes, and in a sense all ]

and writing systems are codes for human thought. and writing systems are codes for human thought.

Occasionally a code word achieves an independent existence (and meaning) while the original equivalent Occasionally a code word 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 code word. phrase is forgotten or at least no longer has the precise meaning attributed to the code word.

For example, the number "86" was once used as a code word in restaurants meaning "We're out of For example, the number "86" was once used as a code word in restaurants meaning "We're out of

the requested item". the requested item".

It is now commonly used to mean the removal or destruction of something. It is now commonly used to mean the removal or destruction of something.




---- ----




In ], the word '''code''' refers to instructions to a computer In ], the word '''code''' refers to instructions to a computer

in a ]. in a ].

In this usage, the noun "code" typically stands for ], In this usage, the noun "code" typically stands for ],

and the verb "to code" means to write source code, to program. This usage may have originated and the verb "to code" means to write source code, to program. This usage may have originated
when the first symbolic languages were developed and were punched onto cards as "codes".

when the first symbolic languages were developed and were punched onto cards as "codes". The sense of

code referring to the program itself is still sometimes encountered, e.g., "Fortran codes".




---- ----




A '''code''' is a also rule or a set of rules, such as code of honor, code of laws, or dress code. A '''code''' is a also rule or a set of rules, such as code of honor, code of laws, or dress code.




This word has acquired a large number of subtly and grossly incompatible meanings. This word has acquired a large number of subtly and grossly incompatible meanings.

Use with care. Use with care.


]


/Talk


Revision as of 15:43, 25 February 2002

In communication, a code is a rule for converting a piece of information (for example, a letter, word, or phrase) into another object or action, not necessarily of the same sort. One reason for this is to enable communication in places where ordinary spoken or written language is difficult or impossible. For example, Morse code converts patterns of dots and dashes typed on a telegraph key into letters of the alphabet, allowing text to be sent over telegraph wires, flashing lights, or other channels that cannot carry speech or written text directly. Another example is the use of semaphore flags, where the configuration of flags held by a signaller or the arms of a semaphore tower encodes the message. Another person standing a great distance away can interpret the flags and reproduce the letters, enabling the signaller to communicate with someone too far away to hear ordinary speech.

Codes can be used for brevity. In the days when Morse code was widely used, elaborate commercial codes that encoded complete phrases into single words (five-letter groups) were developed, so that telegraphers became conversant with such "words" as BYOXO ("Are you trying to crawl out of it?"), LIOUY ("Why do you not answer my question?"), and AYYLU ("Not clearly coded, repeat more clearly."). The purpose of these codes was to save on cable costs.

Probably the most widely known communications code in use today is ASCII. It is employed by nearly all personal computers, terminals, printers, and other communication equipment. It represents 128 characters with seven-bit binary numbers--that is, as a string of seven 1s and 0s. In ASCII a lowercase "a" is always 1100001, an uppercase "A" always 1000001, and so on. Extensions to ASCII have included 8-bit characters (for letters of European languages and such things as card suit symbols), and in fullest flowering have included glyphs from essentially all of the world's writing systems (see Unicode).

Another use of codes is cryptography, where a code or cipher is used to disguise a message, preventing those not in on the secret from understanding a transmission. One simple method is to use a "codebook" with a list of common phrases replaced by phrases with completely different meanings, so that people without the codebook who may intercept the message hear a conversation that is entirely unrelated to the real intended message.

Acronyms and abbreviations can be considered codes, and in a sense all languages and writing systems are codes for human thought. Occasionally a code word 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 code word. For example, the number "86" was once used as a code word in restaurants meaning "We're out of the requested item". It is now commonly used to mean the removal or destruction of something.


In computer programming, the word code refers to instructions to a computer in a programming language. In this usage, the noun "code" typically stands for source code, and the verb "to code" means to write source code, to program. This usage may have originated when the first symbolic languages were developed and were punched onto cards as "codes".


A code is a also rule or a set of rules, such as code of honor, code of laws, or dress code.

This word has acquired a large number of subtly and grossly incompatible meanings. Use with care.

/Talk