Author Options:

Circuit for 8 bit number to BCD? Answered

For a TTL project I'm working on, I wanted to have 7 segment display output for the 8 bit numbers it works with. After searching on google and not finding very well documented circuits, I decided to ask here. Because the input is 8 bit, it should output 3 numbers. I only need the circuit to do the BCD because I can use 7 segment display drivers from there. (Like a 7446 IC) Thank you.


Do you have access to programmable ROM?
It would be easy to generate a look-up table using 2 x 8bit wide ROMS to convert your 8 bits into 12 bits out for the display drivers.

Can you please elaborate how to do it using 2 ROMs?

Hi Usman. The OP's question has 8 input bits and wants to convert those 256 possible states to 3 x BCD outputs. BCD is 4 bits so he needs 12 bits out.

To get this you would parallel the 8 address inputs to the ROMs (A0 to A0, A1 to A1 etc) and connect e.g. D0 - D3 of the first ROM to the first BCD to 7 seg decoder, D4 - D7 to the 2nd, then D0 to D3 of the 2nd ROM to the 3rd decoder (and have 4 outputs left over).

The fiddly bit is then to program the ROMS for each of the 256 possible addresses, where each address sets the desired BCD code for each display. e.g., assuming BCD1 is most significant digit.

I/P 085 = %10101010 O/P BCD1 = %0000 BCD2 = %1000 BCD3 = %0101

I/P 100 = %01100100 O/P BCD1 = %0001 BCD2 = %0000 BCD3 = %0000

I/P 255 = %11111111 O/P BCD1 = %0010 BCD2 = %1010 BCD3 = %1010

You could also use two of the spare outputs to blank the leading displays if you didn't want leading zeroes showing.

It wouldn't be too difficult to write a program to generate the full table, otherwise it's a lot of work. Obviously ROMs with more than 8 inputs could be used; just tie the unused inputs low.

lets see you want a 256 count counter is that right?


They have hundreds on the net just Google "combinational logic circuit" and pic a TTL circuit and expand it to fit your needs.

I did search Google for the converter circuit, but couldn't find a well documented one.

Google "frequency counter circuits"
and then "clock circuits"
They use the same circuits to make frequency counters and clocks.

Thank you for your help, but I find out how one of the circuits I looked at before worked.

Look into micro controllers like the Arduino

I don't want to use micro controllers for this, I'd rather use 7400 logic gates.


4 years ago

Is this 8 bit number actually
eight individual lines 0 to 111111112 = 3778 = 25510 = FFh ?
or is it just four individual lines 0 to 11112  = 178 = 1510 = Fh ?


By 8 bit, I mean an 8 bit number (0-255) not 8 bit BCD.