EveryCircuit
Contact
Reviews
Home
592azy2circuitdude
modified 1 year ago

8 Bit Hex to Decimal - Binary to BCD Converter

9
3
674
06:43:21
Please give this circuit time to load and run as this is really stretching EveryCircuit's abilities. 8 bit hexadecimal to decimal or binary to BCD (Binary Coded Decimal) converter. (As far as I know, the only circuit on EveryCircuit that can do it with 8 bits!). By default, it converts AD hex to 173 Dec. INSTRUCTIONS: 1) Enter the binary number of your choice on the 8 logic buttons on the left. The hex equivalent will be displayed immediately on the left 7-segment displays. 2) Be patient! Allow the three 7-segment displays on the right to reset to all 0, then go to the equivalent decimal number. GENERAL: I used the Double-Dabble algorithm (aka the Shift-Add-Three method). If you'd like more info on how this works, I refer you to my 4-bit version of this circuit. https://everycircuit.com/circuit/6548980953251840 Blue waveform: Serial data of the binary number Output of upper center OR gate. Green waveform: Clock Output of center right AND gate Orange waveform: Reset signal (active low) Output of center logic train DETAILS: I used the left and upper AND and OR gates to change the binary inputs to serial data. I cascaded two and a half Double-Dabble circuits together (right logic gates and flip-flops groups). This gave me 3 groups of BCD numbers (00 0000 0000). Since I wanted to convert an 8-bit binary number with a max decimal value of 255, I needed 3 groups. In the case of converting 1010 1101 binary (AD hex) to 173 decimal (01 0111 0011 BCD), the algorithm would go like BCD BIN OPP DEC 00 0000 0000 1010 1101 start 000 00 0000 0001 010 1101 shift 1 001 00 0000 0010 10 1101 shift 0 002 00 0000 0101 0 1101 shift 1 005 00 0001 0000 1101 +3 shift 0 010 00 0010 0001 101 shift 1 021 00 0100 0011 01 shift 1 043 00 1000 0110 1 shift 0 086 01 0111 0011 Done +3 on 2 col shift 1 173 173 Dec = 1010 1101 Bin is correct. NOTE: I haven't tested all the numbers. If you find one that is wrong, let me know in a comment.
published 2 years ago
guillianj
2 years ago
Lol nice. We really need an option to expand the working space.
592azy2circuitdude
2 years ago
You can say that again! I know it is probably impossible to follow the circuit's connections to reconstruct a intelligible schematic. I apologize for the mess, but it was the only way it could fit.
592azy2circuitdude
1 year ago
With the EC update of 2.8, there is enough room to reorganize the schematic! Hopefully, it is now more clear to trace what is going on.

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2025 by MuseMaze, Inc.     Terms of use     Privacy policy