Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Convert binary to BCD code

Status
Not open for further replies.
genetica said:
4bit binary to BCD.

hi,
I must be missing something.:confused:

Isnt 0 thru 9 binary, BCD anyway??

Can you post a sample bin pattern?
 
Well i got a random sequence for certain numbers

0 1110
1 1101
2 1011
3 0111
4 0001
5 0010
6 0100
7 1000
9 0000
8 all the rest.

And i like to convert them to BCD 8421 code.
I made a karnaugh diagram a created a circuit for the four inputs and then fout outputs a circuit for each bit. But the circuit is like huge.
 
genetica said:
Well i got a random sequence for certain numbers

0 1110
1 1101
2 1011
3 0111
4 0001
5 0010
6 0100
7 1000
9 0000
8 all the rest.

And i like to convert them to BCD 8421 code.
I made a karnaugh diagram a created a circuit for the four inputs and then fout outputs a circuit for each bit. But the circuit is like huge.
hi,

Have you considered using an EPROM ic, load the pattern you want out as the data and the 'odd bit' pattern as the address?

EDIT:
IF this is related to the 7seg Driver thread, the EPROM output data could be the 7seg driver data!
 
Last edited:
hi,
This drawing shows the method.
 
Last edited:
How to convert 4 digit BCD 7 segment LED to 16 binary code.

I am using PIC16F946 and like to write a code converting 4 digits BCD 7 segment LCD to 16 binary code. Example, the 4 digits BCD number 9998 would be 1001 1001 1001 1000. How to write c program to convert this ?

Anyone help.

Private email: rc.1010@yahoo.com
 
Status
Not open for further replies.

Latest threads

Back
Top