title: How machine code to specific processor?
body: <p>As we know each <code>processor</code> has its own instruction set (ex-8085 processor has its own INSTRUCTION SET).So to execute any instruction by using that processor 
  the instruction must be one of from its instruction set (means we can execute only that instruction on 8085 processor which belongs from 8085 instruction set).</p>
  
  <p>so here my question is if we write any program (assume we write program using c language) then after compiling using compiler( as we know compiler generates code which is executable on machine ex..gcc or turbo c) it generates code which is used to run on machine i.e the code (set of instruction which belongs from that processor INSTRUCTION SET) to execute on processor.so how our compiler knows which processor we are using and converts the whole program to instructions which are executable by our processor.</p>
  
  <p>example-
  1) if we install turbo c on machine which has Pentium processor.so if we execute our c program on this machine it must convert whole program to set of instruction which belong from Pentium processor INSTRUCTION SET And if we install turbo c on machine which has i5 processor then it must convert the whole program to set of instruction which belongs from i7 processor INSTRUCTION SET.</p>
  
  <p>so how the compiler knows which processor we are using and why the compiler is different for OS it must be different for the processor according to above explanation?</p>
  
  <p>(i'm finding an answer to this question from long time and SORRY FOR lengthy statement)</p>