(8-bit binary to two digit bcd) or (8-bit binary to two digit seven segment)

F

Fangs

how do i write a code for (8-bit binary to two digit bcd) or (8-bit binary
to two digit seven segment)??

thanks.
 
H

Hendra Gunawan

Fangs said:
how do i write a code for (8-bit binary to two digit bcd) or (8-bit binary
to two digit seven segment)??

The structural way to do this is to convert the 8 bit binary to BCD fist,
then convert BCD to 7 segment.
The BCD to 7 segment is very easy to implement. It is just a ROM with BCD as
the input and seven segment as the output. It's simple because you only have
10 cases to consider, 0000 to 1001 in each BCD. The rest of the cases, 1010
to 1111, you just put don't care or all zeros or all ones for the outputs.
The binary to BCD is much more difficult. You can search the web for the
algorithm. If you contact me privately, I can send you the handouts
regarding with the algorithm.

Hendra
 
Joined
Oct 26, 2008
Messages
1
Reaction score
0
for bcd to 2digit ssd,we have to use operators like modulus,divison.
As in c,we use mod n div to break two digit no into ones place n tens place.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top