A digital valve has a valve body with an inlet passage and two outlet passages straddling the inlet passage. A plurality of slots are cut in the body connecting the inlet passage to each outlet passage. Bores in the valve body intersect each slot, and a plunger in each bore blocks or opens the slot. The slots vary in width in a binary progression, and solenoids, controlled by a central processing unit through solid state relays, selectively actuate the plungers so that a desired flow through the valve can be effected. Upstream and downstream sensors are connected to the central processing unit, which is within the valve, to modify the actuation of the plungers in order to provide a predetermined flow at the instantaneous temperature of the fluid and the instantaneous pressure drop across the valve.