Caret notation is a notation for unprintable
control characters in
ASCII encoding. The notation consists of a
caret (^) 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 character with a value of 4 is represented as
^D because D is the 4th letter in the alphabet. The
NUL character with a value of 0 is represented as
^@ (
@ is the ASCII character before A). The
DEL character with the value 127 is usually represented as
^?, because the ASCII '?' is before '@' and the value -1 (encoded in 8-bit
two's complement) is the same as 127 if masked to 7 bits. An alternative formulation of the translation is that the printed character is found by inverting the 7th bit of the ASCII code.