Hi I currently have a binary string which I am shifting once to the left.
char bin[] = "01010001";
printf("Binary number = %s \n", bin);
printf("Binary number shifted by 1 to the left = %s \n", (bin+1) );
Output:
Binary number = 01010001
Binary number shifted by 1 to the left = 1010001
The shifted version should be: 10100010 rather than 1010001. Does anybody know why I am always losing the least significant bit?