fork(1) download
  1. local function sepbytes(num)
  2. local t = {};
  3. local byte = 0;
  4. repeat
  5. table.insert(t, 1, bit32.band(bit32.rshift(num, byte), 0xff));
  6. byte = byte + 8
  7. until byte > 24
  8. return table.unpack(t);
  9. end
  10.  
  11. print(sepbytes(2000));
Success #stdin #stdout 0s 2844KB
stdin
Standard input is empty
stdout
0	0	7	208