swithing operation help required

Thread Starter

chiragpatelbh

Joined Nov 21, 2013
1
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.
 

MikeML

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

Can you get started with this hint?
 

WBahn

Joined Mar 31, 2012
30,058
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.
 

MikeML

Joined Oct 2, 2009
5,444
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).....
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)?
 

WBahn

Joined Mar 31, 2012
30,058
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)?
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?
 

shteii01

Joined Feb 19, 2010
4,644
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.
 

WBahn

Joined Mar 31, 2012
30,058
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.
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 read the OP's requirement as "the output C is true if either input A or B changes state".
I don't see how you are arriving at that conclusion.

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.
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.
 

MikeML

Joined Oct 2, 2009
5,444
...
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)...
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.
 

WBahn

Joined Mar 31, 2012
30,058
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.
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!

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.
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.
 
Top