Caret notation
Encyclopedia
Caret notation is a notation for unprintable control character
Control character
In computing and telecommunication, a control character or non-printing character is a code point in a character set, that does not in itself represent a written symbol.It is in-band signaling in the context of character encoding....

s in ASCII encoding
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

. The notation consists of a caret
Caret
Caret usually refers to the spacing symbol ^ in ASCII and other character sets. In Unicode, however, the corresponding character is , whereas the Unicode character named caret is actually a similar but lowered symbol: ....

 (^) followed by a capital letter; this digraph stands for the ASCII code that has the numerical value equivalent to the letter's numerical value. For example the EOT
End-of-transmission character
In telecommunication, an end-of-transmission character is a transmission control character. Its intended use is to indicate the conclusion of a transmission that may have included one or more texts and any associated message headings....

 character with a value of 4 is represented as ^D because D is the 4th letter in the alphabet. The NUL
Null character
The null character , abbreviated NUL, is a control character with the value zero.It is present in many character sets, including ISO/IEC 646 , the C0 control code, the Universal Character Set , and EBCDIC...

 character with a value of 0 is represented as ^@ (@
At sign
The at sign , also called the ampersat, apetail, arroba, atmark, at symbol, commercial at or monkey tail, is formally an abbreviation of the accounting and commercial invoice term "at the rate of"...

 is the ASCII character before A). The DEL
Delete character
In computing, a delete character is the last character in the ASCII repertoire, with the code 127. Not a graphic character, it denoted as ^? in caret notation and has a graphic representation in Unicode like all ASCII control characters, while its meaning is a bit unclear.There is no common...

 character with the value 127 is usually represented as ^?, because the ASCII '?' is before '@' and -1 is the same as 127 if masked to 7 bits.

For a complete list of caret notation, see C0 and C1 control codes
C0 and C1 control codes
Most character encodings, in addition to representing printable characters, may also represent additional information about the text, such as the position of a cursor, an instruction to start a new line, or a message that the text has been received...

.

Many computer systems allow you to enter a control character by holding down Ctrl
CTRL
CTRL may refer to several things:*Channel Tunnel Rail Link, a high-speed railway line opened in the 2000s in Britain*Control key, an input button present on most computer keyboards*Ctrl, an American comedy web series from NBC...

 and pressing the letter used in the caret notation. This is practical, because many control characters (e.g. EOT) cannot be entered directly from a keyboard. Although there are many ways to represent control characters, this correspondence between notation and typing makes the caret notation suitable for many applications.

Caret notation is used in many programs, particularly Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 terminal drivers and text file viewers such as more and less
Less (Unix)
less is a terminal pager program on Unix, Windows, and Unix-like systems used to view the contents of a text file one screen at a time. It is similar to more, but has the extended capability of allowing both forward and backward navigation through the file...

.

Alternate notations

Acorn
Acorn Computers
Acorn Computers Ltd. was a British computer company established in Cambridge, England, in 1978. The company produced a number of computers which were especially popular in the UK. These included the Acorn Electron, the BBC Micro, and the Acorn Archimedes...

 operating systems for the Atom
Acorn Atom
The Acorn Atom was a home computer made by Acorn Computers Ltd from 1980 to 1982 when it was replaced by the BBC Micro and later the Acorn Electron....

, BBC Micro
BBC Micro
The BBC Microcomputer System, or BBC Micro, was a series of microcomputers and associated peripherals designed and built by Acorn Computers for the BBC Computer Literacy Project, operated by the British Broadcasting Corporation...

, Archimedes
Acorn Archimedes
The Acorn Archimedes was Acorn Computers Ltd's first general purpose home computer to be based on their own ARM architecture.Using a RISC design with a 32-bit CPU, at its launch in June 1987, the Archimedes was stated as running at 4 MIPS, with a claim of 18 MIPS during tests.The name is commonly...

 and later RISC OS
RISC OS
RISC OS is a computer operating system originally developed by Acorn Computers Ltd in Cambridge, England for their range of desktop computers, based on their own ARM architecture. First released in 1987, under the name Arthur, the subsequent iteration was renamed as in 1988...

 machines use the vertical bar character | in place of the caret. e.g. |M is the carriage return
Carriage return
Carriage return, often shortened to return, refers to a control character or mechanism used to start a new line of text.Originally, the term "carriage return" referred to a mechanism or lever on a typewriter...

 character, ASCII
ASCII
The American Standard Code for Information Interchange is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text...

13. || is the vertical bar character code 124, |? is character 127 as above and |! adds 128 to the code of the following character, so |!|? is character code 128+127 = 255.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK