-
Notifications
You must be signed in to change notification settings - Fork 1
get
Subhajit Sahu edited this page Jul 25, 2022
·
14 revisions
Get bits at specified index.
get(x, i)
// x: an int32
// i: bit index
const xbit = require('extra-bit');
xbit.get(6, 0);
// → 0 (110,0 ⇒ 0)
xbit.get(6, 1);
// → 1 (110,1 ⇒ 1)
xbit.get(6, 2);
// → 1 (110,2 ⇒ 1)