# How does computer work? [duplicate]

I am not a computer scientist or even a student of CS. I just want to find more information and would like if someone could put if in right direction about how actually computer works. I understand that when we write program in C++, it's been compiled to assembly language and then into machine code. How can all this functions be understood by a machine?
And how can all this functions be executed if assembler can only work with such simple commands like MOV(move some data to CPU register), SUB, ADD and others. How does actually "print" command work? Is there a course, a book or a series of artices for teaching me all that stuff? Thanks in advance

• This question is very broad, and I don't think it is answerable in a few paragraphs, so it seems to me to be too broad to be a good fit here. I don't know if others would agree with that. Any community votes? I suggest you find a good book on assembly language, and a good book on computer architecture, and study them; they will contain information about this. You might also enjoy cs.stackexchange.com/q/47410/755. – D.W. Mar 12 '19 at 5:40
• @D.W. i saw simple functions in C, which are then transformed into assembly. But how all this print functions, class declarations work? Would it be enough to read only about assembly language and computer architecture? – Artem Zaichikov Mar 12 '19 at 5:48
• Those are a lot of questions. I suggest you first do that study. Then, if there are specific things you're confused about, ask about those. "How does print work?" is a very different question from "How do class declarations work?", and at a bare minimum should be asked separately. But do the reading first, and then you'll be able to ask a more specific question and show what level of understanding you already have and what research you've done. – D.W. Mar 12 '19 at 6:29
• Whaich books can you advice a beginner like me? Thanks in advance – Artem Zaichikov Mar 12 '19 at 9:48