title: Difference between binary and text file in terms of storage?
body: <p>I want to ask few questions about bits and bytes as I am very confused.</p>
  
  <ol>
  <li><p>For example, suppose I have a <code>short int x = 345;</code>. I know that short take 16 bits, so when I write the short in a file it is written as char '3' , '4' ,'5' each containing 1 bytes so total of 24 bits. 
  Is there a way to write the number (short integer) in file  as short integer taking 16 bits?</p></li>
  <li><p>Also am I right in my concept? What will be the difference in writing to my file if the file is binary or text in terms of bytes?</p></li>
  </ol>