How computer do calculation, as we don't codes for teaching computer how to calculate, | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How computer do calculation, as we don't codes for teaching computer how to calculate,

in my highschool life, I wonder how programmers teach machine numbers and calculations, I heard they use logics, and I was turned down as thinking I am not knowing that logic to teach machine........ by now I know its all about gates made out of transistor combinations, but still any light on this very thing.....

27th Jun 2017, 7:23 PM
ASHISH PANDEY
ASHISH PANDEY - avatar
2 Answers
+ 9
I myself have doubts on these topics. Further reading requires extensive knowledge in hardware. This is one of the most relevant links that I can find. https://www.reddit.com/r/askscience/comments/1oqxfr/how_do_computers_do_math/
27th Jun 2017, 7:31 PM
Hatsy Rei
Hatsy Rei - avatar
+ 5
Computers have an Arithmetic Logic Unit inside the CPU. Basically it's made up of AND, OR, XOR, NAND gates that do calculations in a combinational circuit. For example multiplications are done by shifting the bits of a number to the left, and to the right for divisions. https://en.m.wikipedia.org/wiki/Arithmetic_logic_unit
27th Jun 2017, 7:49 PM
Karl T.
Karl T. - avatar