This circuit can control a small DC motor, like the one in a tape recorder. When both the points A & B are “HIGH” Q1 and Q2 are in saturation. Hence the bases of Q3 to Q6 are grounded. Hence Q3,Q5 are OFF and Q4,Q6 are ON . The voltages at both the motor terminals is the same and hence the motor is OFF. Similarly when both A and B are “LOW” the motor is OFF.
When A is HIGH and B is LOW, Q1 saturates ,Q2 is OFF. The bases of Q3 and Q4 are grounded and that of Q4 and Q5 are HIGH. Hence Q4 and Q5 conduct making the right terminal of the motor more positive than the left and the motor is ON. When A is LOW and B is HIGH ,the left terminal of the motor is more positive than the right and the motor rotates in the reverse direction. I could have used only the SL/SK100s ,but the ones I used had a very low hFE ~70 and they would enter the active region for 3V(2.9V was what I got from the computer for a HIGH),so I had to use the BC148s . You can ditch the BC148 if you have a SL/SK100 with a decent value of hFE ( like 150).The diodes protect the transistors from surge produced due to the sudden reversal of the motor. The approx. cost of the circuit without the motor is around Rs.40.
Note: You can change the supply voltage depending on the motor, only thing is that it should be a 2 or 3V more than the rated motor voltage( upto a max. of 35V).