bit.shr

Shifts a number right

Prototype

n = bit.shr (num, bits)

Description

This takes two arguments. Both are converted to unsigned 'long long' (64-bit unsigned integers). The first argument is shifted right the number of bits in the second argument.

eg.

print (bit.shr (1024, 6)) --> 16

Lua functions

Topics