# swithing operation help required

Discussion in 'Homework Help' started by chiragpatelbh, Nov 21, 2013.

1. ### chiragpatelbh Thread Starter New Member

Nov 21, 2013
1
0
Can anybody help me for below problem,

I am looking for solution for change in state of output if any of input state gets change.

for ex, if Inputs A=0, B=1 and Output C=1, den any of input changes means if A=1 or B=0 should change output C=0.

2. ### MikeML AAC Fanatic!

Oct 2, 2009
5,445
1,073
It can be done with a Four-state State Machine consisting of two flip-flops, some gates.

Can you get started with this hint?

3. ### WBahn Moderator

Mar 31, 2012
23,089
6,941
Actually, all this is an XOR gate (or possibly an XNOR gate depending on the desired output in the ONE input state that you get to pick).

You can also do this with mechanical switches. If you have only two inputs you wire them up just like the 3-way switches at the top and bottom of stairs. You only need two SPDT switches. For more than two inputs, you add additional 4-way switch sections, which are just DPDT switches.

4. ### MikeML AAC Fanatic!

Oct 2, 2009
5,445
1,073
Dont you need to store the present state of the inputs before you can compare them to a new state (i.e. need flip-flop, delay line, RC, something)?

5. ### WBahn Moderator

Mar 31, 2012
23,089
6,941
Nope. Does the switch at the bottom of the stairs need to store the present state of the light in order to toggle that state whenever the switch is flipped?

6. ### shteii01 AAC Fanatic!

Feb 19, 2010
4,425
700
With two inputs, there are 4 possible combinations.

AB
00
01
10
11

We know what happens when 01 and 10 are inputs. We don't know what happens when 00 and 11 are inputs. Until we do, there is not much to talk about here.

7. ### MikeML AAC Fanatic!

Oct 2, 2009
5,445
1,073
I read the OP's requirement as "the output C is true if either input A or B changes state".

Feb 19, 2010
4,425
700
AB C
00 0
01 1
10 ?
11 1
Like this?

9. ### WBahn Moderator

Mar 31, 2012
23,089
6,941
The OP gave an EXAMPLE in which the output was HI when A=LO and B=HI. He then said that the output should go LO if EITHER A goes HI or B goes LO. That would give us the outputs for inputs 01 (HI), 00 (LO), 11 (HI). He made no direct statement about the 10 case.

But this was an EXAMPLE. His SPECIFICATION is that the output changes state if any of the inputs change state.

I don't see how you are arriving at that conclusion.

His example clearly shows that the output goes LO when EITHER input changes state (in this EXAMPLE, because we were starting off with the output being HI).

Hopefully the OP will come back and post a clarification so that we can all be sure we are on the same page.

10. ### MikeML AAC Fanatic!

Oct 2, 2009
5,445
1,073
Ok, I should have said "the output C is false if either input A or B changes state". By implication, output C is true if neither A or B changes state.

I still don't understand how you could do this without storing the previous state of A and B. The three-way switch suggestion doesn't make sense to me. Note that I think we are comparing Anow to Apervious OR Bnow to Bprevious; not A to B.

11. ### WBahn Moderator

Mar 31, 2012
23,089
6,941
Only because, in this particular EXAMPLE, the output was already HI.

His specification does not say that the output is false if either input changes. His specification does not say that the output is true if either input changes. His specification does not say that the the output is false if neither input changes. His specification does not say that the output is true if neither input changes.

His specification states that the output CHANGES state if EITHER input changes. By implication, the output DOES NOT CHANGE if neither input changes.

There's a HUGE difference!

Look at the case of

C = A XOR B

Does that not satisfy the example he has given?

His only specification is that, regardless of what the present state is, the output should toggle to the other state any time any input is changed. This results in two possible circuits. One in which the output is LO when ALL of the inputs are LO and one in which the output is HI when ALL of the inputs are LO. But, once that decision is made, the behavior for ALL other states is also made. If the output is LO when ALL of the inputs are LO, then the output will ALWAYS be HI anytime an odd number of inputs are HI. Conversely, of the output is HI when ALL of the inputs are LO, then the output will ALWAYS be LO any time and odd number of inputs are HI. The first case is an XOR of all of the inputs and the second is an XNOR of all of the inputs. Another way to do it is to add an additional parity input that is LO if you want the XOR relationship and HI if you want the XNOR relationship.

12. ### MikeML AAC Fanatic!

Oct 2, 2009
5,445
1,073
Well, we will find out what the OP wanted if the OP ever returns

13. ### WBahn Moderator

Mar 31, 2012
23,089
6,941
Yep. The oft-heard silence of the one-post member echoes through the halls yet again.