Buying a cat with logic switches

Blog — Dillon @ 1:43 pm

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

1 Comment »

  1. Led lights are great because they are long lasting and consumes less electricity. [ed.]Also, I’m a bot link-spamming.

    Comment by Bailey Singh — May 11, 2010 @ 4:10 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) 2012 SQUARISM | powered by WordPress with Barecity