title: algorithm to generate relative precedence number
body: <p>I want to write a module/function, which takes input an unsigned integer(32-bit) and outputs 8-bit value. <strong>output values must be in relative order as input.</strong>
  and the <strong>output value once assigned should not be altered</strong>.</p>
  
  <p>testing:</p>
  
  <p>input: randomly generated 32-bit integer</p>
  
  <p>output: in range 0-255</p>
  
  <p>repeat the action 256 times.. till the output values are exhausted.</p>
  
  <p><strong>all output values should be relatively in same order as input values.</strong></p>
  
  <p><strong>EDIT:</strong> Based on comments, it is impossible to find a perfect solution for this.
  However, Can we find best solution possible. i.e without comparing the input(32-bit) values.. generating relative order output of size 8-bit.</p>