experiment objective

Discover how binary logic is used to create computers

You need...
  • No materials required
  • Read more background about this activity in Willard S. Boyle's bio...

    activity briefing

    When Jason gets home after school, he has a few activities to choose from: play, do homework, or eat supper. His parents allow him to play only after he has eaten supper AND finished his homework. The decision making process that the parents use is encoded in the demonstration below.

    Click on "Done Homework" or "Had Supper"

    When Jason gets home, he must eat supper even if he has not done his homework yet.

    Done Homework Had Supper

    When we remove the big square, we find a bunch of shapes and lines. The shapes represent logic gates and the lines indicate logic flow. The entire contraption is called a logic circuit. The demonstration below shows the circuit in action. Green lines and gates are active and black lines and gates are not active.

    Click on "Done Homework" or "Had Supper"

    When Jason gets home, he must eat supper even if he has not done his homework yet.

    Done Homework Had Supper

    The table below shows how each gate handles its inputs.

    Click on each gate to see it work.
    AND gate OR gate NOT gate



    the output line turns green only when both input lines are green output line turns green when either one (or both) input lines are green inverts the input; green becomes black, and black becomes green

    This behaviour is called binary logic because there are only two states for each component in the circuit; green or black for the lines, and green or white for the gates. Active or inactive, on or off, one or zero.

    The two-state limit is useful because it means that we can use binary logic to do binary math. Binary math is similar to the decimal math people use in every day life, except that it is performed with two digits instead of ten. In decimal math, we use the digits 0 to 9, but in binary math we use only 0 and 1.

    The demonstration below shows how binary numbers are added using logic gates.


    The binary numbers to be added are on the left. Click on each to toggle it between 0 and 1. The output results should be like this:
    0 + 0 = 00 0 + 1 = 01 1 + 0 = 01 1 + 1 = 10 (10 binary = 2 decimal)



    Go back to activities list...