Code

A code is a system to convert a piece of information into another form. Codes were most often used to send messages or define situations.

An early code that was used for communication on Earth during the 19th century was Morse code. 

The Intersat code was used in the 21st century for inter-stellar communications. 

Early computer systems on Earth were based on binary code, and later Federation systems could even support trinary code. 

Codes were often used to encrypt information, including the Federation's Code 2 and Code 3 in the 23rd century, the former had been broken by the Romulans by stardate 3478.2, and thus was replaced by the latter. 

Many other codes were simply used to transmit information quickly, including Code One alert to indicate a declaration of war or disaster, code 7-10 to indicate planetary quarantine , Code 1-Alpha-Zero for a ship in distress , Code Factor 1 for a possible invasion of the Federation , code blue, or blue alert, which used to indicate a change in starship flight status , code white resuscitation to indicate the need to resuscitate a dead individual , Emergency Code 1 for intruder alert , and Transporter Code 14 to destroy an object in a transporter beam. 

Codes could also be used to designate messages for specific individuals, such as code 47 meaning "for captain's eyes only." 

Critical ship systems required passphrase access in the form of prefix codes and authorization codes.