Answers.Body: <p>For the introductory lesson. We use this to introduce selection (if statements), and a little bit of boolean logic.</p>
  
  <ul>
  <li>“Stand up if you have got brown hair.”</li>
  <li>“Sit down.” look around “Stand up if you have blue eyes.”</li>
  <li>…</li>
  <li>With out asking them to sit down “Stand up if you …”</li>
  <li>Address why some people are still standing, are they correct [yes], or are the seated people correct [no]. Why? [because I did not ask them to sit].</li>
  <li>…</li>
  <li>“stand up if you have brown hair or you are …” (this is where we start to cover boolean logic, I have only done <code>and</code>, <code>or</code>, <code>not</code>).</li>
  </ul>
  
  <p>In another lesson you could add <code>xor</code>, <code>nand</code>, <code>nor</code>. I would also start using other techniques at or after this stage. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-28T09:02:09.503Z
Answers.LastActivityDate: 2017-07-28T09:02:09.503Z
Answers.UserDisplayName: ctrl-alt-delor
Answers.Body: <p><a href="http://www.peerinstruction4cs.org/peer-instruction-advice/" rel="nofollow noreferrer">Peer Instruction</a> materials exist for Discrete Math, for instance <a href="http://www.peerinstruction4cs.org/2014/01/28/discrete-mathematics-peer-instruction-materials/#more-640" rel="nofollow noreferrer">Cynthia Lee's Peer Instruction questions from Stanford</a>. You may be able to adapt some of the questions to fit your needs for a HS course.</p>
  
  <p>To your first point, I find Peer Instruction to be an excellent balance of lecture and active learning. There is direct content delivery, but it is short, and punctuated by active Peer Instruction questions that get students talking and allow the instructor to know that the students are actually thinking :)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T12:04:37.003Z
Answers.LastActivityDate: 2017-07-19T12:04:37.003Z
Answers.UserDisplayName: nova
Answers.Body: <h2>Guess who</h2>
  
  <p><a href="https://i.sstatic.net/IdxPn.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IdxPn.jpg" alt="An adult and a kid about to start playing a giant “guess who” game, in a hall exhibiting games"></a></p>
  
  <p>This game is about guessing which person the other player has. You get to ask a question to which the other player must answer yes or no. The best strategy is to ask a question that will eliminate exactly half of the remaining cards (an opportunity to also teach binary search). The game is designed to make it impossible to ask any simple question that will achieve this goal.</p>
  
  <p>Therefore you must ask compound logic questions, such as “Is this person wearing any thing on their head, that is a hat or glasses or a bow“ or even “Is this person female or (wearing a hat xor wearing glasses) or got a beard.“</p>
  
  <p>For each board you will need two players, and at least two judges/watchers.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-31T18:33:59.680Z
Answers.LastActivityDate: 2017-07-31T18:33:59.680Z
Answers.UserDisplayName: ctrl-alt-delor
Answers.Body: <p>I like these ideas for building logic circuits. Some of them are already covered in other answers, but not all.</p>
  
  <ul>
  <li>Dominoes — as in peters answer</li>
  <li>People ( I would love to see some ideas on this, as I suspect it to be very powerful)</li>
  <li>Electronic — logic gates</li>
  <li>Discrete Electronics — e.g. the <a href="https://www.youtube.com/watch?v=lNa9bQRPMB8" rel="nofollow noreferrer">mega processor</a> is made of just discrete transistors, resistors, leds, and other discrete components (no integrated circuits).</li>
  <li>Hydraulics</li>
  <li><p>Pneumatics:</p>
  
  <p>I once played with a pneumatic piston and switch set, and managed to implement many simple digital and logic devices. These included <code>Astable multi-vibrator</code> (an oscillator), <code>mono-stable multi-virbartor</code> (a device that does not want to stay on/off), <code>and</code>, <code>or</code>, <code>nand</code>, <code>nor</code>.</p>
  
  <p>The set included indicator lights (Not lights but colours that where pushed up against a frosted cover, to make them visible); Switches (that would allow air to flow); pistons, and pipes. The closes to this that I have seen since is minecraft.</p>
  
  <p>It was at around this time that I realised that the distinction between electronics, mechanics, and software, was false. It is all informatics (sometimes hardware, sometimes software).</p></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-20T22:04:31.870Z
