# Translate 4 bits to 2 BCD Digits

Discussion in 'Homework Help' started by tquiva, Nov 14, 2010.

1. ### tquiva Thread Starter Member

Oct 19, 2010
176
1
Problem:
The team lead on this project came rushing in this morning all worried about one thing that got overlooked to complete the alarm clock. The decision was made to implement the Hours counter as a binary, 1 to 12 couner; however the Display module needs 2 BCD digitsfor the hour. He is asking you to design a block of Combinational Logic to translate the 4 bits of counter output (D, C, B, A) to two BCD digits (HR_HI[3..0] and HR_LO[3..0]). As a hint, he said we know HR_HI[3..1] will always be 0, so we only need to design the functions for HR_HI[0] and HR_LO[3..0]. He doesn't want to use a discrete gate based solution to implement these functions, but he doesn't know whether a Decoder or MUX implementation will use a smaller number of CLB's.

I first began by creating a truth table with the outputs listed vertically from 1 to 12 (in Binary - 0000 to 1100). Then to the right, I listed HR_HI for 3 to 0 and HR_LO for 3 to 0. But now, I'm stuck and I have no idea where to go from here. How would I go about translating the 4 bits DCBA to two BCD digits?

2. ### Georacer Moderator

Nov 25, 2009
5,151
1,266
What does the exercise mean with HR_HI[3..1], HR_HI[0] and HR_LO[3..0]. What do these functions describe?