

The left, the segment will turn on and off correctly for each one. If we feed the patterns of binary numbers into the four inputs on Rigging up three OR gates and one NOT gate like this. Make the segment switch on and off correctly for the numbers 1–10 by This segment on if we're showing the numbers 0 Right segment (shown in the picture, right, in blue).
Truth tables calculator series#
It's logic gates that control how theĭisplay works in a calculator and more logic gates that figure out theįor example, each segment of a calculator's display is switched on and off by a series of OR (Any input produces an output) Input 1Ĭontrolling a calculator display with logic gatesĬalculators can do all the things they need to do using differentĬombinations of logic gates. Here are the truth tables for the logic gates we met up above: AND (Output only with all inputs) Input 1 This shows the output you get (one or zero) for every possible input (each separate row of the table describes one of the possible sets of inputs and output).

We can summarize how they work very quickly and simply by writing what's called a truth table. Summarizing logic gates with truth tablesĬomputer chips don't really work like nightclub doormen: they just turn inputs into output-ones into zeros and zeros into ones. NOR is like OR with the end result swapped over in the Swapped over (so where AND produces an output of 1, NAND produces an

NAND is just like AND, only the end result is XOR (Exclusive OR) is like an OR, but it switches off if both the The other three common logic gates are variations on these three. Here's how we represent a NOT in electronics. Opposite of the input, so if the input is a 0, the output is a 1 and Unlike ANDĪnd OR gates, it has only one input and one output. The same, contrary way and it's called a NOT gate or inverter.

What you'd expect! In electronics, there's a logic gate that works in In other words, he does exactly the opposite of But if you're rude to him, he likes that for some If you're nice and polite, he shouts abuse at you and He talks to each person in turn as theyĪpproach him. The only trouble is, there's a really argumentative andĬontrary person on the door. There's one last hope: you know a friend is having a party a few So far, you've failed to get into either of the clubs. Ways in which it can work are shown beneath: InĮlectronics, we represent an OR gate with a different symbol. If either input is switched on (that is, carries a number 1), If neither of you is a member, you'reīoth left out in the cold. If either you or your friend is a member, or if you both are members, Rule: "A group of people can come in if any one of them is a member". Here, the person on the door is enforcing a different You're not wearing a tie, so you go to another club further down the Three ways in which the gate can work are shown below. InĮlectronics, we can represent an AND gate with this little symbol. If both inputs are switched on (that is, carry a number 1), the An AND logic gate works the same way with two electrical One of you is wearing a tie, or if neither of you is, neither of you If you're both wearing ties, you'll get in. Suppose you go to a nightclub where the doorman's job is to enforceĪ simple rule: "Everyone in your group must wear a tie to come in". Let's lookĪt the three simpler ones, AND, OR, and NOT: AND Logic gate, the most common of which are called AND, OR, NOT, XOR A logic gateĪ doorman or bouncer who is allowed to let people into a nightclub only New, outgoing electric current depending on what it finds. Receives two incoming electric currents, compares them, and sends on a Simply an electric circuit with two inputs and an output. What are logic gates? Circuits that compare!Ī logic gate might sound horribly complex, but it's
