title: Bitwise operators: How to check if source port is great than 32767 (0x7FFF)
body: <p>I have a program that reads a binary file of 20 bytes, modifies the data and then write on another binary file. I am trying to check if the source port is bigger than 32767  or(0x7FFF).
  If it is bigger then I must zero out the most significant two bits of it. I am only allowed to use bitwise operators. Anybody has any idea how could I do it? Thanks.</p>
  <pre><code>Data: 32 27 A9 49 03 8C BD 89 01 87 9B 8D 50 13 00 00 FF FF 00 00
  Source port: 32 27 (16 bits)
  
  void modify(const unsigned char oldData [], unsigned char newData []){
  
  /*Accessing the souce port oldData[0] and oldData[1].*/
  
  
  }
  </code></pre>