title: how does assembler convert from assembly to machine code?
body: <p>I know this has been asked many times, but I am looking for a simple interpretation.</p>
  <p>Let's say I have some assembly code that C++ compiler generated.</p>
  <p>Now assembler kicks in and it has to transform the assembly code into machine code.</p>
  <p><strong>Question 1).</strong> Will the C++ assembler compiler look at the table where each assembly instruction has the corresponding machine code instruction ?</p>
  <p><strong>Question 2).</strong> If the C++ program runs on the intel processor, then, assembler needs to take a look at the table published by Intel team, right ? because in the end, C++ program runs on the intel processor.</p>
  <p><strong>Question 3).</strong> If I am right about the question 2, then how is it possible that program written in C++ can be run on the computer which uses Intel and on the computer which uses AMD processor ?</p>