Saturday, 17 December 2011

BCD to 84-2-1 code converter

Design a circuit which generates a 84-2-1 code when a BCD input is given.
Sol: Write down the truth table.

BCD



8 4 -2 -1
A B C D
S1 S2 S3 S4
0 0 0 0
0 0 0 0
0 0 0 1
0 1 1 1
0 0 1 0
0 1 1 0
0 0 1 1
0 1 0 1
0 1 0 0
0 1 0 0
0 1 0 1
1 0 1 1
0 1 1 0
1 0 1 0
0 1 1 1
1 0 0 1
1 0 0 0
1 0 0 0
1 0 0 1
1 1 1 1 
By minimizing this using K map, we get
S1=C+AD+BD
S2=D(A+B)
S3=AB
S4=B
Now draw the circuit using logic gates.

10 comments:

  1. thats wrong, please correct your information. You are delivering false information for infinite number of people and you are making their exam day more confusing. Use the correct sequence of codes. ABCD and not CDAB, and I mean that in the truth table when minimizing the function... thanks!!!

    ReplyDelete
  2. Please correct your post. The equations for S1, S2, S3, S4 are wrong. As pointed out by Ali Abou. The correct equations are S1= A+BC+BD S2= B⊕(C+D) S3=C⊕D S4=D

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Hi, I would like to ask regarding that formula you give. I used it to convert 8421 BCD to 84-2-1 BCD in C programming but then it yields a wrong answer. So my program accepts a decimal number and converts it to 8421 representation, from then on it converts the 8421 into 84-2-1 representation using the formula you gave. But when I enter 134 (as a decimal) it converts it into 0001 0011 0100, which is the correct 8421 representation of the 134 decimal number. But when I convert the 8421 representation of 134 to 84-2-1 using the formula you gave, it yields 0111 0201 0100, which is apparently wrong since 2 shouldn't be in there. I think it stems from the fact that the 3 in 8421 is 0011, and C and D are both 1, which means the S2 = B XOR (C+D) yields a result of 0 XOR 2 which means S2 = 2, that gives the 0201 in 84-2-1 representation, how do I fix this?

      Delete
  3. W=A+BC+BD.
    X=BC'D'+AC'D+A'B'D+B'C
    Y=C'D+CD'
    Z=D

    ReplyDelete
  4. W=A+BC+BD.
    X=BC'D'+AC'D+A'B'D+B'C
    Y=C'D+CD'
    Z=D

    ReplyDelete