I tried to make some binary to decimal decoders, but I had no idea how to build them, so I ended up using the "combination checker" (basically providing one checker for each number). That was really inefficent and almost impossible when decoding e. g. 32-bit numbers (4,294,967,295 combinations). So I want to ask, is there some logic pattern you build over and over? Or should I make a separate arithmetic unit for calculating this the mathematical way? I want my output to be for example 7 segment display. And one more question, how does this decoding work on normal computers? Thanks for help
-
\$\begingroup\$ It's not clear from your question how this is to work. You want a 32-bit input but how many outputs? Are you looking for a particular number or all numbers. If the latter then you need your 4 billion outputs. Please edit your question to explain. You can insert a diagram with the schematic tool. \$\endgroup\$– TransistorCommented May 14, 2018 at 6:01
-
\$\begingroup\$ I edited the question. \$\endgroup\$– JacobCommented May 14, 2018 at 12:09
2 Answers
The "combination checker" is the fastest since it requires only two levels of gates.
A slower but with low gate usage can be implemented with successive 1:2 demultiplexers. To add a lsb from N level to N+1 level use N input 1:2 demultiplexer driven by the newly added lsb
Here the demultiplexer is implemented using one shared NOT gate and two AND gates
You cannot expect a 4,294,967,295 outputs logic to be simple.
If you don't need all combinations you can skip the gates with outputs that lead to only not used outputs.
Take care this solution has a high hazard!
simulate this circuit – Schematic created using CircuitLab
you could build a chain of divide-by-ten circuits and tap off the remainders.