Null sign

from Wikipedia, the free encyclopedia

The zero character is a control character in code position 0 . It is part of many character sets such as ASCII , ISO 8859 or Unicode and is one of the so-called C0 characters , which are in the range from 0 to 31. NUL is usually used as an abbreviation.

history

The original meaning of the null character is similar to NOP ( No Operation , English for no function ). When sent to a printer or terminal , the device does nothing. This symbol is shown on punched tape as a complete lack of holes. A punched tape filled with zero characters therefore appears to be empty.

use

The zero character can be used as a filler character on storage media, for example to fill unused storage space . In some transmission protocols it is used as a temporal filler signal that can be inserted into a message at will and discarded by the recipient. This bridges delays on the sender side with synchronous data transmission without affecting the actual user data.

In some programming languages, for example C , the null character is used as a marker for the end of a character string . Since it cannot be entered directly in normal text editors, it is represented in the source text by the escape sequence \ 0 ( backslash followed by digit 0) or hexadecimally as 0x00.

Unicode

The null character is in the Unicode block Basic Latin (C0 Controls and Basic Latin) at position 0.

presentation

The zero character cannot be displayed directly as a control character. However, there are different display conventions that can be used as a substitute for the control characters to be displayed:

Convention Representation of the zero character
Caret notation ^ @
Control symbol ␀ (U + 2400)
Escape sequence \ 0