To operate a DC locomotive on a DCC system, a technique called “Zero Stretching” is used. Usually referred to as Address 0, an address isn’t allowed in DCC. All the DCC locomotives will continue what they are doing, as they just ignore that packet.
Not all systems support Zero Stretching, as it not part of the DCC standard. For those that do, they simply alter a null packet by making one rail high (energized) for a longer period of time than it would normally be. The longer it is held high, the faster the DC motor will turn. Speed is determined not by voltage, but by time.
In a DCC system there are no AC voltages, nor are there positive and negative voltages. Just a sequence of high and low voltages on each rail, where one is energized (high) and the other is not (low). It is a digital system, after all.
While Rail A is high, the current flows through the motor to Rail B (at zero volts), and it turns, providing motion to the locomotive. In this case, Rail A is more positive than Rail B, so current flows from the energized Rail A to B and back to the source. To reverse direction, Rail B is held high, current flows from B to A and the motor turns in reverse. Rail B is now more positive than Rail A, so it will turn in reverse. Repeating this packet this fast enough keeps the motor turning.
When address 0 is in use, it generates a lot of packet traffic which can bog down system response. Even when set to speed step 0. To power a DC locomotive a lot of packets have to be sent at address 0.
Under normal DCC operation, the high frequency of the pulses on the rails cause the effective flux in the motor to cancel, as the direction of current flow changes rapidly. This can result in overheating, and some motors, such as coreless types, can be quickly damaged. The motor is also going to make some noise as the torque vector keeps reversing, causing the amature to vibrate.