Answer the question
In order to leave comments, you need to log in
How does a computer add two numbers?
Please help me with the task, I can’t even find an example on the Internet, they write everywhere, very generally, two numbers are converted to binary code, this information is stored in RAM, then it sends the instruction code and two numbers to the processor cache. It doesn't take much to write it down.
For example, you need to add two numbers that are in memory. Command 142h: add 1001h, 1006h. Show the sequence of steps to do this in a simple computer architecture:
Control signal Action
VO9 The value of the program counter (142) is passed to the bus
, and so on.
Answer the question
In order to leave comments, you need to log in
Signal?
Are you confusing a tire with which tire?
Do you yourself understand exactly at what level of detail you want to get an answer?
If on logical - read how the adder works. You can even watch videos. The adder is actually the essence of the work of any architecture.
If you are at the architecture level of the finished processor, then you can look at the assembler instructions for adding numbers. We send two numbers to the registers, execute the Add command, get the result in the registers, get it.
ps The program counter is usually not transferred to the bus, it is part of the processor's internal architecture.
There is a suspicion that you have fragments of different lectures mixed up in your head and you confuse the architecture with a specific implementation, and generally get confused with terms.
D. Patterson, Hennessy "Computer Architecture and Computer Systems Design"
Harris, Harris "Digital Circuitry and Computer Architecture"
I will surprise you, but the computer adds, subtracts, multiplies and divides just like you do - in a column. There is just a slight difference: you have 10 digits in numbers, and the computer has only two.
Here the topic of the question is not assembler, but digital devices and microprocessor systems. Particularly adders. The topic is specific. Not for a toaster. And for forums where guys with soldering irons sit. It's actually amazing what else is being asked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question