long Dec2Bin(long lNum, char *pcBuf) {
int i = 0;
while(lNum) {
if(lNum & 1) pcBuf[i] = '1';
else pcBuf[i] = '0';
lNum >>= 1;
i++;
}
pcBuf[i] = 0; // Null-terminated
return i;
}
How would i modify this function so that it would show the binary number with '0'. (assuming it is an 8-bit number)?