Answers.LastActivityDate: 2017-07-31T07:55:19.117Z
Answers.LastEditDate: 2017-07-31T07:55:19.117Z
Answers.UserDisplayName: ctrl-alt-delor
Answers.Body: <p>Another fun exercise is implementing <code>and</code> and <code>or</code> using only <code>nand</code> gates (or <code>nor</code> gates). This proves that <a href="https://neovlsi.wordpress.com/2009/03/06/what-is-a-universal-gate-and-why-nand-is-called-a-universal-gate/" rel="nofollow noreferrer"><code>nand</code> is universal</a>. You can demonstrate that <code>nor</code> is universal then ask them to show that <code>nand</code> is (or vice versa).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-20T22:44:09.117Z
Answers.LastActivityDate: 2017-07-31T16:02:26.180Z
Answers.LastEditDate: 2017-07-31T16:02:26.180Z
Answers.UserDisplayName: Ellen Spertus
Answers.Body: <p><strong>Build logic gates out of dominoes.</strong></p>
  
  <p>Start off by showing <a href="https://www.youtube.com/watch?v=lNuPy-r1GuQ" rel="noreferrer">this video from Numberphile</a> in whole or in part. In it is a demonstration of how to use dominoes to model logical operations of a computer. It begins with a simulation of an <code>AND</code> gate and writes out its corresponding truth table. This is followed by the same process with <code>XOR</code>, which then allows for the construction of a half adder and in conclusion a full adder. (You may also share <a href="https://www.youtube.com/watch?v=OpLU__bhu2w&amp;feature=youtu.be" rel="noreferrer">this video</a> with students, which contains an elaborate, 10000-domino construction. Per the YouTube description, "The result was a Domino Computer capable of automatically adding numbers. It can take any two four-digit binary numbers and return the five-digit binary sum.")</p>
  
  <p>Then challenge students to build elementary logic gates themselves (you might need a lot of dominoes, but I bet it would be worth it in the long run). You could start by having them come up with designs for <code>AND</code>, <code>OR</code>, <code>NAND</code>, <code>NOT</code>, <code>XOR</code>, etc. on their own. Depending on how this goes, consider using <a href="http://www.think-maths.co.uk/sites/default/files/downloads/think_maths_domino_computer_worksheets.pdf" rel="noreferrer">this resource</a> to help guide the design of gates in dominoes.</p>
  
  <p>After students create these gates, consider giving them longer Boolean expressions to model and solve using dominoes. This would also be a clever way of showing how DeMorgan's Law works.</p>
  
  <p>The level of complexity knows almost no bounds with this approach. I could see some students, especially those with a love for computer science, who would thrive doing a hands-on, constructive activity like this.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T07:04:50.967Z
Answers.Text: Perhaps useful to know: Matt's Dominoes For Education system is still running. His 10.000 dominoes are free for schools to use as long as they pay shipping from the last school.
Answers.UserDisplayName: Weckar E.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-20T21:48:59.033Z
Answers.Text: The `nand`, `not`, and `nor` gates are impossible with dominoes. How would you have a gate that starts toppling its output if there is no input? Where would it get power? How would it know when to do this? (it is late in the circuit, so topples the output, but then as the logic ripples through has to un-topple it. I like the rest of the answer though.
Answers.UserDisplayName: ctrl-alt-delor
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-28T15:01:32.640Z
Answers.Text: After reading the comments, I was thinking that if you have XOR, you can make not, because (a XOR 1) = (NOT a). But after watching the video, I see the problem. For the domino XOR gate to work, you have to knock down the two inputs simultaneously. So for a NOT gate to work, someone would have to be standing over the machine knocking down a domino every time the NOT gate was about to be hit in the circuit. This defeats the purpose of an automatic computer.
Answers.UserDisplayName: James Vanderhyde
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-18T21:51:34.690Z
Answers.LastActivityDate: 2017-07-19T06:09:48.930Z
Answers.LastEditDate: 2017-07-19T06:09:48.930Z
Answers.UserDisplayName: Peter
Answers.Body: <p>I used a card game activity to review Boolean expressions in a CS1 context. You may be able to adapt to involve more abstract propositions and more complex operators.</p>
  
  <p><strong><em>tl;dr</strong> Students play a card game in small groups. They choose proposition and operator cards from their hands to create true or false statements.</em> </p>
  
  <p><strong>Proposition cards have text like:</strong></p>
  
  <ul>
  <li>No one is on their cell phone</li>
  <li>I speak Spanish</li>
  <li>x % 2 == 1;</li>
  <li>((Teacher)) once did ((funny thing))</li>
  </ul>
  
  <p>Have fun personalizing to your class :)</p>
  
  <p><strong>Operator cards have text like:</strong></p>
  
  <ul>
  <li>AND (&amp;&amp;)</li>
  <li>OR (||)</li>
  <li>NOT (!)</li>
  </ul>
  
  <p><strong>Here is a version of the rules:</strong></p>
  
  <p>Each white card has a statement (in English or in code) that is either true or false. Each colored card has one of three logical operators: AND, OR or NOT. </p>
  
  <p>The game is played as follows. </p>
  
  <ol>
  <li>Each player starts with 6 cards, 3 white and 3 colored. </li>
  <li>Someone picks a random int for the value of x.</li>
  <li><p>When it is your turn, </p>
  
  <ul>
  <li>Flip a coin to determine whether you are trying to make an expression that evaluates to true (heads) or false (tails).</li>
  <li>If you can make such a logical expression using at least 3 of your cards, put down the expression in front of you and draw new cards to replace those you put down.</li>
  <li>Otherwise, trade in one of your cards for a card of the same color.</li>
  </ul></li>
  <li><p>The first person to put down at least 12 cards wins!</p></li>
  </ol>
  
  <p>I found this game in some old PLTL CS materials: <a href="http://www.pltlcs.org/sigcse10/" rel="noreferrer">http://www.pltlcs.org/sigcse10/</a> --> Sample PLTL Sessions materials > Logic</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T01:54:24.747Z
