for overflow it is easy -> do it with: value & 0xFF But what is best, for underflow?
e.g. vor 8-Bit: (if value goes from 0x00 to -0x01 after an decrement) 0x100 + value