# Tag Info

### The first n numbers without consecutive equal binary digits

Python 2, 36 bytes lambda n:[2**i*2/3for i in range(n)] Try it online! Explanation: The binary representation of $\frac{2}3$ is ...
• 169k
Accepted

### Binary to decimal converter

Jelly, 5 bytes DḤ+¥/ Try it online! Explanation The cast D is a monad (single argument function): digits, turning ...
• 68.2k

### How on earth did llhuii output the Evil Numbers in 42 bytes of Python?

This isn't the same solution as llhuii's, but it's also 42 bytes long. n=0;exec'print n;n^=(n^n+2)%3/2;n+=2;'*400 Try it online! Thanks to @JonathanFrech, we're ...
• 210k

### Fizz Buzz to Text

C, 59 bytes i;f(char*s){while(*s&3?*s&9||(i+=i+*s%5):putchar(i),*s++);} Magic numbers, magic numbers everywhere! (Also, C shorter than Python, JS, PHP, ...
• 71.4k

### How on earth did llhuii output the Evil Numbers in 42 bytes of Python?

Getting 39 bytes This is an explanation of how I got a 39-byte solution, which Dennis and JonathanFrech found separately as well. Or, rather, it explains how one could arrive at the answer in ...
• 145k

### i love yOu i lOve you i love yOu!

Jelly, 41 40 35 33 bytes Thanks to @Dennis for making the end ṖṖCG! (complement C = 1-x in ...
• 105k

### Where's the 0xBEEF?

vim, 126 80 77 76 /\v1011\_.{9}(1110\_.{9}){2}1111<cr>:exe'norm Go'.join(getpos('.'))<cr>xxdawhPXXd{ Expects input in the form ...
• 71.4k

### Find the number of leading zeroes in a 64-bit integer

x86_64 machine language on Linux, 6 bytes 0: f3 48 0f bd c7 lzcnt %rdi,%rax 5: c3 ret Requires Haswell or K10 or ...
• 7,485
Accepted

### Sum of Powers of 2

JavaScript (ES6), 28 bytes f=n=>n?[...f(n&~-n),n&-n]:[] Try it online!
• 191k

### Output numbers up to 2^n-1, "sorted"

Python, 53 bytes f=lambda n,i=1:n*[f]and[i]+f(n-1,2*i)+i%2*f(n-1,i-~i) Try it online! The recursive function generates the sorted list as a pre-order walk down ...
• 145k

### In how many bits do I fit

JavaScript (ES6), 18 bytes f=n=>n&&1+f(n>>>1) ...
• 49.9k

### Bit run rundown

Python 2, 46 45 bytes f=lambda n,k=1:kin bin(n^n/2)and-~f(n,k*10) Try it online! How it works By XORing n and n/2 (dividing by 2 essentially chops off the ...
• 210k

### Is the number binary-heavy?

x86 Machine Code, 15 14 bytes F3 0F B8 C1 0F BD D1 03 C0 42 2B D0 D6 C3 This is a function using Microsoft's __fastcall calling convention (first and only ...
• 451
Accepted

### Where's the 0xBEEF?

Jelly, 20 17 16 bytes ṡ€4ḄZw€“¿ÇÇÐ‘ĖUṀ Input is in form of a Boolean matrix, output is the 1-based index pair (Y, X). Try it online! or verify all test cases. ...
• 210k
Accepted

### In how many bits do I fit

05AB1E, 2 bytes bg Try it online!
• 20.7k

### Weakened Binary Walls

MATL, 4 bytes BSXB Try it at MATL Online Explanation ...
• 11.1k

### In how many bits do I fit

x86 Assembly, 4 bytes Assuming Constant in EBX: bsr eax,ebx inc eax EAX contains the number of bits necessary for Constant. ...
• 399

### Only Even Bytes

GS2, 4 bytes dΦ(" Try it online! Hexdump 0000000: 64 e8 28 22 d.(" How it works ...
• 210k

### Find the "Bittiest" Number

x86 Machine Language, 18 bytes 31 D2 AD F3 0F B8 F8 39 FA 77 03 87 FA 93 E2 F2 93 C3 The above bytes define a function that accepts the address of the array in ...

### Calculate the longest series of 1's in an integer's binary value

JavaScript (ES6),  33  32 bytes f=x=>x&(k=x>>1)?f(x&k):k&&1+f(k) Try it online! JavaScript (ES6),  41 40 36  34 bytes Saved 4 bytes ...
• 191k

### Find the number of leading zeroes in a 64-bit integer

Hexagony, 78 70 bytes 2"1"\.}/{}A=<\?>(<$\*}[_(A\".{}."&.'\&=/.."!=\2'%<..(@.>._.\=\{}:"<><$ Try it online! Isn't this challenge ...
• 17.3k

### Is it a Cyclops number? "Nobody" knows!

Python 2, 30 bytes lambda n:(2*n^2*n+3)**2==8*n+9 Try it online! Note that 2*n^2*n+3 is the bitwise xor of ...
• 145k

### JFor? More like XNor

Python, 34 bytes lambda a,b:bin(a&b).count('01')==1 Try it online! Although this doesn't use xor, I'm xnor.
• 145k

### i love yOu i lOve you i love yOu!

JavaScript (ES6), 169 ... 136 135 bytes ...
• 191k

### Where's the 0xBEEF?

JavaScript (ES6), 63 60 56 bytes s=>[(i=s.search(/1011.{9}(1110.{9}){2}1111/))%13,i/13|0] Takes input as a 155-character space-delimited string of 12 12-digit ...
• 169k

### Complex Binary Numbers

MATL, 7 bytes BJ*Y'^s Try it online! How it works Consider input 4538 for example. ...
• 104k

### Binary to decimal converter

Python 2, 49 37 31 30 Bytes Now this will take a binary number in a decimal representation, since Python can handle arbitrarily large integers. ...
• 7,862

### What is the reverse (binary) bit number?

Python, 29 bytes lambda n:int(bin(n)[:1:-1],2) Try it online! This is an anonymous, unnamed function which returns the result. First, ...
• 14.6k