title: binary write SystemVerilog
body: <p>I tried write binary file in SystemVerilog in my testbench. </p>
  
  <pre><code>int file   = $fopen(path,"w");
  if (!file) begin
      $error("File could not be open: ", path);
      return;
  end
  $fwrite(file, "%u", 32'h4D424D42);
  $fclose(file);
  </code></pre>
  
  <p>And get result:
  02 0c 02 0c</p>
  
  <p>I use QuestaSum 10.2c.
  Why i get this result? Thanks.</p>