1 / 12

Learning Objective

LO: We’re learning to understand how logic applies to us when building applications. Learning Objective. A logic gate is a digital circuit which either allows a signal to pass through it or to stop it. There are seven basic logic gates: AND , OR, XOR, NOT, NAND , NOR, and XNOR. Logic….

rosie
Download Presentation

Learning Objective

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LO: We’re learning to understand how logic applies to us when building applications. Learning Objective

  2. A logic gate is a digital circuit which either allows a signal to pass through it or to stop it. There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR. Logic….

  3. A NOT gate (inverter)has only one input. It reverses the logic state. Y = NOT A NOT GATE…. NOT GATE Output Input ON OFF CENTRAL HEATING HEAT DETECTOR (ABOVE 20 C) NOT GATE ON OFF

  4. AND GATE An AND gate can have two or more inputs. The output will be positive (true) when both inputs (the input one AND the input two) are positive (true). Y= A AND B Input AND GATE…. Output Input ON/OFF ON/OFF c PERSON SENSOR BURGLAR ALARM AND GATE ON SWITCH FOR ALARM ON /OFF

  5. OR GATE Input An OR gate can have two or more inputs. The output will be positive (True) if at least one input is true. Y = A OR B OR GATE…. Output Input ON/OFF ON/OFF FRONT DOORBELL SWITCH OR GATE DOORBELL BACK DOORBELL SWITCH ON /OFF

  6. It is important to remember the rules of each gate. For example The NOT gate has only one input and therefore only has one output. The truth table below has been started for you, see if you can finish it… Task 1 – Truth Tables….

  7. Using these rules, see if you can finish the other two truth tables. The output is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false.” – OR The output is "true" when both inputs are "true.” Otherwise, the output is "false.“ - AND Task 1 – Logic Sheet

  8. Name the logic gates. Test it by answering True or false (Yes or No) for each Input. Task 2 – Drawing the gates Good dancer ? ? Good at sport YES, She/He is OK ON ? Blue eyes ? Has a big nose Task – Create a pattern of logic gates to find out if something is suitable. It could be the perfect video game or CD to listen to.

  9. Now that you understand the rules, it time to apply it to TouchDevelop. You’ve learnt about 3 different gates, you may need to compare items before making algorithms in the future. Can you think of things you might need to compare in a game? Task 3 – Applying the Logic

  10. Using the lesson 10 video, create the 3 logic gates as 3 separate programmes. Publish the program with your name so that your teacher can search or it. Once your teacher is happy with your Logic gates, see if you can create variables and repeat the logic gates you illustrated previously. Task 3 – Applying the Logic

  11. Wrapping UP Your teacher might pass around 3 torches around the room. The teacher has one input Another student is the second input. The 3rd student will need to turn the 3rd torch, on or off based on the gate mentioned by the teacher.

More Related