The pow () functions are full; remember that int has a limited size.
For example, pow (256, 4) will overflow with 32 bits, pow (256, 8) with 64 bits, even if you use unsigned data types.
Technically, an int overflow is an undefined behavior, so anything can happen, including wrapping (i.e. back to 0) or nasal daemons.
unsigned int calculations of modulo 2, raised to the degree of WIDTH according to the standard; those. will always be wrapped.
Bathsheba
source share