Result

AC

Code [DL]

#include<stdio.h>
int i,a,b;main(){for(;a<50;a++){for(b=i=0;b<8;b++){i+=getchar()&1;i*=2;}getchar();i/=2;for(b=0;i>0;b++)i-=b;putchar(i<0?48:49);}}

stdin

10101011
00100100
10011110
10010010
11101011
00000001
01111010
10001000
00011000
01000010
11000101
10111010
00000011
00110111
00110110
01101001
01001110
10000110
11001010
00001010
00111001
01100011
00001111
10010100
00100101
11111101
01001111
01111000
01011010
00000000
00110010
01101000
00000110
00011100
01011011
10010011
11000110
11100111
00110111
00010101
10111110
01011110
00101101
00001101
10011001
10110101
10101001
11000000
11010010
01000010

stdout

11000101010011011001001001010100111001111010100011

stderr

/tmp/code.c:2:11: warning: return type defaults to ‘int’ [-Wimplicit-int]
 int i,a,b;main(){for(;a<50;a++){for(b=i=0;b<8;b++){i+=getchar()&1;i*=2;}getchar();i/=2;for(b=0;i>0;b++)i-=b;putchar(i<0?48:49);}}
           ^

strace