J
John Fields
- Jan 1, 1970
- 0
I don't understand that. I thought an OR gate would output when *any* of the
inputs were true. I have copied and pasted this truth table for an OR gate:
Input A Input B Output Q
0 0 0
0 1 1
1 0 1
1 1 1
Also, I though an AND gate would only output if *all* of the inputs were
true, as below:
Input A Input B Output Q
0 0 0
0 1 0
1 0 0
1 1 1
I am sure that you are correct in what you say, but I would like to
understand it better rather than just taking your word for it![]()
In your schematic:
GND 1 2 3 4 5 6 7 8
| | | | | | | | |
| _/ | | | | | | | |
|-o/ o-o-)-)-)-)-)-)-)------o
| | | | | | | | |
| _/ | | | | | | | |
o-o/ o---o-)-)-)-)-)-)--\ | __
| | | | | | | \ o-| \ __
| _/ | | | | | | \ | )--| \ __
o-o/ o-----o-)-)-)-)-)-\ \o-|__/ | )--| \ __
| | | | | | \-----------|__/ | )--| \
| _/ | | | | | /---------------|__/ | )-o
o-o/ o-------o-)-)-)-)-----/ o--------------------|__/ |
| | | | | | |
| _/ | | | | | o-----------------------o
o-o/ o---------o-)-)-)--------o | __
| | | | o-| \ __
| _/ | | | | )--| \ __
o-o/ o-----------o-)-)-----------o-|__/ | )--| \
| | | o-|__/ | )----
| _/ | | | o-|__/
o-o/ o-------------o-)------------------o |
| | |
| _/ | |
o-o/ o---------------o-------------------------o
the assumption is that the leads going to the XBOX (1-8) are pulled up
to Vcc through resistors, since the circuiit wouldn't make much sense
otherwise. That is, closing the switches would have no effect on the
logic if the leads went to ground, and they're not allowed to float.
That is, unless they're bipolar TTL, but that's another story and is
bad practice and they'd wind up looking like they were pulled up
anyway.
If the inputs are pulled up to Vcc and no switches are pressed, then
the output of the circuit will go high since, for an AND, the output
goes high when all the inputs are high. Consequently, if _any_ of the
switches is pressed, that input will go low and so will the output.
Therefore, since you want the output state to change when _all_ the
switces are pressed, you need something with and output which will
change when _all_ the inputs are low, and that's an OR. (or a NOR,
depending on which way you want the output to swing when all the
inputs are low.
Having said that, the PDF I posted on abse shows an 8 input NAND being
used, the reason being that with the SPDT switches you showed being
normally connected to ground, all of the swithes being pressed will
result in all of the inputs of the NAND going high, causing the output
to go low, which is what I need to start the chain of events which
will result in the toggle.