0
\$\begingroup\$

So I came across this problem, where the conditions of the output (P, Q, R) will be set to high (1) if the condition is true:

enter image description here

The conditions are:

  • Output P : A > B
  • Output Q : A = B
  • Output R : A < B

The inputs A has two values in itself and B has two values in itself as well (i.e A will have the values 0 & 1/ B will have the values 0 & 1).

How do you design a logic gate circuit with this? How would I combine the two values within the input A or B and combine them later as well to get the final output?

One of the options I have tried is taking each value separately (that would make a total of 4 different inputs), then combining them to make A & B. But it made things more complicated because it's not clear which gate should be used, and there are several different gates.

It looks complicated, I tried my best but I really can't figure out a way.

Is there an easier way?

\$\endgroup\$
5
  • \$\begingroup\$ Construct the truth table for the inputs then construct the (three output) truth table for the outputs. That should help to organize the behavior of the circuit and get you moving down the right path. \$\endgroup\$
    – vir
    Commented Aug 30, 2021 at 17:58
  • 1
    \$\begingroup\$ Is A a single bit input which can either take 1 or 0 as the value (but not both at the same time) or is A a two bit input which can take one of the values 00, 01, 10, 11 (but not more than one of these at the same time)? \$\endgroup\$
    – AJN
    Commented Aug 30, 2021 at 18:44
  • \$\begingroup\$ As mentioned in the answer, construct the circuit for just P first, ignoring Q and R. \$\endgroup\$
    – AJN
    Commented Aug 30, 2021 at 18:46
  • \$\begingroup\$ @AJN as you said, it's like this: A a two bit input which can take one of the values 00, 01, 10, 11 (but not more than one of these at the same time). Sorry for the confusion, I am not that good at english and didnt know how to put it into words. \$\endgroup\$
    – magnolia
    Commented Sep 1, 2021 at 21:55
  • \$\begingroup\$ First step is to construct a truth table as mentioned in the comments and answer. Since A can taken one of four values and B can take one of four values, the truth table for P will have sixteen rows. From the truth table, use a method (like K maps) to get a logical expression involving gates. \$\endgroup\$
    – AJN
    Commented Sep 1, 2021 at 23:59

1 Answer 1

3
\$\begingroup\$

I'll provide a hint.

Construct a truth table for P.

A  B  P
=======
0  0  ?
1  0  ?
0  1  ?
1  1  ?

Fill in the blanks. Now what logic gate(s) can be used to generate that truth table?

Post your effort into your question and then try to generate a similar table for Q and R.


Tip: use the {} code formatting button (or four spaces on the start of each line) to force fixed-space font for your tables.

\$\endgroup\$
0

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.