2
\$\begingroup\$

I have a small homework the teacher gave us to assess our previous Digital Logic course. The question is to design a combinational circuit whose input is a 5-bit binary number and whose output is the 2's complement of the input number. I am also told to use the Quine-McCluskey method to simplify the circuit.

I have started by constructing a truth table of 5 variables with possible 32 combinations.

--------------------------------
 v  w  x  y  z    A  B  C  D  E
--------------------------------
 0  0  0  0  0    0  0  0  0  0
 0  0  0  0  1    1  1  1  1  1
 .
 .
 1  0  0  0  1    0  1  1  1  1
 .
 .
 1  1  1  1  1    0  0  0  0  1
--------------------------------

I have 5 outputs. I'm confused on how to procced with this.

Output A can be expressed as:

A = v'w'x'y'z + v'w'x'yz' + v'w'x'yz + v'w'xy'z' + v'w'xy'z + v'w'xyz' +
    v'w'xyz + v'wx'y'z' + v'wx'y'z + v'wx'yz' + v'wx'yz + v'wxy'z' + 
    v'wxy'z + v'wxyz' + v'wxyz + vw'x'y'z'

The same can be done for B, C, D and E. How do I proceed? Do I process (simplify) each output individually? If so, how can I combine them at the end?

Thanks,

Tamrat

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Typically each bit of the output would be independently calculated, but if you find common product terms you could share them. Have you reduced your expression to eliminate the don't cares? \$\endgroup\$ Mar 22, 2018 at 17:46
  • \$\begingroup\$ I would use negate and add one. An adder is a well known circuit in gates. (You can also find that in Wiki: "Conveniently, another way of finding the two's complement of a number is to take its ones' complement and add one") \$\endgroup\$
    – Oldfart
    Mar 23, 2018 at 7:18

1 Answer 1

1
\$\begingroup\$

As @oldfart suggested, instead of solving all those lengthy K-maps, you can directly draw the combinational ckt by using the relation that:

Two's compliment = One's compliment + 1

if input = \$A_4A_3A_2A_1A_0\$ and output = \$Z_5Z_4Z_3Z_2Z_1Z_0\$ , then:

\$Z_5Z_4Z_3Z_2Z_1Z_0\$ = \$A_4^1A_3^1A_2^1A_1^1A_0^1\$ + 00001

You can expand the Circuit further by substituting the equivalent gate level circuit of adders.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Wow, I didn't think of this at all. Really simple. But the question explicitly stated that I had to use the Quine-McCluskey method. I think the teacher wouldn't accept this answer. \$\endgroup\$
    – tamrat
    Mar 30, 2018 at 3:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.