2
$\begingroup$

I've watched multiple videos and read posts regarding modern cpus and how they work.

However, those ones very rarely touch the problem on the very basic level. Like I've read about transistors and stuff but I would like to spend (a lot I guess) time to actually understand how e.g. programming a math operation like 5^5 is calculated by cpu hardware.

Do you have any ideas where to start?

p.s. my uni background is econometrics which ended up in machine learning job. Unfortunately I have no CS knowledge.

Kind Regards, Matt

The recommended online resource I found was: Hoow do it know

$\endgroup$
  • 1
    $\begingroup$ How Do It Know is an excellent resource, taking you step by step from logic gates to a simple CPU. The Elements of Computing Systems by Noam Nisan is another excellent text, with more emphasis on software architecture - machine code, assemblers, compilers and a simple operating system. $\endgroup$ – gandalf61 Feb 12 at 14:59
  • 1
    $\begingroup$ This post cs.stackexchange.com/questions/3390/how-does-a-computer-work could be useful. $\endgroup$ – JhonRayo99 Feb 12 at 15:16
2
$\begingroup$

Today's CPUs are incredibly complex beasts. Sure, you can go rummage in computer architecture books and get a rough idea how a very simple CPU works. Understanding in detail how the CPU in your PC (or even your smartphone) works will require a lifetime, if not more. I suspect noone at Intel/AMD really undestands their latest CPU fully.

For example, today's processors take instructions from RAM, translate them into microinstructions internally, reorder and schedule those working even on several copies of the programmer-visible registers in parallel where possible (doing more or less the job of an optimizing compiler), and finally executing the resulting stream(s) of microinstructions.

Today's CPUs are much, much faster than RAM (in the time required to fetch a word from memory they can execute hundreds of instructions). Cache memory, and it's efficient use, predicting what will be read next, is crucial. Another area of significant complexity.

Add circuitry to compute the various operations, including floating point and assorted functions, like square roots and trigonometric functions. A box marked "floating point unit" right there.

And this doesn't yet consider the GPU that is integrated in some models...

$\endgroup$
0
$\begingroup$

There are a few good standard textbooks on this topic.

Computer Organization and Design: The Hardware/Software Interface by Patterson and Hennessy is extremely popular. I believe it's up to the 5th edition now.

But if you've never even seen a logic gate before, it may be worth starting with digital logic design, and sequential circuits in particular. There are a lot of videos and courses out there. My textbook was Digital Design by M. Morris Mano. You could do a lot worse than that book, but I'm not sure if there's anything more common today.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.