Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ones = 13 + rnd(5) --Generating number with 14, 15, 16, 17 or 18 ones
- for bitn = 32, 1, -1 do
- local got = 0
- if rnd(bitn) <= ones then
- got = 1
- end
- ones = ones - got
- num = bit.rol(bit.bor(num, got), 1)
- end
- print("num", bit.tohex(num))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement