Hi, how does a CPU know that 1 + 1 = 2? It's a question that I've been thinking about since about today, and I have no clue how it knows.
Every processor has an instruction set. One common one is to take the contents of one register (a bit of named memory in the processor), and add that to the contents of another register, placing the results in a third register. It doesn't have to do it that way, but that is a common method. Going into more detail requires defining what processor you are interested in (they all differ), and some knowledge of assembly programming.
and i thought it used the windows Calc ,lol
To a CPU 1+1 actually equals 11!
Computers aint all that clever. ;)
1+1 for a computer equates to 10. computer processors are all zeroes 0 and ones 1. a CPU is codes with whats calls machine language. evert letter every number is first interpreted as a string of zeroes and ones at the processor. then converter to what you see on the screen.
I know what binary is, and I know what a CPU does. My question is how. How does a CPU work?
At the very basics, a CPU is a collection of transistors that can be in either of 2 states. On or off.
A CPU is able to make complex calculations very quickly by switching it's transistors from one state to the other.
The latest CPU's have millions of transistors.
Is that what you want to know?