max and min of 2's complement
pgbpsu
Posts: 460
I'm trying to grab the max and min values (in SPIN) from an array of 24-bit 2's complement data. Any clever suggestions? I'm afraid I need to convert all the data into signed ints, then scan them. Is there a better way, a way to determine this without converting them first?
Thanks,
Peter
Thanks,
Peter
Comments
-Phil
Thank you both for the prompt and useful suggestions. I should have know shifting was required because my sign bit isn't in bit 31. I think either one of these solutions will work quite well.
Thanks,
Peter