[Question]
  [
## Challenge
You need to generate a program or function that takes in a positive integer N, calculates the first N terms of the Fibonacci sequence in binary, concatenates it into a single binary number, converts that number back to decimal, and then outputs the decimal as an integer.
For example
```
1 -> [0] -> 0 to decimal outputs 0
3 -> [0, 1, 1] -> 011 to decimal outputs 3
4 -> [0, 1, 1, 10] -> 01110 to decimal outputs 14
```
You do not need to output the `->`, just the number (e.g. if the user types `4`, just output `14`). The arrows are just to help explain what the program must do.
## Test cases
```
1 -> 0
2 -> 1
3 -> 3
4 -> 14
5 -> 59
6 -> 477
7 -> 7640
8 -> 122253
9 -> 3912117
10 -> 250375522
11 -> 16024033463
12 -> 2051076283353
13 -> 525075528538512
14 -> 134419335305859305
15 -> 68822699676599964537
16 -> 70474444468838363686498
17 -> 72165831136090484414974939
18 -> 147795622166713312081868676669
19 -> 605370868394857726287334099638808
20 -> 4959198153890674493745840944241119317
```
The program must be able to output up to the limit of the language in use. No lookup tables or [common workarounds](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) allowed.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the answer with the shortest number of bytes wins!
  
[Answer]
# [Python](https://docs.python.org/), 64 bytes
```
f=lambda n,a=0,b=1,r=0:n and f(n-1,b,a+b,r<<len(bin(a))-2|a)or r
```
[Try it online!](https://tio.run/##DcxBDoMgEAXQdXuK2QnpkAjdEeldhigtif2aiRtjPTt185Zv3bfPgmdrJc3yzaMQWFLPOXnW1EeQYKRi4DxnlkdmHYZ5gskVRqx14Sd2UdJWLkEVpIL3ZDxT8Dbeb6tWbKZ0B2I4yb3ouDZ7drb9AQ "Python 3 – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~7~~ 6 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ḶÆḞBẎḄ
```
**[Try it online!](https://tio.run/##ARoA5f9qZWxsef//4bi2w4bhuJ5C4bqO4biE////NA "Jelly – Try It Online")**
### How?
```
ḶÆḞBẎḄ - Link: integer, n
Ḷ      - lowered range -> [0,1,2,3,4,5,...,n]
 ÆḞ    - Fibonacci (vectorises) -> [0,1,1,2,3,5...,F(n)]
   B   - to binary (vectorises) -> [[0],[1],[1],[1,0],[1,1],[1,0,1],...,B(F(n))]
    Ẏ  - tighten -> [0,1,1,1,0,1,1,1,0,1,...,B(F(n))[0],B(F(n))[1],...]
     Ḅ - from binary -> answer
```
[Answer]
# [Python 3.6](https://docs.python.org/3/), 61 bytes
```
f=lambda n,a=0,b=1:n and int(f'{a:b}{f(n-1,b,a+b)*2:b}',2)//2
```
[Try it online!](https://tio.run/##LYxBCsIwEADP@oq9JatbatZbIP5llxoVdFtCL6Xk7WkLXoeZmZb5Pdq9tZy@8tNBwEjSjTSFaCA2wMdmn90qUeuavXWBlOSqeOGdOGLse255LGC7CkXs9fSBgAPG82kq/9wiV@gecCywOmwb "Python 3 – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 7 bytes
```
ḋṁḋ↑Θİf
```
[Try it online!](https://tio.run/##yygtzv7//@GO7oc7G4Hko7aJ52Yc2ZD2//9/IwMA "Husk – Try It Online")
### Explanation
```
ḋṁḋ↑Θİf                              4
     İf    The Fibonacci numbers     [1,1,2,3,5,8..]
    Θ      Prepends 0                [0,1,1,2,3,5..]
   ↑     Take n elements from list   [0,1,1,2]
  ḋ        Convert to binary digits  [[0],[1],[1],[1,0]]
 ṁ       Map function then concat    [0,1,1,1,0]
ḋ        Convert from base 2         14
```
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 397 bytes
```
>,[<++++++[->--------<]>>[->++++++++++<]>[-<+>]<<[->+<],]>+[-<<+>>[-[->+<]<<[->+>+<<]<[->+>+<<]>[-<+>]>>[-<<+>>]>]]<<[->+>>>>>+<<<<<<]>[-<+>]>+>>+>>>+<[[->-[<<]>]>[[-]<<<<<<<[->>[-<+>>+<]>[-<+>]<<<]<[->+>>>>>+<<<<<<]>[-<+>]>[-<+>]>[->>[-<+<<+>>>]<[->+<]<]>+>[-]>>+>]<<<<<[[->++>+>++<<<]>[-<+>]<<]>>>]>[-]<<<[-]<<[-]<<->[>++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>>>]<+[->++++++[-<++++++++>]<.<<<+]
```
Well, that was fun!
Takes ASCII input (e.g. `11`), outputs result in ASCII.
Note: to try this online, make sure you set the cell size to 32 bits (on the right side of the webpage). **If you do not enter an input, your browser might crash.**
The interpreter cannot handle input of `11` and higher because it only supports up to 32 bits.
[Try it on copy.sh](https://copy.sh/brainfuck/?c=PixbPCsrKysrK1stPi0tLS0tLS0tPF0-PlstPisrKysrKysrKys8XT5bLTwrPl08PFstPis8XSxdPitbLTw8Kz4-Wy1bLT4rPF08PFstPis-Kzw8XTxbLT4rPis8PF0-Wy08Kz5dPj5bLTw8Kz4-XT5dXTw8Wy0-Kz4-Pj4-Kzw8PDw8PF0-Wy08Kz5dPis-Pis-Pj4rPFtbLT4tWzw8XT5dPltbLV08PDw8PDw8Wy0-PlstPCs-Pis8XT5bLTwrPl08PDxdPFstPis-Pj4-Pis8PDw8PDxdPlstPCs-XT5bLTwrPl0-Wy0-PlstPCs8PCs-Pj5dPFstPis8XTxdPis-Wy1dPj4rPl08PDw8PFtbLT4rKz4rPisrPDw8XT5bLTwrPl08PF0-Pj5dPlstXTw8PFstXTw8Wy1dPDwtPls-KysrKysrKysrKzxbLT4tWz4rPj5dPlsrWy08Kz5dPis-Pl08PDw8PF0-Pj5dPCtbLT4rKysrKytbLTwrKysrKysrKz5dPC48PDwrXQ$$)
## Explanation
```
>,[<++++++[->--------<]>>[->++++++++++<]>[-<+>]<<[->+<],]>+
```
Get decimal input and add one (to mitigate off-by-one)
```
[-<<+>>[-[->+<]<<[->+>+<<]<[->+>+<<]>[-<+>]>>[-<<+>>]>]]
```
Generate fibonacci numbers on the tape.
```
<<[->+>>>>>+<<<<<<]>[-<+>]>+>>+>>>+<
```
Set up for the incoming binary concatenation loop
---
So the cells contain the value, starting from the first position,
```
1 | 0 | 1 | 1 | 2 | 3 | 5 | ... | f_n | 0 | 1 | 0 | 1 | 0 | f_n | 1 | 0 | 0 | 0...
```
Look at these cells:
```
f_n | 0 | 1 | 0 | 1 | 0 | f_n | 1
```
I'll label this:
```
num | sum | cat | 0 | pow | 0 | num | pow
```
`pow` is there to find the maximal power of 2 that is strictly greater than `num`. `sum` is the concatenation of numbers so far. `cat` is the power of 2 that I would need to multiply the `num` in order to concatenate `num` in front of the `sum` (so I would be able to simply add).
---
```
[[->-[<<]>]>
```
**Loop: Check whether `f_n` is strictly less than `pow`.**
**Truthy:**
```
[[-]<<<<<<<[->>[-<+>>+<]>[-<+>]<<<]<[->+>>>>>+<<<<<<]>[-<+>]>[-<+>]>[->>[-<+<<+>>>]<[->+<]<]>+>[-]>>+>]
```
Zero out junk. Then, add `num` \* `cat` to `sum`. Next, load the next Fibonacci number (= `f_(n-1)`; if it doesn't exist, exit loop) and set `cat` to `cat` \* `pow`. Prepare for next loop (zero out more junk, shift scope by one).
**Falsey:**
```
<<<<<[[->++>+>++<<<]>[-<+>]<<]
```
Set `pow` to 2 \* `pow`, restore `num`.
```
]
```
Repeat until there is no Fibonacci number left.
---
```
>[-]<<<[-]<<[-]<<->[>++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>>>]<+[->++++++[-<++++++++>]<.<<<+]
```
Clean garbage. Take each digit of the resulting number and output each (in ascii).
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 9 bytes
```
ÆMgX ¤Ã¬Í
```
[Run it](https://ethproductions.github.io/japt/?v=1.4.5&code=xk1nWCCkw6zN&input=NA==)
## Explanation:
```
ÆMgX ¤Ã¬Í
Æ     Ã     | Iterate X through the range [0...Input]
 MgX        |   Xth Fibonacci number
     ¤      |   Binary
       ¬    | Join into a string
        Í   | Convert into a base-2 number
```
[Answer]
# Pyth, 22 bytes
```
JU2VQ=+Js>2J)is.BM<JQ2
```
[Try it here](http://pyth.herokuapp.com/?code=JU2VQ%3D%2BJs%3E2J%29is.BM%3CJQ2&input=32&debug=0)
### Explanation
```
JU2VQ=+Js>2J)is.BM<JQ2
JU2                       Set J = [0, 1].
   VQ       )             <Input> times...
     =+Js>2J              ... add the last 2 elements of J and put that in J.
                  <JQ     Take the first <input> elements...
               .BM        ... convert each to binary...
              s           ... concatenate them...
             i       2    ... and convert back to decimal.
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 38 bytes
```
{:2([~] (0,1,*+*...*)[^$_]>>.base(2))}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/2spII7ouVkHDQMdQR0tbS09PT0szOk4lPtbOTi8psThVw0hTs/Z/cWKlQpqGSrymQlp@kYKhnp6hgfV/AA "Perl 6 – Try It Online")
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 70 65 58 57 55 bytes
* thanks to Shaggy for reducing 2 bytes ('0b+C-0 to '0b'+C)
```
f=(n,a=C=0,b=1)=>--n?f(n,b,a+b,C+=b.toString(2)):'0b'+C
```
[Try it online!](https://tio.run/##ZZBLbsMwDET3vUgs2A5EUtSngNKFj9ATWGkcpAjkIjF6fYfqrtJGBB6pGXK@59/5eX7cfrYxr1@XfV9il4c5TlEPKYKKp3HMH4uwNMx9GqY@puO2fm6PW752qNT7QadDP@3nNT/X@@V4X6/d0snHqNXbf4gCoYYkkGpoyqSpKQvlUFMr1DhXYyfYWdMs4Ys0InJjGsomARCgEQMtPWRNjhmx6ZZrwWo0msjYRhjK4agZtLPoiVprKCmwGBR9z@QZWpe/UMgYCEVCs@cgbzNWUrLeI9oQrLMcpBgmp/YX "JavaScript (Node.js) – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
```
LÅfbJC
```
[Try it online!](https://tio.run/##MzBNTDJM/f/f53BrWpKX8///xgA "05AB1E – Try It Online")
---
1-indexed.
[Answer]
# J, 36 Bytes
```
3 :'#.;<@#:"0]2}.(,{:+_2&{)^:y _1 1'
```
### Explanation:
```
3 :'#.;<@#:"0]2}.(,{:+_2&{)^:y _1 1' | Explicit function
                 (,{:+_2&{)^:y _1 1  | Make n fibonacci numbers, with _1 1 leading
              2}.                    | Drop the _1 1
       <@#:"0]                       | Convert each item to binary and box
      ;                              | Unbox and join
    #.                               | Convert back from binary
```
[Answer]
# x86, ~~37~~ ~~22~~ 21 bytes
**Changelog**
* -13 by using [`bsr`](http://www.felixcloutier.com/x86/BSR.html). Thanks Peter Cordes!
* -2 by [zeroing registers with `mul`](https://codegolf.stackexchange.com/a/147775/17360).
* -1 by using a while loop instead of `loop` and `push`/`pop` `ecx` (credit Peter Cordes).
Input in `edi`, output in `edx`. 
```
.section .text
.globl main
main:
        mov     $5, %edi            # n = 5
start:
        dec     %edi                # Adjust loop count
        xor     %ebx, %ebx          # b = 0
        mul     %ebx                # a = result = 0
        inc     %ebx                # b = 1
fib:
        add     %ebx, %eax          # a += b
        xchg    %eax, %ebx          # swap a,b
        bsr     %eax, %ecx          # c = (bits of a) - 1
        inc     %ecx                # c += 1
        sal     %cl, %edx           # result >>= c
        add     %eax, %edx          # result += a
        dec     %edi                # n--; do while(n)
        jnz     fib 
        ret
```
Objdump:
```
00000005 <start>:
   5:   4f                      dec    %edi
   6:   31 db                   xor    %ebx,%ebx
   8:   f7 e3                   mul    %ebx
   a:   43                      inc    %ebx
0000000b <fib>:
   b:   01 d8                   add    %ebx,%eax
   d:   93                      xchg   %eax,%ebx
   e:   0f bd c8                bsr    %eax,%ecx
  11:   41                      inc    %ecx
  12:   d3 e2                   shl    %cl,%edx
  14:   01 c2                   add    %eax,%edx
  16:   4f                      dec    %edi
  17:   75 f2                   jne    b <fib>
  19:   c3                      ret    
```
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), ~~26~~ 22 bytes
*4 bytes saved thanks to @H.PWiz*
```
{2⊥∊2∘⊥⍣¯1¨1∧+∘÷\~⍵↑1}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R24Rqo0ddSx91dBk96pgBYvUuPrTe8NAKw0cdy7WBQoe3x9Q96t36qG2iYS1Qg8KhFY96NxsaAAA "APL (Dyalog Unicode) – Try It Online")
[Answer]
# [Haskell](https://www.haskell.org/), 89 76 75 bytes
```
f=0:scanl(+)1f
foldr1(\x y->y+x*2*2^floor(logBase 2.read.show$y)).(`take`f)
```
Ungolfed version:
```
import Data.Bits
fib = 0:scanl (+) 1 fib
catInt :: Integer -> Integer -> Integer
catInt x y = x' + y where
    position = floor $ succ $ logBase 2 $ realToFrac y
    x' = shift x position
answer :: Integer -> Integer
answer n = foldr1 catInt fib' where
    fib' = take n fib
```
[Answer]
# Pyth, 27 bytes
```
JU2V-Q2=aJ+eJ@J_2)is.BM<JQ2
```
[**Test suite**](https://pyth.herokuapp.com/?code=JU2V-Q2%3DaJ%2BeJ%40J_2%29is.BM%3CJQ2&test_suite=1&test_suite_input=1%0A2%0A3%0A4%0A5%0A6%0A7%0A8%0A9%0A10%0A11%0A12%0A13%0A14%0A15%0A16%0A17%0A18%0A19%0A20&debug=0)
Python 3 translation:
```
Q=eval(input())
J=list(range(2))
for i in range(Q-2):
    J.append(J[-1]+J[-2])
print(int(''.join(map("{0:b}".format,J[:Q])),2))
```
---
## ~~37 bytes~~
```
J[Z1)W<lJQ=aJ+eJ@J_2)Ig1QZ.?ijkm.BdJ2
```
**[Test suite](https://pyth.herokuapp.com/?code=J%5BZ1%29W%3ClJQ%3DaJ%2BeJ%40J_2%29Ig1QZ.%3Fijkm.BdJ2&test_suite=1&test_suite_input=1%0A3%0A4%0A10%0A32&debug=0)**
Python 3 translation:
```
Q=eval(input())
J=[0,1]
while len(J)<Q:
    J.append(J[-1]+J[-2])
if 1>=Q:
    print(0)
else:
    print(int(''.join(map("{0:b}".format,J)),2))
```
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 59 bytes
```
n->fromdigits(concat([binary(fibonacci(i))|i<-[0..n-1]]),2)
```
[Try it online!](https://tio.run/##DcwxDoMwDEDRq1hMthSjUlWdWi6CGEIqIw84kZsFibuHLH94wy/RlffSBL7QjGfxfPx01/rHlC3FisumFv1E0S1bTElRiS798PIYR@NpXSk8qUl2tD6ZArxfAYqr1Q4D8NwjaETUbg "Pari/GP – Try It Online")
[Answer]
# APL+WIN, 55 bytes
Prompts for screen input of integer.
```
v←b←0 1⋄⍎∊(⎕-2)⍴⊂'v←v,c←+/¯2↑v⋄b←b,((1+⌊2⍟c)⍴2)⊤c⋄'⋄2⊥b
```
APL+WIN's maximum integer precision is 17 and integer limit is of the order of 10E300 therefore the maximum input number is 55 and the result is: 1.2492739026634838E300
[Answer]
# [Python 3](https://docs.python.org/3/), 94 bytes
```
f=lambda n,a=[0,1]:n>len(a)and f(n,a+[sum(a[-2:])])or int(''.join(bin(v)[2:]for v in a[:n]),2)
```
**[Try it online!](https://tio.run/##FcpLDoMwDEXRrWSGraYVn44iwUasDIwgKggcBBSpq3fN4E3uedvv/GRpVFO78NoP7MRzS6WvYpBuGQUYWQaXwPqDju8KTM86RIyYdzfJCUXxmvMk0NsuJLNkcpk5piARfY267fc1wRtR9Q8 "Python 3 – Try It Online")**
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 6 bytes
```
ḶÆḞBFḄ
```
[Try it online!](https://tio.run/##y0rNyan8///hjm2H2x7umOfk9nBHy////00A "Jelly – Try It Online")
`Ḷ`owered range -> *n*th `ÆḞ`ibonacci number -> from dec to `B`inary -> `F`latten -> from `Ḅ`inary to dec
[Answer]
# [MATL](https://github.com/lmendo/MATL), 21 bytes
```
0li:"yy+]xx&h"@B]&hXB
```
[Try it online!](https://tio.run/##y00syfn/3yAn00qpslI7tqJCLUPJwSlWLSPC6f9/QwMA "MATL – Try It Online")
### Explanation
```
0l        % Push 0, then 1 (initial terms of the Fibonacci sequence)
i:"       % Do n times, where n is the input
  yy+     %   Duplicate top two numbers and push their sum
  ]       % End
xx        % Delete the last two results. The stack now contains the
          % first n Fibonacci numbers, starting at 0
&h        % Concatenate all numbers into a row vector
"         % For each
  @       %   Push current number
  B       %   Convert to binary. Gives a vector of 0 and 1
]         % End
&h        % Concatenate all vectors into a row vector
XB        % Convert from binary to decimal. Implicitly display
```
[Answer]
# [Jotlin](https://github.com/jrtapsell/jotlin), 59 bytes
```
g(l(0,1)){l(a.sum(),a[0])}.take(this).j(""){a[0].s(2)}.i(2)
```
## Test Program
```
data class Test(val input: Int, val output: Long)
val tests = listOf(
    Test(1, 0),
    Test(2, 1),
    Test(3, 3),
    Test(4, 14),
    Test(5, 59),
    Test(6, 477),
    Test(7, 7640),
    Test(8, 122253),
    Test(9, 3912117),
    Test(10, 250375522)
)
fun Int.r() = g(l(0,1)){l(a.sum(),a[0])}.take(this).j(""){a[0].s(2)}.i(2)
fun main(args: Array<String>) {
    for (r in tests) {
        println("${r.input.r()} vs ${r.output}")
    }
}
```
It supports up to 10, changing `.i(2)` for `.toLong(2)` would support up to 14 if needed
[Answer]
# [J](http://jsoftware.com/), 25 bytes
```
2(#.;)<@#:@(1#.<:!|.)\@i.
```
[Try it online!](https://tio.run/##FcqhDoAgFAXQzldcIcDb2BsSn@j4EJuTicVgMei3o4bTzt7KiVEQ8GnRGR4oZSPZ9YaTdDfTnCs3Upphy18tPB5BOZVal@2A81x0IEyCyojhai8 "J – Try It Online")
## Explanation
```
2(#.;)<@#:@(1#.<:!|.)\@i.  Input: n
                       i.  Range [0, n)
                     \@    For each prefix
                  |.         Reverse
                 !           Binomial coefficient (vectorized)
               <:            Decrement
            1#.              Sum
        #:                   Convert to binary
      <                      Box
    ;                        Link. Join the contents in each box
2 #.                         Convert to decimal from base 2
```
[Answer]
# [Python 3](https://docs.python.org/3/), 86 bytes
```
def f(N):
 a,b,l=0,1,''
 for _ in range(N):l+=format(a,'b');a,b=b,a+b
 return int(l,2)
```
[Try it online!](https://tio.run/##Rc0xDgIhEIXhfk8xDRkmOyaCnQaP4BUMBFATnN0QLDw9QmX78v15@7c9Nzn1HlOGrG90XsBz4OKObBhxgbxVuMNLoHp5pCnK6sb49k17xoB0GYEL7NewQE3tU2Xwpgtb6rOWf23Ymnmx1ylQ2QiHK6iIoLRw1kJE/Qc)
[Answer]
# [Add++](https://github.com/cairdcoinheringaahing/AddPlusPlus), 113 bytes
```
D,f,@@@@*,V$2D+G1+dAppp=0$Qp{f}p
D,k,@,¿1=,1,bM¿
D,g,@,¿1_,1_001${f},1¿{k}
D,w,@,BBbR
D,l,@,ßR€gp€w@0b]@¦+VcG2$Bb
```
[Try it online!](https://tio.run/##JY5BaoQwFIbXySlEAoUawThdtVhSKwilXVSKdDPIaFQyYzWgM0NH3PQisyh01TsIzk16kKbPThbh53v/93grIZTSOqAF5fAuaUzcwAqZJe6UUp5DnlVfDAoHdEM5nUbmUUbTp2kEUp5JQlniOIxAj7Jp7DcDzPYw8/00glhBPB2jn4/vUsG350665NOXFWehS/xU3xgvedvJusRQ3tb5bjUbGJkXpuDr3UzXjazhPoCwoD93Boy4SB8XJMFo4d6fjq@g2LeGCTzm4cPsHeg1OK4TGSLe/ssVRv4yJH6G0fTZz3uHWuur30Z1sqlbbdvyTVUykx3EVuWZLN69wx8 "Add++ – Try It Online")
[Answer]
## PHP, 124 Bytes
[Try it online!](https://tio.run/##LczLCsIwEIXhV8lioDO0WCu6itF3SZrQgExiL7gIffY4Sjdn8cP58pTr/Zllw8ZujYlVQOAOojl3YE3TUFHxlx4QqYA9mdE7GxnntPGIOX0Ql/e84o3agfqLPKk/ApE@sHYQjPTuX4sv3k1JCSEQ/uteA15J1y8)
So I was looking for a way to output fibonacci numbers using the series, until I found [this](https://en.wikipedia.org/wiki/Fibonacci_number#Computation_by_rounding). It turns out you can calculate the fibonacci series via rounding, so I tried the challenge with a recursive function.
I found the approach of "rounding" really interesting, also a professor showed me this a while ago.
**Code**
```
function f($n,$i=0,$b=''){ if($n>$i){$b.=
decbin(round(pow((sqrt(5)+1)/2,$i)/sqrt(5)));f($n,$i+1,$b);}else{echo bindec($b);}}
```
**Explanation**
```
function f($n,$i=0,$b=''){           #the function starts with $i=0, our nth-fib number
if($n>$i){                           #it stops once $n (the input) = the nth-fib
    $b.=decbin(                      #decbin returns an integer as bin, concatenates
        round(pow((sqrt(5)+1)/2,$i)/sqrt(5))    
                                       #the formula, basically roundign the expression
        );                           #it returns the (in this case) $i-th fib-number   
    f($n,$i+1,$b);                   #function is called again for the next index
}else{                               #and the current string for fibonacci
    echo bindec($b);                 #"echo" the result, bindec returns the base 10
                                     #value of a base 2 number
}
}
```
Also check [this stackoverflow post](https://stackoverflow.com/questions/15600041/php-fibonacci-sequence) the best answer refers to the same article on Wikipedia.
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 9 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
ü1∞╓♪εw≤+
```
[Run and debug it at staxlang.xyz!](https://staxlang.xyz/#p=8131ecd60dee77f32b&i=1%0A%0A2%0A%0A3%0A%0A4%0A%0A5%0A%0A6%0A%0A7%0A%0A8%0A%0A9%0A%0A10%0A%0A11%0A%0A12%0A%0A13%0A%0A14%0A%0A15%0A%0A16%0A%0A17%0A%0A18%0A%0A19%0A%0A20%0A&a=1&m=1)
## Unpacked (10 bytes) and explanation:
```
vr{|5|Bm|B
v             Decrement integer from input. Stax's Fibonacci sequence starts with 1 :(
 r            Integer range [0..n).
  {    m      Map a block over each value in an array.
   |5           Push nth Fibonacci number.
     |B         Convert to binary.
        |B    Implicit concatenate. Convert from binary. Implicit print.
```
[Answer]
# [Julia 0.6](http://julialang.org/), 65 bytes
```
f(n)=n<2?n:f(n-1)+f(n-2)
n->parse(BigInt,prod(bin.(f.(0:n-1))),2)
```
[Try it online!](https://tio.run/##FcqxCoMwFEbhuXmKIg73UhXN0CE0Frr1HbooJuEW@Q1p@vxRp3OG7/tfZbqXYGcXBMUT2OKhnzDHtgPfzmhWaMc4pZ@jl4Q3chPTttAs6Mh31JuTMjeai8Oi/JauYgeje3WJSZBXUFXLJ9cUSJgrVgcrOw "Julia 0.6 – Try It Online")
[Answer]
# [Factor](https://factorcode.org/) + `project-euler.025`, 37 bytes
```
[ iota [ fib >bin ] map-concat bin> ]
```
[Try it online!](https://tio.run/##Rcw9DsIwDEDhvafwAWhUKrGA1BWxsCCmKINruRB@kuC4Epw@BBhYnz69CUmjlONht9@u4Y56hsyPmQNxhiTxwqQtzzcW0/WrLzAJJbP8neGnCn44q76S@KA/KBhOdbNpmr4Du1yMrljwUREsTH6EYfQBXLWppRgIFWoYwJVaICvS1ZQ3 "Factor – Try It Online")
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 44 bits1, 5.5 [bytes](https://github.com/Vyxal/Vyncode/blob/main/README.md)
```
ʁ∆FbfB
```
[Try it Online!](https://vyxal.pythonanywhere.com/?v=1#WyJ+PSIsIiIsIsqB4oiGRmJmQiIsIiIsIjEgLT4gMFxuMiAtPiAxXG4zIC0+IDNcbjQgLT4gMTRcbjUgLT4gNTlcbjYgLT4gNDc3XG43IC0+IDc2NDBcbjggLT4gMTIyMjUzXG45IC0+IDM5MTIxMTdcbjEwIC0+IDI1MDM3NTUyMlxuMTEgLT4gMTYwMjQwMzM0NjNcbjEyIC0+IDIwNTEwNzYyODMzNTNcbjEzIC0+IDUyNTA3NTUyODUzODUxMlxuMTQgLT4gMTM0NDE5MzM1MzA1ODU5MzA1XG4xNSAtPiA2ODgyMjY5OTY3NjU5OTk2NDUzN1xuMTYgLT4gNzA0NzQ0NDQ0Njg4MzgzNjM2ODY0OThcbjE3IC0+IDcyMTY1ODMxMTM2MDkwNDg0NDE0OTc0OTM5XG4xOCAtPiAxNDc3OTU2MjIxNjY3MTMzMTIwODE4Njg2NzY2NjlcbjE5IC0+IDYwNTM3MDg2ODM5NDg1NzcyNjI4NzMzNDA5OTYzODgwOFxuMjAgLT4gNDk1OTE5ODE1Mzg5MDY3NDQ5Mzc0NTg0MDk0NDI0MTExOTMxNyJd)
## Explained
```
ʁ∆FbfB
ʁ      # range [0, input)
 ∆F    # 0-indexed fibonacci number of each
   bf  # convert each to binary and flatten the list
     B # convert that from binary
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 61 bytes
```
->n,a=0,b=1,s=""{s+="%b"%a;a,b=b,a+b;(n-=1)>0?redo:s.to_i(2)}
```
[Try it online!](https://tio.run/##JVDLTtxAEDzDV1hGaEEYNP2cHtAsH5JEyIZFyQUi1hwi47/IIQe@jh/ZdM/6MFPuqequ6rf36c/huR6uty/DWNMwVRj2te@X/VXtz6f@fLwbvTgN49V0d/FyXeFym@7fdk@vt/ub@fXh1wVerofl9AS6uu3ScHqCAcABBSAH3CrsSAJJcaSBOGeHOWBWDrE1KiJKCEvrUAABgggp/lESZRHEqLSpoAk5EbGGCJoBTAIpKxpRawXNjbg4tCZkAq3D0RwxQwlqEpPiZzw1t2qGqKVoVil@sVDz0gLkxJnjcxYZKakpF4v3YyoEFSMA0lQSm0/hkrlQrACOYX0JRRSdqRmIAJOBeZ@sqo3WtqDJ5yavU2GTnNGjZY@c3BKZpZiJbT9cpEAx8IglqdsrlFnMmczIAJ4ztrne7MbHn93yMQ@7j@73@7zv@rPl@dv8o9Zdd99tvj7/brrbuP9t1u/z2TL7WbeBgrX26@E/ "Ruby – Try It Online")
]