title: How does XorShift32 works?
body: <p>I have this homework where i need to implement xorshift32(i can t use anything else) so i can generate some numbers but i don t understand how the algorithm works or how to implement it. </p>
  
  <p>I am trying to print the generated number but i don t know how to call the xorshift32 function because of the state[static 1] argument.</p>
  
  <pre><code>uint32_t xorshift32(uint32_t state[static 1])
  {
      uint32_t x = state[0];
      x ^= x &lt;&lt; 13;
      x ^= x &gt;&gt; 17;
      x ^= x &lt;&lt; 5;
      state[0] = x;
      return x;
  }
  </code></pre>
  
  <p>I do not have much information on xorshft32 other that what is on wikipedia(en.wikipedia.org/wiki/Xorshift).</p>