The Binary system has been in widespread use for a comparatively short period of time. Its use has been accelerated by the development of electronics and computers. The evolution of electronics and electronic components resulted in a system that detected states of a component as being ON (that is, under a significant potential difference or voltage) or OFF (that is, no or low potential difference)
These ON and OFF states were conveniently interpreted as 1 and 0, completely representing the binary number set and making it the method of choice for performing arithmetic calculations. Logical operations, such as NOT, AND, OR, and XOR were easily supported by the development of electronic gates resulting in the binary system being wholeheartedly adopted as conditional processing became easy
This entire passage is from
Rao, S. (2022). Appendix A. In Sams Teach yourself C++ in one hour A day (pp. 735–735). essay, Pearson Education.