Context: Given 4 params (value, high, low, isSigned) I need to return a number that takes the bits from the given range (high - low)
So I have a 32 bit int, and the lo is 4 and the high is 7
My initial thought was to just do
value = value >> low;
Which is able to get the bits in the correct place (at the front of the bitfield), but now my problem is that I need the rest of those bits that are not included in the range to be 0.