extra-bit
The bit is a basic unit of information in information theory, computing.
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.6%) to scientific vocabulary
Keywords
Repository
The bit is a basic unit of information in information theory, computing.
Basic Info
- Host: GitHub
- Owner: nodef
- License: mit
- Language: TypeScript
- Default Branch: master
- Homepage: https://www.npmjs.com/package/extra-bit
- Size: 553 KB
Statistics
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
- Releases: 1
Topics
Metadata Files
README.md
The bit is a basic unit of information in information theory, computing.
📦 Node.js,
🌐 Web,
📜 Files,
📰 Docs,
📘 Wiki.
The concept of a bit, which stands for binary digit, has been a
fundamental unit of information in the fields of information theory and
computing. Bitwise operations are used to manipulate and process data at the bit
level, and these operations are crucial for efficient programming in a variety
of domains, such as computer graphics and cryptography. JavaScript converts a
Number (a 64-bit floating point number) to a 32-bit integer when bitwise
operators (such as |) are applied. All bitwise operations are performed on
32-bit integers. This package includes bit twiddling hacks by Sean Eron
Anderson and many others.
This package is available in Node.js and Web formats. To use it on the web,
simply use the extra_bit global variable after loading with a <script>
tag from the jsDelivr CDN.
Stability: Experimental.
```javascript const xbit = require('extra-bit'); // import * as xbit from "extra-bit"; // import * as xbit from "https://unpkg.com/extra-bit/index.mjs"; (deno)
xbit.count(7); // → 3 (111 ⇒ 3)
xbit.parity(8, 2); // → 2 (10,00 ⇒ 10)
xbit.swap(6, 1, 0); // → 5 (110 ⇒ 101)
xbit.reverse(0xFFFF0000); // → 65535 (0x0000FFFF)
xbit.signExtend(15, 4); // → -1 ```
Index
| Property | Description | | ---- | ---- | | get | Get bits at specified index. | | getAs | Get bits as per mask. | | set | Set bits at specified index. | | setAs | Set bits as per mask. | | toggle | Toggle bits at specified index. | | toggleAs | Toggle bits as per mask. | | swap | Swap bit sequences at specified indices. | | scan | Find index of first set bit from LSB. | | scanReverse | Find index of first set bit from MSB. | | count | Count bits set. | | parity | Calculate n-bit parity. | | rotate | Rotate bits by a certain amount. | | reverse | Reverse all bits. | | merge | Merge bits as per mask. | | interleave | Interleave bits of two int16s. | | signExtend | Sign extend variable bit-width integer. |
References
Owner
- Name: nodef
- Login: nodef
- Kind: organization
- Website: https://nodef.github.io/
- Repositories: 119
- Profile: https://github.com/nodef
A summary of programs made with Node.js.
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Sahu
given-names: Subhajit
orcid: https://orcid.org/0000-0001-5140-6578
title: "nodef/extra-bit: A collection of common bitwise operations"
version: 2.1.0
doi: 10.5281/zenodo.6791857
date-released: 2022-07-03
GitHub Events
Total
- Push event: 2
Last Year
- Push event: 2
Committers
Last synced: 6 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Subhajit Sahu | w****7@g****m | 101 |
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 3
- Total pull requests: 46
- Average time to close issues: N/A
- Average time to close pull requests: 1 day
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.98
- Merged pull requests: 3
- Bot issues: 0
- Bot pull requests: 31
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- wolfram77 (1)
Pull Request Authors
- dependabot[bot] (6)
- wolfram77 (4)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 35
-
Total downloads:
- npm 6,400 last-month
-
Total dependent packages: 67
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 2,068
- Total maintainers: 1
npmjs.org: @extra-bit/scan-reverse.min
Finds index of first set bit from MSB.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/sign-extend
Sign extends variable bit-width integer.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/get
Gets a bit.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/sign-extend.min
Sign extends variable bit-width integer.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/get.min
Gets a bit.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/interleave
Interleaves bits of two int16s.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/set.min
Sets a bit.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/parity.min
Finds n-bit parity.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/scan-reverse
Finds index of first set bit from MSB.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/count.min
Counts bits set.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: extra-bit
The bit is a basic unit of information in information theory, computing.
- Homepage: https://github.com/nodef/extra-bit#readme
- License: MIT
-
Latest release: 2.3.1
published 9 months ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/set-as
Sets bits as per mask.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/get-as
Gets bits as per mask.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/scan.min
Finds index of first set bit from LSB.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/scan
Finds index of first set bit from LSB.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/set-as.min
Sets bits as per mask.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/set
Sets a bit.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/toggle-as
Toggles bits as per mask.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/merge
Merges bits as per mask.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/parity
Finds n-bit parity.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/toggle
Toggles a bit.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/count
Counts bits set.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/reverse
Reverses all bits.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/toggle-as.min
Toggles bits as per mask.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/toggle.min
Toggles a bit.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: extra-bit.min
The bit is a basic unit of information in information theory, computing.
- Homepage: https://github.com/nodef/extra-bit#readme
- License: MIT
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/swap
Swaps bit sequences.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/interleave.min
Interleaves bits of two int16s.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/merge.min
Merges bits as per mask.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/reverse.min
Reverses all bits.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/get-as.min
Gets bits as per mask.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.1
published over 4 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/swap.min
Swaps bit sequences.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: extra-bit.web
The bit is a basic unit of information in information theory, computing {web}.
- Homepage: https://github.com/nodef/extra-bit#readme
- License: MIT
-
Latest release: 2.3.1
published 9 months ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/rotate
Rotates bits.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
npmjs.org: @extra-bit/rotate.min
Rotates bits.
- Homepage: https://github.com/nodef/extra-bit
- License: MIT
- Status: removed
-
Latest release: 2.0.0
published almost 5 years ago
Rankings
Maintainers (1)
Dependencies
- 339 dependencies
- @rollup/plugin-commonjs ^22.0.2 development
- @rollup/plugin-node-resolve ^13.3.0 development
- @types/jest ^28.1.6 development
- extra-build ^2.2.26 development
- jest ^28.1.3 development
- rollup-plugin-cleanup ^3.2.1 development
- rollup-plugin-dts ^4.2.2 development
- ts-jest ^28.0.7 development
- actions/checkout v3 composite
- actions/setup-node v2 composite
- coverallsapp/github-action master composite
- paambaati/codeclimate-action v3.0.0 composite
- actions/checkout v3 composite
- actions/setup-node v2 composite
