Transistors do ultimately calculate the output. It would be fair to say they are the most fundamental logic element in a computer.
Using methods described by other people ITT you can build basic gates like OR, AND, NOR, NAND, XOR, etc. The next step is to chain multiple gates together to come up with something more useful. You can implement a lot of surprisingly complex calculations by doing this. Addition, subtraction, multiplication, and a lot more are possible using only basic logic gates. This is called combinational logic.
To take it to the next level you need *sequential* logic. You use a *flip flop* (which itself can be implemented using transistors) to store the output of one calculation. Then you can feed that output into another combinational circuit to do the next step of your calculation. This allows you to chain multiple calculations together. That’s essentially what a program is. A list of operations which are calculated sequentially.
Latest Answers