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

Discussion in 'VHDL' started by Fangs, Apr 8, 2004.

1. ### FangsGuest

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

thanks.

Fangs, Apr 8, 2004

2. ### Hendra GunawanGuest

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

Hendra Gunawan, Apr 9, 2004

Joined:
Feb 17, 2008
Messages:
1
0
send to my mail about conversion of 8-bit binary to seven segment

4. ### darshana

Joined:
Oct 26, 2008
Messages:
1
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.

darshana, Oct 26, 2008