I am making a bit of a guess here because you haven't posted all of your code, but I think you have declared something like:
char binary1[length1];
Then you copy the linked list into the char array called binary1.
Although you have asked for a specific amount of memory when you declared binary1, C doesn't do anything to insure that you stay within those bounds.
I think that your linked list includes a header. So when you walk the linked list you are walking down 5 nodes (header + 1 + 0 + 1 + 0).
After you have copied from the linked list to binary1, the value of x is 5. But you only have the first 4 values of binary1 set (1, 0, 1, 0). That 5th slot is random memory.
The first value that you copy into number1 is from binary[4] (the 5th slot), which could be anything, and is probably not a 0 or 1.
Hope this helps.