Your code is correct if
type of x.data is correct
What I maen is "if type of a.data and b.data is same lets say unsigned int (32 bits)
then type of x.data must be long long unsigned int (64 bits)
Hope this help
mmm..
What I want is a general equation for all Q.format ....such as [16 18],[16 0],..[16 15],..........Is there any information about it?thanks for that.