If you can get 0 and 1 as random numbers and you need 1 and 2 then have a guess what you need to do. What's the difference between 1->2 and 0->1.