SQUARISM addicted to pixels

Buying a cat with logic switches

Posted on January 23, 2010

Charles Petzold's book Code is an awesome read. I'm reading it again actually. It's so elegant and simple. Walks you through history and experiments in a style I find extremely invoking. I wanted to build a logic switch but I don't want to blow anything up so I tried this java applet at falstad.com and it works pretty well. I tried qucs but it's way too complicate for me and doesn't include an LED.

An example from Code (this is not the exact example) is where he's trying to buy a pet from a pet store and he creates a logic circuit that will light up a light bulb when the pet is correct. Let's say I'm looking for a normal gray cat as a house pet (not a tiger! rawr!). When I flip all the switches correctly, the LED lights up but if I get a gray tiger (that's technically a cat) then the LED (the red dot) says nope.

The salesman brings me a gray tiger. Nope.
logic_gray_tiger

The salesman brings me a gray cat that's not a tiger. Yep.
logic_gray_cat

Filed under: Blog Leave a comment
Comments (1) Trackbacks (0)
  1. Led lights are great because they are long lasting and consumes less electricity. [ed.]Also, I’m a bot link-spamming.


Leave a comment


No trackbacks yet.