Answers.LastActivityDate: 2017-07-19T01:54:24.747Z
Answers.UserDisplayName: nova
Answers.Body: <p>The activity that occurred to me was categorical <a href="https://en.wikipedia.org/wiki/Logic_puzzle" rel="noreferrer">logic puzzles</a> where you're given a list of hints and have to figure out a set of facts using a grid.</p>
  
  <p>These puzzles are solved by breaking the hints down into boolean expressions and then filling in the grid.</p>
  
  <p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Logic_grid.png/200px-Logic_grid.png" alt="logic puzzle"></p>
  
  <p>The hints are things like:</p>
  
  <ul>
  <li>Ada owns a computer but does not wear a green hat.</li>
  <li>The person who wears a blue hat does not own a horse.</li>
  <li>The owner of the boat either has a black or white hat.</li>
  </ul>
  
  <p>Which you have to break down into boolean expressions:</p>
  
  <ul>
  <li><code>Ada.ownsComputer = true;</code> <code>Ada.wearsGreenHat = false;</code></li>
  <li><code>BlueHat.ownsHorse = false;</code></li>
  <li><code>Boat.wearsGreenHat = false;</code> <code>Boat.wearsBlueHat = false;</code></li>
  </ul>
  
  <p>You have to understand the implicit relationships of the hints: if you know somebody wears a green hat, then you know they don't wear a blue hat.</p>
  
  <p>You could even go a step further and have students create their own puzzles.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T07:01:23.267Z
Answers.Text: Funny, I never thought of these puzzles like this, programmatically. I Always thought of them in terms of compound arrays. Or reference functions. More Ada.eliminateHat(Green) and Boat.secureHat(Blue).
Answers.UserDisplayName: Weckar E.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T00:35:03.147Z
Answers.LastActivityDate: 2017-07-19T00:35:03.147Z
Answers.UserDisplayName: Kevin Workman
Body: <p>I've been thinking about <em><a href="https://cseducators.stackexchange.com/a/1366/27">active learning</a></em>, and I am inspired by <a href="https://cseducators.stackexchange.com/a/2527/27">Heather's answer</a> to my earlier <a href="https://cseducators.stackexchange.com/questions/1463/unit-review-for-boolean-algebra">boolean algebra curriculum review</a>.  This may also be a good question for math teachers who have experience teaching algebra.  How do you avoid lecturing, and get the kids <em>doing a lot of activity</em>, even when there is so much material to cover?</p>
  
  <p>So, here is my actual question:
  <strong>What are techniques to get at boolean algebra using active learning?</strong></p>
  
