![work in physics calculator work in physics calculator](https://www.physicskey.com/images/pages/fig3.2.png)
Even the simple operation of adding those numbers together requires a complicated array of logic gates, but here's the gist of the process: Logic gates are used to combine the information stored in the two pairs of transistors - 10 and 10 (representing 2 and 2). OR sends out a 1 if either or both of its inputs is a 1, whereas XOR only outputs a 1 if its inputs are 1 and 0. The NOT gate switches the incoming signal: if its input is 1, its output is 0, and vice versa. But if it receives a 1 and a 0, or two 0s, it sends out a 0. Take the AND gate: If both the signals that arrive at the gate are 1s, then AND sends out a 1. Together, the logic gates enable circuits to add, subtract, multiply and divide the numbers sent to them by transistors. There are several types of logic gates: AND, OR, NOT and XOR (exclusive OR). As the name implies, a logic gate acts as a barrier in an electronic circuit it takes in two electric currents, compares them and sends out a new current based on what it finds.
![work in physics calculator work in physics calculator](https://i.ytimg.com/vi/vXK_KQoTDxA/maxresdefault.jpg)
![work in physics calculator work in physics calculator](https://challengepost-s3-challengepost.netdna-ssl.com/photos/production/software_photos/000/116/993/datas/original.png)
Now the calculator must add those inputs together.Ĭalculators (and computers) combine inputs using electronic components called logic gates. Two of its transistors (in the 10 configuration) correspond to the first "2" you pressed, and another pair of transistors, also in the 10 position, corresponds to the second number 2. Now the calculator has the go-ahead to execute the previously entered "+" command. You press "2." Just like they did the first time, electric currents translate your "2" into binary code, by switching one transistor on and another off.įinally, you press the "=" button. The rubber underneath it smashes two wires into contact, causing electricity to flow in such a way that the first input (the "2") gets stored, the addition function is signaled, and the calculator is ready for a new input.