*objective*

Discover how binary logic is used to create computers

**You need...**

*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. |

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. |

The table below shows how each gate handles its inputs.

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...