Edit: Most of the answers here are wonderful and spot on.
For those who interpreted it differently due to my incorrect and brief phrasing, by ‘teaching’ I meant how does the computer get to know what it has to do when we want it to perform arithmetic operations (upon seeing the operators)?
And how does it do it? Like how does it ‘add’ stuff the same way humans do and give results which make sense to us mathematically? What exactly is going on inside?
Thanks for all the helpful explanations on programming, switches, circuits, logic gates, and the links!
In: 583
I’ll defer this one to the excellent Sebasian Lague youtube series [https://www.youtube.com/watch?v=QZwneRb-zqA](https://www.youtube.com/watch?v=QZwneRb-zqA) ‘How do computers work’.
Basically, transistors allow ‘logic’ to transact with electricity with operations like ‘and’ ‘or’, ‘xor’, ‘not’ etc. Group enough of those logic gates together and you can calculate almost anything.
Latest Answers