Home page logo
/
Zenmap screenshot
Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
Example Nmap output

Library bit

Bitwise operations on integers.

THIS LIBRARY IS DEPRECATED, Please use native Lua 5.3 bitwise operators.

Copyright© BSD License

Source: http://nmap.org/svn/nselib/bit.lua

Functions

arshift (a, b)

Returns a arithmetically right-shifted by b places.

band (a, b, ...)

Returns the bitwise and of all its arguments.

bnot (a)

Returns the one's complement of a.

bor (a, b, ...)

Returns the bitwise or of all its arguments.

bxor (a, b, ...)

Returns the bitwise exclusive or of all its arguments.

lshift (a, b)

Returns a left-shifted by b places.

mod (a, b)

Returns the integer remainder of a divided by b.

rshift (a, b)

Returns a right-shifted by b places.



Functions

arshift (a, b)

Returns a arithmetically right-shifted by b places.

Parameters

  • a: Number to perform the shift on.
  • b: Number of shifts.
band (a, b, ...)

Returns the bitwise and of all its arguments.

Parameters

  • a:
  • b:
  • ...: A variable number of Numbers to and.

Return value:

The anded result.
bnot (a)

Returns the one's complement of a.

Parameters

  • a: Number.

Return value:

The one's complement of a.
bor (a, b, ...)

Returns the bitwise or of all its arguments.

Parameters

  • a:
  • b:
  • ...: A variable number of Numbers to or.

Return value:

The ored result.
bxor (a, b, ...)

Returns the bitwise exclusive or of all its arguments.

Parameters

  • a:
  • b:
  • ...: A variable number of Numbers to exclusive or.

Return value:

The exclusive ored result.
lshift (a, b)

Returns a left-shifted by b places.

Parameters

  • a: Number to perform the shift on.
  • b: Number of shifts.
mod (a, b)

Returns the integer remainder of a divided by b.

Parameters

  • a: Dividend.
  • b: Divisor.
rshift (a, b)

Returns a right-shifted by b places.

Parameters

  • a: Number to perform the shift on.
  • b: Number of shifts.

Nmap Site Navigation

Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]