First, we want to explain how such a controller works and what’s involved. A bipolar motor has two windings, and thus four leads. Each winding can carry a positive current, a negative current or no current. This is indicated in Table 1by a ‘+’, a ‘–‘ or a blank. A binary counter (IC1) receives clock pulses, in response to which it counts up or down (corresponding to the motor turning to the left or the right). The counter increments on the positive edge of the pulse applied to the clock input if the up/down input is at the supply level, and it decrements if the up/down input is at earth level.The state of the counter is decoded to produce the conditions listed in Table 2. Since it must be possible to reverse the direction of the current in the winding, each winding must be wired into a bridge circuit. This means that four transistors must be driven for each winding. Only diagonally opposed transistors may be switched on at any given time, since otherwise short circuits would occur. At first glance, Table 2 appears incorrect, since there seem to always be four active intervals. However, you should consider that a current flows only when a and c are both active. The proper signals are generated by the logic circuitry, and each winding can be driven by a bridge circuit consisting of four BC517 transistors.


http://www.extremecircuits.net/2010/07/bipolar-stepper-motor-control.html