1 means yes and 0 means no is a convention. A lot of functions in standard libraries, for example, return 0 for failure (essentially “no”). Inside the implementation of a processor, you often encode yes or no in whatever way minimizes the local logic (maintaining “1 means yes” might require extra transistors to implement). This isn’t visible to the programmers, but is to other people working on the design. For example, some hardware uses “active high” reset (reset is true when the wire is high (1)) and some hardware uses “active low” reset (reset is true when the wire is low (0)). Both work just fine, all that matters is that everyone designing logic agrees what the interpretation of those voltages on those wires means.
Latest Answers