# Design a combinational circuit with two inputs and four outputs. The output binary number should be the square of the input binary number

I don't know how the output expression for each output produced from the truth table. Can someone please explain how this output expression was dervied from the truth table?

Problem: Design a combinational circuit with two inputs and four outputs. The output binary number should be the square of the input binary number.

Truth Table:

Output Expression:

S0 = B
S1 = 0
S2 = AB'
S3 = AB


P.S. Apostrophe is for Prime/Complement.

• Just use patterns of logic 1’s for each output vs all inputs Feb 22, 2020 at 16:57
• Hehehe ... signed or unsigned? Question doesn't say, but signed is simpler. As to how to answer the question, look at each output e.g. S0 individually. What boolean combination of inputs A and B (and constant 0 ot 1 if necessary) would generate that truth table? Feb 22, 2020 at 17:12
• Please don't use this forum to cheat on your homework. Feb 22, 2020 at 17:26
• Added homework tag. Feb 22, 2020 at 17:50

Can someone please explain how this output expression was dervied from the truth table?

I don't know how it was derived, but for a simple case like this I would just look at each line and see what logical combination of inputs create each output:-

• S0 is always the same as B, so S0 = B
• S1 is always 0, so S1 = 0
• S2 is 1 only when A is 1 and B is 0, so S2 = AB'
• etc.

We can derive the expression using K map technique. first write the minterm (or Maxterm) for S0,S1,S2,S3. Minterm S0={1,3} S1={no minterm} S2={2} S3={3} Example of k map for S0

     B'   B

A'  0    1

A   0    1


S0= B. We can do the same for others also.

Can someone please explain how this output expression was dervied from the truth table?

Not being able to read the author's mind, no, but here's how you can do it:

Multiply the binary value expressed in A & B by itself, then write down the result in binary -- that's the result you stick into $$\S_3\$$ through $$\S_0\$$. You can either stick to binary, or you can convert to any other base of your choice (you'll probably be boring and use base 10), do the multiply, then convert back to binary.