title: character to binary conversion in C++ two characters at a time to get 16 bit binary form
body: <p>Hello i want to convert two characters at a time in a string to binary? how can i do that by applying simple arithmetic (that is by making my own function?)</p>
  
  <p>For example: our string is = <code>hello world</code>: </p>
  
  <p>Desired output (two characters at a time):</p>
  
  <pre><code> he       // need binaryform of 0's and 1's (16 bits for 2 characters 'h' and 'e'
   ll       // similarly
   o(space) // single space also counts as a character with 8 zero bit in binary.
   wo
   rl
   d(space) // space equals a character again with 8 zero bits
  </code></pre>
  
  <p>how to go about with it. i dont want any ascii in between. directly from character to binary...is that possible? </p>