Tags: <lesson-ideas><active-learning><boolean-algebra>
Title: Active learning for boolean algebra
ThreadText: # Active learning for boolean algebra
  
  (Asked by: username_0 on 2017-07-18)
  
  I've been thinking about *[active learning](https://cseducators.stackexchange.com/a/1366/27)*, and I am inspired by [Heather's answer](https://cseducators.stackexchange.com/a/2527/27) to my earlier [boolean algebra curriculum review](https://cseducators.stackexchange.com/questions/1463/unit-review-for-boolean-algebra). This may also be a good question for math teachers who have experience teaching algebra. How do you avoid lecturing, and get the kids *doing a lot of activity*, even when there is so much material to cover?
  
  So, here is my actual question:
  **What are techniques to get at boolean algebra using active learning?**
  
  **Tags:** lesson-ideas, active-learning, boolean-algebra
  
  
  ---
  
  ## 8 answers
  
  ### Answer by username_4 on 2017-07-18. Score: 7
  
  **Build logic gates out of dominoes.**
  
  Start off by showing [this video from Numberphile](https://www.youtube.com/watch?v=lNuPy-r1GuQ) in whole or in part. In it is a demonstration of how to use dominoes to model logical operations of a computer. It begins with a simulation of an `AND` gate and writes out its corresponding truth table. This is followed by the same process with `XOR`, which then allows for the construction of a half adder and in conclusion a full adder. (You may also share [this video](https://www.youtube.com/watch?v=OpLU__bhu2w&feature=youtu.be) with students, which contains an elaborate, 10000-domino construction. Per the YouTube description, "The result was a Domino Computer capable of automatically adding numbers. It can take any two four-digit binary numbers and return the five-digit binary sum.")
  
  Then challenge students to build elementary logic gates themselves (you might need a lot of dominoes, but I bet it would be worth it in the long run). You could start by having them come up with designs for `AND`, `OR`, `NAND`, `NOT`, `XOR`, etc. on their own. Depending on how this goes, consider using [this resource](http://www.think-maths.co.uk/sites/default/files/downloads/think_maths_domino_computer_worksheets.pdf) to help guide the design of gates in dominoes.
  
  After students create these gates, consider giving them longer Boolean expressions to model and solve using dominoes. This would also be a clever way of showing how DeMorgan's Law works.
  
  The level of complexity knows almost no bounds with this approach. I could see some students, especially those with a love for computer science, who would thrive doing a hands-on, constructive activity like this.
  
  > **Comments:**
  > **username_5**: Perhaps useful to know: Matt's Dominoes For Education system is still running. His 10.000 dominoes are free for schools to use as long as they pay shipping from the last school.  
  > **username_1**: The `nand`, `not`, and `nor` gates are impossible with dominoes. How would you have a gate that starts toppling its output if there is no input? Where would it get power? How would it know when to do this? (it is late in the circuit, so topples the output, but then as the logic ripples through has to un-topple it. I like the rest of the answer though.  
  > **username_6**: After reading the comments, I was thinking that if you have XOR, you can make not, because (a XOR 1) = (NOT a). But after watching the video, I see the problem. For the domino XOR gate to work, you have to knock down the two inputs simultaneously. So for a NOT gate to work, someone would have to be standing over the machine knocking down a domino every time the NOT gate was about to be hit in the circuit. This defeats the purpose of an automatic computer.  
  
  ---
  
  ### Answer by username_7 on 2017-07-19. Score: 7
  
  The activity that occurred to me was categorical [logic puzzles](https://en.wikipedia.org/wiki/Logic_puzzle) where you're given a list of hints and have to figure out a set of facts using a grid.
  
  These puzzles are solved by breaking the hints down into boolean expressions and then filling in the grid.
  
  ![logic puzzle](https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Logic_grid.png/200px-Logic_grid.png)
  
  The hints are things like:
  
  * Ada owns a computer but does not wear a green hat.
  * The person who wears a blue hat does not own a horse.
  * The owner of the boat either has a black or white hat.
  
  Which you have to break down into boolean expressions:
  
  * `Ada.ownsComputer = true;` `Ada.wearsGreenHat = false;`
  * `BlueHat.ownsHorse = false;`
  * `Boat.wearsGreenHat = false;` `Boat.wearsBlueHat = false;`
  
  You have to understand the implicit relationships of the hints: if you know somebody wears a green hat, then you know they don't wear a blue hat.
  
  You could even go a step further and have students create their own puzzles.
  
  > **Comments:**
  > **username_5**: Funny, I never thought of these puzzles like this, programmatically. I Always thought of them in terms of compound arrays. Or reference functions. More Ada.eliminateHat(Green) and Boat.secureHat(Blue).  
  
  ---
  
  ### Answer by username_2 on 2017-07-19. Score: 5
  
  I used a card game activity to review Boolean expressions in a CS1 context. You may be able to adapt to involve more abstract propositions and more complex operators.
  
  ***tl;dr*** Students play a card game in small groups. They choose proposition and operator cards from their hands to create true or false statements.
  
  **Proposition cards have text like:**
  
  * No one is on their cell phone
  * I speak Spanish
  * x % 2 == 1;
  * ((Teacher)) once did ((funny thing))
  
  Have fun personalizing to your class :)
  
  **Operator cards have text like:**
  
  * AND (&&)
  * OR (||)
  * NOT (!)
  
  **Here is a version of the rules:**
  
  Each white card has a statement (in English or in code) that is either true or false. Each colored card has one of three logical operators: AND, OR or NOT.
  
  The game is played as follows.
  
  1. Each player starts with 6 cards, 3 white and 3 colored.
  2. Someone picks a random int for the value of x.
  3. When it is your turn,
  
     * Flip a coin to determine whether you are trying to make an expression that evaluates to true (heads) or false (tails).
     * If you can make such a logical expression using at least 3 of your cards, put down the expression in front of you and draw new cards to replace those you put down.
     * Otherwise, trade in one of your cards for a card of the same color.
  4. The first person to put down at least 12 cards wins!
  
  I found this game in some old PLTL CS materials: <http://www.pltlcs.org/sigcse10/> --> Sample PLTL Sessions materials > Logic
  
  
  ---
  
  ### Answer by username_1 on 2017-07-28. Score: 2
  
  For the introductory lesson. We use this to introduce selection (if statements), and a little bit of boolean logic.
  
  * “Stand up if you have got brown hair.”
  * “Sit down.” look around “Stand up if you have blue eyes.”
  * …
  * With out asking them to sit down “Stand up if you …”
  * Address why some people are still standing, are they correct [yes], or are the seated people correct [no]. Why? [because I did not ask them to sit].
  * …
  * “stand up if you have brown hair or you are …” (this is where we start to cover boolean logic, I have only done `and`, `or`, `not`).
  
  In another lesson you could add `xor`, `nand`, `nor`. I would also start using other techniques at or after this stage.
  
  
  ---
  
  ### Answer by username_2 on 2017-07-19. Score: 2
  
  [Peer Instruction](http://www.peerinstruction4cs.org/peer-instruction-advice/) materials exist for Discrete Math, for instance [Cynthia Lee's Peer Instruction questions from Stanford](http://www.peerinstruction4cs.org/2014/01/28/discrete-mathematics-peer-instruction-materials/#more-640). You may be able to adapt some of the questions to fit your needs for a HS course.
  
  To your first point, I find Peer Instruction to be an excellent balance of lecture and active learning. There is direct content delivery, but it is short, and punctuated by active Peer Instruction questions that get students talking and allow the instructor to know that the students are actually thinking :)
  
  
  ---
  
  ### Answer by username_1 on 2017-07-31. Score: 1
  
  ## Guess who
  
  [![An adult and a kid about to start playing a giant “guess who” game, in a hall exhibiting games](https://i.sstatic.net/IdxPn.jpg)](https://i.sstatic.net/IdxPn.jpg)
  
  This game is about guessing which person the other player has. You get to ask a question to which the other player must answer yes or no. The best strategy is to ask a question that will eliminate exactly half of the remaining cards (an opportunity to also teach binary search). The game is designed to make it impossible to ask any simple question that will achieve this goal.
  
  Therefore you must ask compound logic questions, such as “Is this person wearing any thing on their head, that is a hat or glasses or a bow“ or even “Is this person female or (wearing a hat xor wearing glasses) or got a beard.“
  
  For each board you will need two players, and at least two judges/watchers.
  
  
  ---
  
  ### Answer by username_1 on 2017-07-20. Score: 1
  
  I like these ideas for building logic circuits. Some of them are already covered in other answers, but not all.
  
  * Dominoes — as in peters answer
  * People ( I would love to see some ideas on this, as I suspect it to be very powerful)
  * Electronic — logic gates
  * Discrete Electronics — e.g. the [mega processor](https://www.youtube.com/watch?v=lNa9bQRPMB8) is made of just discrete transistors, resistors, leds, and other discrete components (no integrated circuits).
  * Hydraulics
  * Pneumatics:
  
    I once played with a pneumatic piston and switch set, and managed to implement many simple digital and logic devices. These included `Astable multi-vibrator` (an oscillator), `mono-stable multi-virbartor` (a device that does not want to stay on/off), `and`, `or`, `nand`, `nor`.
  
    The set included indicator lights (Not lights but colours that where pushed up against a frosted cover, to make them visible); Switches (that would allow air to flow); pistons, and pipes. The closes to this that I have seen since is minecraft.
  
    It was at around this time that I realised that the distinction between electronics, mechanics, and software, was false. It is all informatics (sometimes hardware, sometimes software).
  
  
  ---
  
  ### Answer by username_3 on 2017-07-20. Score: 1
  
  Another fun exercise is implementing `and` and `or` using only `nand` gates (or `nor` gates). This proves that [`nand` is universal](https://neovlsi.wordpress.com/2009/03/06/what-is-a-universal-gate-and-why-nand-is-called-a-universal-gate/). You can demonstrate that `nor` is universal then ask them to show that `nand` is (or vice versa).
  
  
  ---
  
  