system
Given the following post, respond as if you're commenting on Reddit:
human
How do computers do math?

What actually goes on in a computer chip that allows it to understand what you're asking for when you request 2+3 of it, and spit out 5 as a result? How us that different from multiplication/division? (or exponents or logarithms or derivatives or integrals etc.)
gpt
This is actually a REALLY complicated question.  Here it goes...


The computer "thinks" in binary.  To do addition, subtraction, multiplication etc...the numbers need to be converted into bits first.  Then the outcome can be calculated using relatively simple rules.


NOTE:  Binary is calculated from right to left (typically...called most significant bit 'MSB' on the left).  Going from left to right you have 8 bits:  128 64 32 16 8 4 2 1 for a total of 256.  This is a 8 bit number or a BYTE.  If you go to 16 bits, you just keep adding 8 more bits and doubling the values as you go.  
So: 32768 16384 8192 4096 2048 1024 512 256  and so on...
  

Addition uses the following bit rules:
    0+0 = 0, 
    1+0 = 1, 
    0+1 = 1, 
    1+1 = 0 carry the 1

For instance:  add 10 + 23
(work from right to left...)

            1 11  (the carry is stored in a special register on the CPU...)
    10 = 0000 1010
    23 = 0001 0111
    ---------------
           0010 0001 = 33

That's how they do it.  Subtraction, multiplication and division have their own ruleset and can take more than one pass sometimes.  So they are more computationally expensive.

Edit:  wow...formatting is harder than doing bitwise math.