Nim Multiplication

JavaScript
The Nim Product is used in solving two-dimensional Coin Turning Games. See "Winning Ways" by Berlekamp, Conway and Guy, or my book "A Course in Game Theory". Given nonnegative integers, x and y, both less than 256, the program computes the nim product, nimprod(x,y),
    ENTER the two multiplicants

           x-value: 
           y-value: 


Nim Product:

For example, nimprod(16,255)=2