Bit32 Library
Bit Divide:
<int> bit.bdiv(<uint> dividend, <uint> divisor)  
- Divides 
dividendbydivisor, remainder is not returned. 
Bit Add:
<int> bit.badd(<uint> a, <uint> b)  
- Adds 
awithb, allows overflows. 
Bit Subtract:
<int> bit.bsub(<uint> a, <uint> b)  
- Subtracts 
awithb, allows overflows. 
Bit Multiply:
<int> bit.bmul(<uint> a, <uint> b)  
- Multiplies 
ausingb, allows overflows. 
Bit And:
<int> bit.band(<uint> x, <uint> disp)
- Returns the bitwise and of its operands.
 
Bit Or:
<int> bit.bor(<uint> x, <uint> disp)
- Returns the bitwise or of its operands.
 
Bit Xor:
<int> bit.bxor(<uint> x, <uint> disp)
- Returns the bitwise exclusive or of its operands.
 
Bit Not:
<int> bit.bnot(<uint> x)
- Returns the bitwise negation of 
x. 
To Hex:
<string> bit.tohex(<uint> val)  
- Returns 
valto a hex string. 
To Bit:
<int> bit.tobit(<uint> val)  
- Returns 
valinto proper form for bitwise operations. 
Left Shift:
<int> bit.lshift(<uint> x, <uint> disp)
- Returns the number 
xshifteddispbits to the left. 
Right Shift:
<int> bit.rshift(<uint> x, <uint> disp)
- Returns the number 
xshifteddispbits to the left. 
Arithmetic Shift:
<int> bit.arshift(<int> x, <int> disp)
- 
Returns the number
xshifteddispbits to the right. The numberdispmay be any representable integer. Negative displacements shift to the left.- This shift operation is what is called an arithmetic shift. Vacant bits on the left are filled with copies of the higher bit of 
x; vacant bits on the right are filled with zeros. In particular, displacements with absolute values higher than 31 result in zero or0xFFFFFFFF(all original bits are shifted out). 
 - This shift operation is what is called an arithmetic shift. Vacant bits on the left are filled with copies of the higher bit of