I would use a cheap DDS module and control it with a microcontroller. I posted an example using a PIC MCU and a cheap DDS module here:
https://www.electro-tech-online.com/articles/demo-assembly-code-ad9850-dds-signal-generator.755/
The accuracy is dependent on the crystal, but you can easily get fractional Hz up to about 1/4 or more (as I recall) of the timing crystal. The example is programmed in Assembly, which is perhaps what you mean by "binary," but C, if you know it, would be almost as easy.
If you do not need at lot of funny values, then a crystal-controlled MCU is suitable, but you will be limited to "binary" (or integral) multiples and divisions of the base frequency available from the various timers in the MCU, unless you use something like Mike (K8LH) has presented here for a cycle accurate timer.
In sum, I would recommend the DDS as a starter.
John