B
Bob Smith
Hello all, I have a question and I am not sure how I should go about doing
it.
I have two unsigned chars and one int. I want to copy both chars to the
int.
for example if char a was represented binary by 10000110 and char 2 by
10101010
I would like my int to be represented by 1000011010101010 I know short in
would probably be
best but for right now int will work, I may have additions I might need to
add.
Just asssinging the value from char to int will set the LSB correctly. How
can i get the MSB in the
right place?
I am using G++ on a redhat 7.3 system
thanks
it.
I have two unsigned chars and one int. I want to copy both chars to the
int.
for example if char a was represented binary by 10000110 and char 2 by
10101010
I would like my int to be represented by 1000011010101010 I know short in
would probably be
best but for right now int will work, I may have additions I might need to
add.
Just asssinging the value from char to int will set the LSB correctly. How
can i get the MSB in the
right place?
I am using G++ on a redhat 7.3 system
thanks