A ventilator that is small, lightweight, and portable, yet capable of being quickly adapted to operate in a plurality of different modes and configurations to deliver a variety of therapies to a patent. A porting system having a plurality of sensors structured to monitor a number of parameters with respect to the flow of gas, and a number of porting blocks is used to reconfigure the ventilator so that it operates as a single-limb or dual limb ventilator. In the single-limb configuration, an active or passive exhaust assembly can be provided proximate to the patient. The ventilator is capable of operate in a volume or pressure support mode, even in a single-limb configuration. In addition, a power control mechanism controls the supply of power to the ventilator from an AC power source, a lead acid battery, an internal rechargeable battery pack, and a detachable battery pack.