Renamed to nodef/extra-bit.elm. That is where the repository lives now. It has not been published as a package under the new name.
Versions published as elmw/extra-bit still install under that name. 15 versions of 15 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/nodef/extra-bit.elm.
What we checked: The repo moved to github.com/nodef/extra-bit.elm. Rebuilt with git archive from commit dc41de82e828 of https://github.com/nodef/extra-bit.elm (zip prefix elmw-extra-bit-8e23e36/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 b967513ce30c4b4ffa3ca8309a003f66693d6ffd.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details ยท package.elm-lang.org's zip: https://github.com/elmw/extra-bit/zipball/1.0.12/
Get a bit. ๐
-- x: an Int
-- i: bit index
get 6 0 == 0 -- 110,0 โ 0
get 6 1 == 1 -- 110,1 โ 1
get 6 2 == 1 -- 110,2 โ 1Get bits as per mask. ๐
-- x: an Int
-- m: bit mask
getAs 6 4 == 4 -- 110,100 โ 100
getAs 6 7 == 6 -- 110,111 โ 110
getAs 6 5 == 4 -- 110,101 โ 100Interleave bits of two Int16s. ๐
-- x: first Int16
-- y: second Int16
interleave 0x0000 0xFFFF == 1431655765 -- 0x55555555
interleave 0x1234 0x1234 == 51121968 -- 0x030C0F30
interleave 0x1234 0x4321 == 302845473 -- 0x120D0E21Merge bits as per mask. ๐
-- x: first Int
-- y: second Int
-- m: bit mask (0 โ from x)
merge 0x12 0x24 0x0F == 20 -- 0x14
merge 0x1234 0xABCD 0x0F0F == 6973 -- 0x1B3D
merge 0xAAAA 0xBBBB 0x3333 == 48059 -- 0xBBBBGet n-bit parity. ๐
-- x: an Int
-- n: number of bits (1)
parity 7 1 == 1 -- 1,1,1 โ 1
parity 5 1 == 0 -- 1,0,1 โ 0
parity 8 2 == 2 -- 10,00 โ 10
parity 63 4 == 12 -- 11,1111 โ 1100Reverse all bits. ๐
-- x: an Int
reverse 0xFFFF0000 == 65535 -- 0x0000FFFF
reverse 0x00AABBCC == 870143232 -- 0x33DD5500
reverse 0x1234 == 742916096 -- 0x2C480000Rotate bits. ๐
-- x: an Int
-- n: rotate amount (+ve: left, -ve: right)
rotate 0x11112222 4 == 286401057 -- 0x11122221
rotate 0x11112222 -4 == 554766882 -- 0x21111222Get index of first set bit from LSB. ๐
-- x: an Int
scan 7 == 0 -- 111 โ 0
scan 12 == 2 -- 1100 โ 2
scan 64 == 6 -- 1000000 โ 6Gets index of first set bit from MSB. ๐
-- x: an Int
scanReverse 13 == 3 -- 1101 โ 3
scanReverse 5 == 2 -- 101 โ 2
scanReverse 1 == 0 -- 1 โ 0Set a bit. ๐
-- x: an Int
-- i: bit index
-- f: bit value (1)
set 6 0 1 == 7 -- 110,0,1 โ 111
set 6 2 1 == 6 -- 110,2,1 โ 110
set 6 2 0 == 2 -- 110,2,0 โ 010Set bits as per mask. ๐
-- x: an Int
-- m: bit mask
-- f: bit value (1)
setAs 8 2 1 == 10 -- 0x8 set 0x2 โ 0xA
setAs 15 3 0 == 12 -- 0xF clear 0x3 โ 0xC
setAs 0x1234 0x430 1 == 5684 -- 0x1234 set 0x430 โ 0x1634Sign extend variable bit-width integer. ๐
-- x: variable bit-width Int
-- w: bit width (32)
signExtend 15 4 == -1 -- 1111 โ -1
signExtend 3 3 == 3 -- 011 โ 3
signExtend 4 3 == -4 -- 100 โ -4Swap bit sequences. ๐
-- x: an Int
-- i: first bit index
-- j: second bit index
-- n: bit width (1)
swap 6 1 0 1 == 5 -- 110 โ 101
swap 0x1234 8 4 4 == 4900 -- 0x1234 โ 0x1324
swap 0x4AAB 8 0 8 == 43850 -- 0x4AAB โ 0xAB4AToggle a bit. ๐
-- x: an Int
-- i: bit index
toggle 6 0 == 7 -- 110,0 โ 111
toggle 6 1 == 4 -- 110,1 โ 100
toggle 6 2 == 2 -- 110,2 โ 010
Count bits set. ๐