{"base":{"id":"cs8-14","subject":"Systems","title":"Logic gates","scene":"chip","steps":[{"mode":"gate","eyebrow":"NOT gate","title":"Flip the input","body":"A logic gate is a tiny circuit that takes binary inputs and gives one output. The NOT gate has one input and gives the opposite. Switch the input on and off.","actions":[{"id":"a","label":"Input A"}],"gate":"not"},{"mode":"gate","eyebrow":"AND gate","title":"Both inputs must be 1","body":"An AND gate outputs 1 only if input A and input B are both 1. Try all four combinations and watch the matching row light up in the truth table.","actions":[{"id":"a","label":"Input A"},{"id":"b","label":"Input B"}],"gate":"and"},{"mode":"gate","eyebrow":"OR gate","title":"One input is enough","body":"An OR gate outputs 1 if A or B (or both) is 1. It only outputs 0 when both inputs are 0. Try all four rows again.","actions":[{"id":"a","label":"Input A"},{"id":"b","label":"Input B"}],"gate":"or"},{"mode":"switches","eyebrow":"Real circuits","title":"Switches as gates","body":"Two switches in a line light the bulb only if both are closed: AND. Side by side, either switch works: OR. Try both layouts.","actions":[{"id":"a","label":"Close switch A"},{"id":"b","label":"Close switch B"},{"id":"layout","label":"Side by side"}]},{"mode":"quiz","eyebrow":"Check yourself","title":"Complete the row","body":"An OR gate has input A = 0 and input B = 1.","question":"What is the output?","options":["1","0","It can't be worked out"],"answer":0,"right":"Correct. OR gives 1 when at least one input is 1.","wrong":"Not quite. How many inputs must be 1 for OR?","look":"gate"}],"more":[{"type":"cards","id":"ideas","eyebrow":"Popular idea vs science","title":"Common mix-ups","items":[{"tag":"Popular idea","title":"\"An OR gate gives 0 when both inputs are 1.\"","body":"OR gives 1 if at least one input is 1, including when both are."},{"tag":"Popular idea","title":"\"A truth table only needs the rows that give 1.\"","body":"A truth table lists every combination of inputs, so nothing is missed."},{"tag":"Popular idea","title":"\"Logic gates are big parts you can see.\"","body":"A modern gate is only a few millionths of a millimetre across. A processor holds billions."}]},{"type":"cards","id":"tables","eyebrow":"Truth tables","title":"All three gates","items":[{"tag":"NOT","title":"Opposite","body":"A | OUT\n0 | 1\n1 | 0","code":true},{"tag":"AND","title":"Both 1","body":"A B | OUT\n0 0 | 0\n0 1 | 0\n1 0 | 0\n1 1 | 1","code":true},{"tag":"OR","title":"At least one 1","body":"A B | OUT\n0 0 | 0\n0 1 | 1\n1 0 | 1\n1 1 | 1","code":true}]},{"type":"cards","id":"real","eyebrow":"Everyday logic","title":"Gates in real life","items":[{"tag":"AND","title":"Microwave","body":"It heats only if the door is shut AND start is pressed."},{"tag":"OR","title":"Car light","body":"The inside light comes on if the driver door OR the passenger door opens."},{"tag":"NOT","title":"Night light","body":"It turns on when it is NOT light outside."}]},{"type":"activities","id":"try","eyebrow":"Try it at home","title":"Gate game","items":[{"title":"Human logic gates","time":"10 minutes","need":["Two helpers","Two cards each marked 0 and 1"],"steps":["Your two helpers are inputs A and B. They each hold up 0 or 1.","You are the gate. Say the output for AND.","Go through all four combinations and write a truth table.","Repeat as an OR gate, then let one helper be the input for NOT."],"why":"Gates follow fixed rules for every input combination, which is exactly what a truth table records.","safety":"No safety risks."}]},{"type":"quiz","id":"quiz","eyebrow":"Quiz","title":"Six more questions","questions":[{"question":"How many rows does a truth table with two inputs have?","options":["2","8","4"],"answer":2,"right":"Correct. 00, 01, 10, 11.","wrong":"Not quite. Count the input patterns."},{"question":"NOT 1 = ?","options":["0","1","2"],"answer":0,"right":"Correct. NOT flips the input.","wrong":"Not quite. NOT gives the opposite."},{"question":"AND with inputs 1 and 0 gives…","options":["1","0","2"],"answer":1,"right":"Correct. AND needs both inputs to be 1.","wrong":"Not quite. Are both inputs 1?"},{"question":"Which gate gives 0 only when both inputs are 0?","options":["AND","NOT","OR"],"answer":2,"right":"Correct. That's the OR rule.","wrong":"Not quite. Think about which gate is easy to make 1."},{"question":"Two switches in a line control a bulb. This works like…","options":["AND","OR","NOT"],"answer":0,"right":"Correct. Both must be closed.","wrong":"Not quite. Can current pass if one is open?"},{"question":"How many inputs does a NOT gate have?","options":["2","1","3"],"answer":1,"right":"Correct. It flips a single input.","wrong":"Not quite. It has only one."}]},{"type":"checklist","id":"check","eyebrow":"Self-check","title":"I can explain…","items":["what a logic gate does","the rules for NOT, AND and OR","how to complete a truth table for each gate","how series and parallel switches act like AND and OR"]},{"type":"keywords","id":"words","eyebrow":"Key words","title":"Words to know","items":[{"word":"logic gate","meaning":"A tiny circuit that gives an output from binary inputs."},{"word":"input","meaning":"A 0 or 1 going into a gate."},{"word":"output","meaning":"The 0 or 1 a gate gives out."},{"word":"truth table","meaning":"A table of every input combination and its output."},{"word":"series","meaning":"One after another in a single path."},{"word":"parallel","meaning":"Side by side, giving more than one path."}]},{"type":"sources","id":"sources","title":"Sources","items":["BBC Bitesize GCSE Computer Science: Logic gates"]}]},"overlay":null}