contents.gifindex.gif

Design Method - BINBCD

The design of the BCD converter is easily expressed with a truth table that lists the value of Score (S0-S4), for values of bcd1 and bcd2, up to scores of decimal 31.

The truth table in this design expresses the design manually. However you could also use a macro to create a truth table as follows:

clear (binary);
@repeat 32 { binary - [binary/10,binary%10];
inc(binary);}

This macro is used to generate the test vectors.

A pair of equations generate an active-high LT22 signal to turn off the BUST LED when Score is less than 22, and an active-high GT16 signal to turn off the HIT LED when Score is less than 16.