I am trying to build a circuit using only encoders and decoders. This circuit will output the 1’s complement of 3 bit number. (For example: If I give it 010 it will give output 101.)

I used a 741LS138 3 to 8 decoder and an 8 to 3 encoder (the 8 to 3 encoder is working fine.)

The problem is that it does not show the desired output.

When I try to provide input the output always stays 0.

I have made a truth table. I cannot figure it out what is wrong with it.

The circuit that I made:

enter image description here

Truth table:

enter image description here

Here is the schematic of the 8 to 3 encoder which I built:

enter image description here

  • 2
    \$\begingroup\$ "Problem is it is not showing desired output." Well tell us what it is showing. That will be important information in debugging your problem. Edit it into your question. \$\endgroup\$
    – Transistor
    Apr 1, 2021 at 20:07
  • \$\begingroup\$ electronics.stackexchange.com/search?q=3+to+8+decoder \$\endgroup\$ Apr 1, 2021 at 20:44
  • 1
    \$\begingroup\$ Have you set E1 high and checked good connection to E2 as it is gray? \$\endgroup\$
    – Justme
    Apr 1, 2021 at 21:44
  • 1
    \$\begingroup\$ "I am trying to build a circuit using only encoders and decoders" - but you're not using only encoders & decoders, you have a handful of inverters there too - which makes me wonder why bother with the encoders & decoders instead of just inverting the 3 bits ... ? \$\endgroup\$
    – brhans
    Apr 2, 2021 at 1:58

1 Answer 1


Thanks everyone

I finally figured it out. I have constructed 1 encoder and decoder then followed truth table. It works just fine.


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.