For R x R, I would mix the bits of the two numbers
[a0 a1 a2 a3...] [b0 b1 b2 b3...]
[a0 b0 a1 b1 a2 b2 a3 b3...]