0
\$\begingroup\$

For example, suppose I have a combinational circuit that takes 32 bits as input and outputs 1 bit that is equal to 1 if the 32-bits are equal to 0, and outputs 0 if the 32 bits are anything else. How can I achieve this result using NAND, AND, OR, or inverter gates?

In particular, what happens to the 32 bit result when I put it through a gate. Thus, if I wanted to put the 32 bits in a XOR gate such as:

0       ------------\
                    XOR ----------- 
32 bits ------------/

And the output of my combinational circuit was only one bit, what would happen here?

\$\endgroup\$
  • 1
    \$\begingroup\$ This smells like homework. \$\endgroup\$ – Matt Young Feb 19 '13 at 0:05
  • 1
    \$\begingroup\$ It's actually an old exam question. I couldn't understand the solution, so I was trying to work it through myself. \$\endgroup\$ – user19151 Feb 19 '13 at 0:29
0
\$\begingroup\$

For the logic that you descibed you need a 32 input OR gate followed by an inverter. You do not want the XOR that you show in your diagram.

If you cannot get an OR gate with 32 inputs then work with some smaller sizes. For example, if all you can get are 4-input OR gates then it will take 8 of these gates to accept the 32 total inputs. Next use a second bank of two more of the 4-input gates to pickup the 8 outputs of the first stage. Finally use a 3rd stage of one final gate to accept the two outputs of the 2nd stage. The two remaining inputs of that 3rd stage gate can be tied to GND. The output of that 3rd stage gate connects to your inverter to produce the final output.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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