This paper presents a novel variable transmission system that is based on the concept of digital hydraulics. In the proposed system, sets of rolling-diaphragm cylinders are mounted via different effective lever arms to an input and output joint. A variable subset of these cylinders is connected via three-way two-position on/off valves to a common hydraulic manifold. This introduces a controllable constraint on the hydraulic flow and creates a programmable hydraulic transmission. With three single-acting cylinders, we could realize 37 different transmission ratios. We investigated the nonholonomic flow constraint analytically, in simulation, and with an experimental prototype. Using water as fluid, we show that a very stiff transmission (124.2 Nm/rad) can be achieved within the range of ±6°. Theoretical transmission ratios are tracked with R-squared values of more than 0.996 and backlash is smaller than 1.4%. Furthermore, we show the applicability of the proposed transmission in the simulation of a body-powered knee-ankle exoskeleton.