Thanks for the reply, I do understand that. Maybe this will further explain what i am trying to do:
purpose of my function: the function prompts the user for input, reads 7 unsigned values representing data bits, and "packs" these bits into a single unsigned char
What should returned: unsigned char that represents the 7 bits of data entered by the user. The MSB of the character is always 0. If the data entered by the user is d6 .. d0, the format of the byte returned is:
MSB LSB
0 d6 d5 d4 d3 d2 d2 d0
Does this make any sense?