Hi people,
A decimal number could have been coded with ternary or quaternary code. Why always binary code is preferred? What actually the advantages are?
Thanks in advance
Binary can be represented very simply by switches (e.g. transistors) which are either on or off. Any other number base is more difficult to represent electronically.
Yea, I know, but with micros these days you get to program 1 bit to do lots of things:
input/output
pullup/pull down/none
pullup value/pulldown value
Then you program what the bit is for (and that could be 3 or 4 things)
That 1 bit has a lot of states, but computations are still done with 2 states.
I'm being a pain an dI know it, but a bunch of control bits are indeed controlling multiple STATES of an output.
If I used a pull up and pull down resistor and say biased the off state to 1/2 Vcc, I could INVENT a logic family that had 3 states: Vcc, GND and 1/2 Vcc right? I'm not saying it's practical, just for argument's sake.
You can't. If one chooses to use tri-state as a 3rd logic state for logic and computation you can not play the open collector input game.
But it gets much worse. Binary values are easy to store in that you can charge or not charge a cap, turn a transistor on or off, or set a magnetic field N or S. The technology behind tristate (driven-hi, driven-lo, not driven) is harder to implement.