2.0.0 • Published 5 years ago

@extra-integer/bit-interleave v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Interleaves bits of two 16-bit integers to form 32-bit integer (binary magic method).

This is part of package extra-integer.

integer.bitInterleave(x, y);
// x: first 16-bit integer
// y: second 16-bit integer
const integer = require('extra-integer');

integer.bitInterleave(0x0000, 0xFFFF);
// 1431655765 (0x55555555)

integer.bitInterleave(0x1234, 0x1234);
// 51121968 (0x030C0F30)

integer.bitInterleave(0x1234, 0x4321);
// 302845473 (0x120D0E21)

references

2.0.0

5 years ago

1.2.19

5 years ago

1.2.20

5 years ago

1.1.7

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.0

7 years ago

1.0.13

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.1.2

7 years ago