Data Carrier Detect, abbreviated as DCD, or alternately Carrier Detect abbreviated as CD, is a control signal present inside an RS-232 serial communications cable that goes between a computer and another device, such as a modem. This signal is a simple "high/low" status bit that is sent "from DCE to DTE", or in a typical scenario, from the peripheral to the computer. It is present on virtually all PC serial ports - pin 1 of a nine-pin (DE9) serial port, or pin 8 over a 25-pin (DB25) port. Its purpose varies depending on the device connected, but the most typical meaning is to indicate when a modem is connected to another remote modem via telephone lines.
The word "carrier" is a reference to the analog carrier signal generated by a modem, which is modulated to carry the data. On a data modem, loss of the carrier equates to termination of the connection.
Much like the Ring Indicator signal, on a PC's serial port, changes to the DCD signal state can generate a hardware interrupt that can be captured by the processor any time the DCD signal changes state, preventing the PC from needing to constantly poll the pin.
DCD is very important on modems, as it is the computer's primary way to find out that the modem has lost its connection to the remote host. Aside from intentional disconnects, modems can lose their connection for a variety of reasons unexpectedly - such as the phone line being disconnected. It is possible to use a modem without the DCD signal, however the only way for the computer to know that a connection is disconnected is by the modem transmitting the words "NO CARRIER" over the data lines. Because the words "NO CARRIER" are also a message that could appear in the context of a normal data session (for example, if typed by a person on the remote end), there is no positive way for a computer program to differentiate the words being sent over the connection versus from the modem.
External modems with LED status lights usually have a light labeled "CD" (carrier detect). This status light is directly coupled with what the modem is sending the DCD line.
By default, when a modem is powered up, the DCD signal is deasserted. It is not asserted until the modem either makes an outgoing call, or answers an incoming call, and then connects with a data modem on the other end. The signal is asserted at the same time the modem reports its CONNECT message, and stays asserted until the call is disconnected (either intentionally or because of a fault in the line). DCD is deasserted once the local modem is no longer receiving carrier from the remote modem, regardless of which side initiated the disconnect. So long as the DCD signal is high, the computer can assume that any data coming from the modem was sent from the remote side.