Nonsense Placement Mandatory
Miss any of our Open RFC calls?Watch the recordings here! »

@extra-integer/bit-count.min

2.0.0 • Public • Published

Counts bits set in 32-bit integer (parallel method).

This is part of package extra-integer.

This is browserified, minified version of @extra-integer/bit-count.
It is exported as global variable integer_bit_count.
CDN: unpkg, jsDelivr.

integer.bitCount(x);
// x: an integer
const integer = require('extra-integer');
 
integer.bitCount(7);
// 3 (111 => 3)
 
integer.bitCount(12);
// 2 (1100 => 2)
 
integer.bitCount(63);
// 6 (111111 => 6)

references

Install

npm i @extra-integer/bit-count.min

DownloadsWeekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • avatar