A total artificial heart having a rotor with an impeller, wherein the rotor is mounted within a pump housing on a hollow shaft. The rotor is magnetically driven to produce rotary motion of the impeller for pumping blood. The motor is disposed within the pump housing such that axial translation within the housing acts as a shuttle valve to alternate flow between pulmonary and systemic circulation.