0
\$\begingroup\$

I'm trying to implement a 8 to 3 priority encoder which worked quiet well.

My function for the three outputs are:

$$A_0 = e_1 + e_3 + e_5 + e_7$$ $$A_1 = e_2 + e_3 + e_6 + e_7$$ $$A_2 = e_4 + e_5 + e_6 + e_7$$

enter image description here

Now I want to add an output which shows if more then one input is active. If only one input is active the valid output should be 1 otherwhise 0.

I don't know how to implement my valid function with AND, OR and NOT gates.

Does anyone have a hint for me?

EDIT:

This is a draft of the valid function:

V(e7,e6,e5,e4,e3,e2,e1)=
if      e7=1 and e6=0 and e5=0 and e4=0 and e3=0 and e2=0 and e1=0 then return 1
else if e7=0 and e6=1 and e5=0 and e4=0 and e3=0 and e2=0 and e1=0 then return 1
else if e7=0 and e6=0 and e5=1 and e4=0 and e3=0 and e2=0 and e1=0 then return 1
else if e7=0 and e6=0 and e5=0 and e4=1 and e3=0 and e2=0 and e1=0 then return 1
…
else if e7=0 and e6=0 and e5=0 and e4=0 and e3=0 and e2=0 and e1=1 then return 1

The truth table looks like the following:

enter image description here

The problem with the truth table is that I'm not able to create a kv diagram with 8 variables.

\$\endgroup\$
  • \$\begingroup\$ What have you tried? Can you write a logic equation for the desired function? How many inputs can your AND and OR gates have...as many as you want? \$\endgroup\$ – Joe Hass Apr 13 '14 at 17:16
  • \$\begingroup\$ the gates have many inputs as desired. I will edit my post when I wrote the function of the valid output. \$\endgroup\$ – Briefkasten Apr 13 '14 at 17:23
  • \$\begingroup\$ How about starting with a truth table? \$\endgroup\$ – jippie Apr 13 '14 at 17:27
  • 1
    \$\begingroup\$ I added the truth table \$\endgroup\$ – Briefkasten Apr 13 '14 at 17:35
2
\$\begingroup\$

I'll give you a hint. Break the inputs into two groups of four. Use a Karnaugh map to give an output when one and only one of four inputs is high. Use another Karnaugh map to create an output that is high when all of the inputs are zero. If you applied 0 through 3 to one of these logic circuits and inputs 4 through 7 to the other logic circuit, can you see how you might combine the outputs of the two logic circuits to give you what you want, at least for four of the inputs?

Now create an exact duplicate of that, but swap the groups of four inputs.

Now you have a big logic circuit with two 1-of-4 logic blocks and two all-0 logic blocks. You can combine the outputs of these blocks to get V.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ Thanks, I was able to create the function. Here my solution: V(E0,E1,E2,E3,E4,E5,E6,E7)=e0.!e1.!e2.!e3.!e4.!e5.!e6.!e7+ !e0.e1.!e2.!e3.!e4.!e5.!e6.!e7+ !e0.!e1.e2.!e3.!e4.!e5.!e6.!e7+!e0.!e1.!e2.e3.!e4.!e5.!e6.!e7+!e0.!e1.!e2.!e3.e4.!e5.!e6.!e7+ !e0.!e1.!e2.!e3.!e4.e5.!e6.!e7+!e0.!e1.!e2.!e3.!e4.!e5.e6.!e7+!e0.!e1.!e2.!e3.!e4.!e5.!e6.e7 \$\endgroup\$ – Briefkasten Apr 14 '14 at 14:38

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.