title: How to view the machine language of a compiled c++ file?
body: <p>I wrote a simple c++ program that prints "Hello World!"</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  int main(){
  cout&lt;&lt;"Hello World!\n";
  }
  </code></pre>
  
  <p>I then compiled it using g++</p>
  
  <pre><code>$ g++ Desktop/sample.cpp -o Desktop/hello
  </code></pre>
  
  <p>How would I be able to view the machine language, is it just </p>
  
  <pre><code>$ less Desktop/hello
  </code></pre>
  
  <p>?</p>
  
  <p>I'm just curious to see what "machine language" looks like.  Here's a sample from the above command</p>
  
  <pre><code>C&gt;^D&lt;A1&gt;&lt;F4&gt;&lt;9E&gt;^D^H&lt;83&gt;&lt;F8&gt;&lt;FF&gt;t^S&lt;BB&gt;&lt;F4&gt;&lt;9E&gt;^D^Hf&lt;90&gt;&lt;83&gt;&lt;EB&gt;^D&lt;FF&gt;Ћ^C&lt;83&gt;&lt;F8&gt;&lt;FF&gt;u&lt;F4&gt;&lt;83&gt;&lt;C4&gt;^D[]Ð&lt;90&gt;U
  &lt;89&gt;&lt;E5&gt;S&lt;83&gt;&lt;EC&gt;^D&lt;E8&gt;^@^@^@^@[&lt;81&gt;Ì^X^@^@&lt;E8&gt;&lt;&lt;FE&gt;&lt;FF&gt;&lt;FF&gt;Y[&lt;C9&gt;&lt;C3&gt;^C^@^@^@^A^@^B^@Hello World!
  ^@^@^@^AESC^C; ^@^@^@^C^@^@^@&lt;A4&gt;&lt;FE&gt;&lt;FF&gt;&lt;FF&gt;@^@^@^@&lt;C8&gt;&lt;FE&gt;&lt;FF&gt;&lt;FF&gt;\^@^@^@^H&lt;FF&gt;&lt;FF&gt;&lt;FF&gt;x^@^
  </code></pre>