Many drives feature an option called Cable Select (CS). With the correct type of IDE ribbon cable, these drives can be auto configured as master or slave. CS works like this: A jumper on each drive is set to the CS option. The cable itself is just like a normal IDE cable except for one difference -- Pin 28 only connects to the master drive connector. When your computer is powered up, the IDE interface sends a signal along the wire for Pin 28. Only the drive attached to the master connector receives the signal. That drive then configures itself as the master drive. Since the other drive received no signal, it defaults to slave mode.
In order to use Cable Select jumpering, several conditions must be met. Both drives on a channel must support CSEL, both drives must be jumpered as CSEL, a CSEL cable must be used, and the host interface connector must support CSEL. For the host interface to support Cable Select, wire 28 must be grounded.
The standard 40-wire ATA ribbon cable and the 80-wire cable give different drive behavior when using Cable Select. If using the standard 40-wire cable, the Master goes in the middle connector and the Slave goes in the end connector. If using the 80-wire cable, attach the blue end connector to the system board or host controller, the gray middle connector to the Slave, and the black end connector to the Master.