New answers tagged binary
1
vote
Count how many distance sequences are far from all others
Python, with igraph
Port of @Christian Sievers's C++ answer in Python.
...
1
vote
Construct a uInt from an array of bits
AWK, 42 bytes
{for(i=NF;i;i--)s+=x?($i*2)^(x++):x++}$0=s
Attempt This Online!
0
votes
Numbers with multiple runs of ones
C, 78 bytes
long i,j;main(){for(scanf("%ld",&j);!(++i>>j);)i&-~(i|~-i)&&printf("%ld ",i);}
Based on @Alchymist's entry, ...
0
votes
Numbers with multiple runs of ones
05AB1E, 8 7 bytes
oLʒb01å
-1 byte porting @xnor's first Python approach
Try it online or verify all test cases.
Original approach (8 bytes):
...
Top 50 recent answers are included
Related Tags
binary × 243code-golf × 226
number × 46
sequence × 41
base-conversion × 30
math × 24
string × 22
integer × 21
bitwise × 15
decision-problem × 14
arithmetic × 9
encoding × 9
ascii-art × 8
number-theory × 8
fastest-code × 7
combinatorics × 6
primes × 6
restricted-source × 5
coding-theory × 5
code-challenge × 4
tips × 4
subsequence × 4
palindrome × 4
conversion × 4
binary-matrix × 4