Velocity Reviews > VHDL > (8-bit binary to two digit bcd) or (8-bit binary to two digit seven segment)

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

Fangs
Guest
Posts: n/a

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

thanks.

Hendra Gunawan
Guest
Posts: n/a

 04-09-2004
"Fangs" <(E-Mail Removed)> wrote in message
> 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

Junior Member
Join Date: Feb 2008
Posts: 1

 02-17-2008
send to my mail about conversion of 8-bit binary to seven segment

darshana
Junior Member
Join Date: Oct 2008
Posts: 1

 10-26-2008
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.