I have two 32 bit integers HI & LO, and I need to right shift bits in them, so that last last bit of HI becomes most significant bit of LO. In other words, shifting operation should work, as if two bits is a single 64bit unit. Language C/C++
Thanks !
I have two 32 bit integers HI & LO, and I need to right
Share
This code below right-shifts 1-bit as you described.
It works by masking off all except the lowest bit in
hi, and shifting it all the way left (Most Significant Bit), and joining that withloshifted right one-bit.Then, it simply shifts
hito the right one bit.