title: Using od command on linux has it backwards?
body: <p>Story of the situation, building an assembler with a pre-made assembly language. I am building the commands in my C program. It works, but it comes up backward. </p>
  
  <p>My program reads through the test case, and then afterward you should do an od on Linux on the output binary file. Here is an example of the test case, the hex assembly, and the output:</p>
  
  <pre><code>add r1 r2 r3 (11 23)
  interrupt 0 (80 00)
  </code></pre>
  
  <p>That's just a short snippet of one of my unit tests. Whenever I do the od command on linux, this is what I get:</p>
  
  <pre><code>od -x output.bin
  0000000 2311 0080
  </code></pre>
  
  <p>They get flipped backwards. Really, it should be:</p>
  
  <pre><code>0000000 1123 8000
  </code></pre>
  
  <p>I have tried using the linux command od -t x1 output.bin and that works, however it split's it by 2 bits. There has to be a way to flip the bytes.</p>