In computer networks, a syncword, sync character, sync sequence or preamble is used to synchronize a data transmission by indicating the end of header information and the start of data. The syncword is a known sequence of data used to identify the start of a frame, and is also called reference signal or midamble in wireless communications.
In an audio receiver receiving a bit stream of data, an example of a syncword is 0x0B77 for an AC-3 encoded stream. The Bisync protocol of the 1960s used a minimum of two ASCII "SYN" characters (0x16…0x16) to achieve character synchronization in an undifferentiated bit stream, then other special characters to synchronize to the beginning of a frame of characters.
The syncwords can be seen as a kind of delimiter. Various techniques are used to avoid delimiter collision, or—in other words—to "disguise" bytes of data at the data link layer that might otherwise be incorrectly recognized as the syncword. For example, HDLC uses bit stuffing or "octet stuffing", while other systems use ASCII armor or Consistent Overhead Byte Stuffing (COBS).
In some communication systems, a receiver can achieve character synchronization from an undifferentiated bit stream, or start-of-header synchronization from a byte stream, without the overhead of an explicit syncword. For example, the FSK441 protocol achieves character synchronization by synchronizing on any "space" characters in the message – in effect, every "space" character in the message does double duty as a syncword. For example, CRC-based framing achieves character and start-of-header synchronization.
In a self-synchronizing code, every character is, in effect, a syncword, and can be used to achieve character synchronization in an undifferentiated bit stream.