Showing posts with label multiplier. Show all posts
Showing posts with label multiplier. Show all posts

Interesting Design Quiz - BCD multiply by five circuit

Problem – Make a digital circuit that takes a BCD digit as input and produces the output that is equal to 5 times the digit in same format.
Solution – Binary Coded Decimal (BCD) is the format to represent decimal numbers in binary form. In this format, each digit of the decimal number is coded separately into 4-bit binary number. So, only binary values from 0000 to 1001 are valid codes. E.g. A two digit decimal number will be coded into BCD code with 8 binary digits.
Binary multiplier for 5 times BCD multiplierSince, the circuit produces output that is 5 times the BCD digit, so, output value can contain maximum of 2 decimal digits OR 8 binary digits. Let I3-I0 be the 4-bit BCD digit input to the X5 multiplies and H3-H0 and L3-L0 be the 8-bit BCD output as shown in the figure below.


The truth table for X5 multiplier can be represented as shown in the figure below:



BCD
input
BCD
output
I3
I2
I1
I0
H3
H2
H1
H0
L3
L2
L1
L0
0
00
0
0
0
0
0
0
0
0
0
0
0
0
1
05
0
0
0
1
0
0
0
0
0
1
0
1
2
10
0
0
1
0
0
0
0
1
0
0
0
0
3
15
0
0
1
1
0
0
0
1
0
1
0
1
4
20
0
1
0
0
0
0
1
0
0
0
0
0
5
25
0
1
0
1
0
0
1
0
0
1
0
1
6
30
0
1
1
0
0
0
1
1
0
0
0
0
7
35
0
1
1
1
0
0
1
1
0
1
0
1
8
40
1
0
0
0
0
1
0
0
0
0
0
0
9
45
1
0
0
1
0
1
0
0
0
1
0
1
X
XX
1
0
1
0
X
X
X
X
X
X
X
X
X
XX
1
0
1
1
X
X
X
X
X
X
X
X
X
XX
1
1
0
0
X
X
X
X
X
X
X
X
X
XX
1
1
0
1
X
X
X
X
X
X
X
X
X
XX
1
1
1
0
X
X
X
X
X
X
X
X
X
XX
1
1
1
1
X
X
X
X
X
X
X
X





Drawing K-maps for all the outputs:

         
 K Map for H3, L3 and L1
 
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
 =>   H3 = L3= L1 = 0



Similarly, by solving using K-Maps for all the outputs, we get

H2 = I3

H1 = I2

H0 = I1

L2 = L0 = I0


Thus, all the outputs are either a direct connection from one of the inputs or zero. So, the whole function can be implemented without using a single logic gate. Sounds strange!!!

Can you come up with a better solution for this problem? Let us know with your comments.

Next read: Digital counters

Also read: