In programming, a flag is a predefined bit or bit sequence that holds a binary value. Typically, a program uses a flag to remember something or to leave a sign for another program. For example, in a message being exchanged by two programs, a three-bit flag's field or data area might be set to one of three configurations:
001 (meaning "I'm a self-contained message")
011 (meaning "I'm one of several chunks of data in this message")
111 (meaning "I'm the last chunk of data in this message")
Flags have many uses. One of the more controversial applications was the broadcast flag, copy protection encoding for broadcast digital television (DTV) signals, proposed by the Advanced Television Systems Committee.