How to determine the overflow of signed and unsigned numbers?

overflow of signed and unsigned numbers

Why it is necessary to get the idea of overflow?  Numbers represented in computer system have always have a specific range. It depends on how many bits your system process. Some systems are 32 bits while other are 64-bits. With the advancement in technology we have now larger bits processing systems. But they have limited range of numbers they can represent. Overflow refers to the condition when the given bits can not represent the given number. It means that number needs more bits for its representation. There is another situation where the number is small enough and not representable according to the given pattern of numbers. This is called underflow.