The STX (Start of Text) character in the ASCII code has the value 2 and is a control character used to mark the beginning of the actual content or text of a message, after the header (marked with the SOH character) has been transmitted. This character was especially relevant in older communication systems and in protocols where it was necessary to clearly separate the parts of a message: the header and the body of the message.
ASCII code for the STX character
Character | Decimal | Hexadecimal | Binary | Description |
---|---|---|---|---|
STX (Start of Text) | 2 | 0x02 | 0000 0010 | Marks the beginning of the text in the data stream. |
STX Character Function
- Start of text: Indicates the beginning of the section of the message that contains the important data or the text itself, differentiating it from the header or metadata.
- Transmission control: In data transmission systems, it allowed the receiver to know when the useful text began, separating control instructions and metadata from the main content.
Examples of use
- Legacy communication systems: In communication protocols such as teletypewriters or serial data transmission, the STX character marked the beginning of the main body of the message, ensuring that the receiver could differentiate between the header (SOH) and the body of the message.
- Control in data files: Used in structured data files or streaming systems to indicate when the content to be processed or displayed begins, after the header containing control information.
Comparison with other control characters
- SOH (Start of Header) is used to indicate the beginning of the metadata or header of a message.
- STX (Start of Text) is used to indicate the start of the actual text or main content of the message.
Although the STX character is not in common use on modern systems, it is still part of the ASCII standard and is relevant to understanding the history of digital communications and early data transmission protocols.
Leave a Reply
You must be logged in to post a comment.