   Integer Noise without Bitwise Operations
  I am attempting to implement the 'standard' integer noise function in HLSL (Shader Model 3) which means that I don't have access to the normal bitwise/shift operators. Can anyone please recommend a resource on how I might be able to work around this restriction?Here is what I am working with as a base (still with the bitshifts, etc):double IntegerNoise (int n){  n = (n >> 13) ^ n;  int nn = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;  return 1.0 - ((double)nn / 1073741824.0);}Thanks!   
  I believe these are equivalent operations, someone can correct me if my bit math is rusty:n >> 13 == n / 2^13n & 0x7fffffff == (n>0) ? n : n + 2^31EDIT: for "&0x7fffffff" you might be able to get away with just abs(n) seeing as how this is just a noise function. All the & is doing is dropping the negative/positive bit from the integer, but this is different from a true absolute value.If nn is supposed to be an even distribution of all numbers from 0..2^31 then you can probably do without the +2^31, as you'll end up with the same random distribution. If its not a distribution in that range then you should probably do the addition as well.   