Bathroom Curiosity

October 23, 2008 — musings — Tags: ,

I was leaving the bathroom yesterday, and I noticed something that I usually take for granted.  Our bathroom here in my luxurious accomodations at Burton-Conner has not one, but two light switches.  Two light switches.  The curious thing is that regardless of the position of the other switch, flipping one switch will always cause a state transition in the light.  If you think about it, this is actually pretty non-trivial to implement.

I couldn’t think of a simple circuit that would implement the desired behavior.  Clearly, neither putting the switches in series nor putting them in parallel would work.

The strange thing is, after observing the behavior of the switches for a while (much to the bewilderment of my suitemates), I realized that the state of the light was a simple XOR of the positions of the switches.  My bathroom has an XOR gate built in to it.  I wonder what would happen if I somehow “wired” together enough bathrooms.  Could I make arbitrary combinational logic circuits?  I’d need one other type of gate…

3 Comments »

  1. I actually did this problem in my engineering class my sophomore year of high school…it wasn’t as bad as you might think. I don’t remember the details, but I think it involved something other than simple single pole/double throw switches somewhere….

    Comment by Laura — October 25, 2008 @ 12:37 am
  2. seriously dude?

    Comment by Alex — October 25, 2008 @ 10:13 pm
  3. I am rather more goal-oriented than you are when I go to the bathroom, methinks.

    Comment by christine — October 26, 2008 @ 7:18 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2009 Geek by Day | powered by WordPress with Barecity