@navpreetdevpuri/base-2-n
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

base-2-n

To work with base 2^n numbers.

Usage

const a = new Base2N('\u0000', 2); // base 2
const b = new Base2N('\u0001', 2);
let c = a.add(b);
console.log(a.toString());
console.log(b.toString());
console.log(c.toString()); 
c = c.subtract(b);
console.log(c.toString() == a.toString()); // true

Package Sidebar

Install

npm i @navpreetdevpuri/base-2-n

Weekly Downloads

2

Version

2.0.1

License

ISC

Unpacked Size

13.3 kB

Total Files

8

Last publish

Collaborators

  • navpreetdevpuri