Library bits
Bit manipulation library.
Author:
Copyright © Same as Nmap -- see https://nmap.org/book/man-legal.html
Source: https://svn.nmap.org/nmap/nselib/bits.lua
Functions
- arshift (a, b)
Returns
a
arithmetically right-shifted byb
places.- reverse (n, size)
Reverses bits in integer.
Functions
- arshift (a, b)
-
Returns
a
arithmetically right-shifted byb
places.Parameters
- a
- Number to perform the shift on.
- b
- Number of shifts.
- reverse (n, size)
-
Reverses bits in integer.
Parameters
- n
- The integer.
- size
- The bit width of the integer (default: 8).
Return value:
The reversed integer.