Hi All,
I want to do arithmetic in c like below:
A Op B = C
1. 0x1100 Op 0x1000 = 0x0100
2. 0x2300 Op 0x1000 = 0x0300
3. 0x1000 Op ox1000 = 0x1000
I know if I do A%B then I can get C. But it is true only for case 1 and 2. But in case 3 A%B will give 0x0000.
I want to perform same operation on A and B to get C in all cases.
If it is not possible by single operator i don't mind doing multiple operations on A and B to get C.
Please help me in this.
Hope my question make sense.
Regards,
Kiran