Hi, sorry I am not sure if this should be asked here, but I do not know of anywhere else to ask. I have been learning c++ for a good few months now and believe I am understanding the basics. But I want to learn more about, whats actually going on with the computer, how everything works and how the computer interacts with the code when it runs, such as how the memory works etc. I have not really learnt much about the stack or heap. I have found a page recommending a book called "computer systems a programmer's perspective" but this book is written about the C language and all the examples are in C. Would this still be ok for me to learn from since C++ evolved from C? Or does anyone know of a better book that would be more relevant?
The book you've linked to is from 2005. The latest version is from 2015. You can get it from thepiratebay.org (search without the possessive quote, i.e., Computer Systems A Programmers Perspective). Beware that this is an illegal download, but it allows you to peruse the book to decide if you might want to buy it.
I disagree with Thomas's opinion that this is "very advanced stuff". From the preface:
This book is for computer scientists, computer engineers, and others who want to be able to write better programs by learning what is going on "under the hood'" of a computer system.
Our aim is to explain the enduring concepts underlying all computer systems,
and to show you the concrete ways that these ideas affect the correctness, performance, and utility of your application programs. Many systems books are written from a builder's perspective, describing how to implement the hardware or the systems software, including the operating system, compiler, and network interface. This book is written from a programmer's perspective, describing how application programmers can use their knowledge of a system to write better programs.
I was able to quickly scan the book in question (edit: I refreshed and found dutch and thomas posted before me, I gave it a quick scan through in the last 10-15 minutes, it's also on github, though I can't say that copy is any more legal).
This book is good if you want to learn about how a cpu works, how it transfers data, how to write a driver, how to write an operating system.
It might be a deeper dive in than you are willing to go, but if your interest is in that direction then yes, this would be a good book. If you are still learning C/C++, this is not a good book. The information provided inside goes beyond a single language and is more about how any language works on a computer, it just uses C and assembly for its examples.
If you want to understand how to write a language like C/C++ this might be a good choice.
Let's say this is a book for people who know all they want to about C/C++ and they have a different focus in mind. This fits the bill as far as your prompt. It just goes a bit deeper than what I think you are wanting to go if you are worried about accidentally learning C instead of C++...
It does look really well written, I certainly want to add it to my list of books. Knowing this type of thing will make you a better programmer. So... keep it on a list of books to come back to when you feel you've mastered a couple of languages, or buy it now and read a couple of sections from time to time at your leisure.
Hi, thanks for all the feedback, firstly I will definitely look into getting the book linked by Thomas, as I need to learn the STL too. And I think I will try and get a copy of the book I was looking for through the pirate bay to have a look through it and see if I think it will be a good fit for me at this current time, and decide whether to buy it from there.