array and concatenation

hello, i want to concatenate my array into an unsigned long type. My array looks like array_block1[]= {0,1,1,1,0,0,0,1,0,1,0,1,0,0,0,1};

and i want a variable result like this result = 0111000101010001 Can you help me to concatenate my array ?

thinks ced

Is that meant to be a binary value? You need to look at for loops, shift operators and the bitwise-OR operation. this isn't really concatenation.

yes i need result like a binary value .

There are useful functions called bitRead(), bitWrite(), bitSet(), and bitClear() that can be used to twiddle the bits in an int.