While everything everyone has said in true, and while it's silly to use the floating point pow() function here, you CAN fix your original code by causing the float to integer conversion to round instead of truncate:
k = k + (j[i]*pow(2,l));
k = k + 0.5 + (j[i]*pow(2,l));
There's a "standard" method of doing base conversion that distributes the power function over the digits. See if you can figure it out:
result = 0;
for (i=0; i < NUMDIGITS; i++) {
result = (result * BASE) + digits[i];
}
Avoid C's "," operator. It's EEEEVIL!