Consider a hexadecimal integer value such as n = 0x12345, how to get 0x1235 as result by doing remove(n, 3) (big endian)? For the inputs above I think this can be achieved by performing some bitwising steps: partA = extract the part from index 0 to targetIndex – 1 (should return 0x123); partB = extract the part from targetIndex + 1 to length(value) – 1 (0x5); result, then, can be expressed by ((partA << length(partB) | partB), giving the 0x1235 result. However I’m still confused in how to implement it, once each hex digit occupies 4 spaces. Also, I don’t