title: efficient way to convert 16 bit value to 8 bit value
body: <p>I have a variable that holds 16-bit value. I need only 8 LSB. Rest 8 bits needs to be discarded. </p>
  
  <p>I am using this code for doing this. </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdint.h&gt;
  int main(int argc, char *argv[])
  {
      int linkIndx,size=128;
  
      uint16_t val = 0xABCD;
      uint8_t vr;
  
      vr = val; //this assignment discards upper 8-bits 
  
      printf("0x%X 0x%X ", val, vr);
  }
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>0xABCD 0xCD
  </code></pre>
  
  <p>I want to know, Is it a good way to take 8 LSB from 16 bit variable?</p>
  
  <p><strong>EDIT:</strong><br>
  Please add performance issues (from memory and speed perspective) with this particular way of implementation.  </p>