What is the relationship between the size of unsigned int (32 bits) and its maximum value(4294967295)?

Perhaps this table of the powers of two will help you understand.

https://www.vaughns-1-pagers.com/computer/powers-of-2.htm

unsigned long

2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 =

4,294,967,296 (0 - 4,294,967,295)

It help me a lot. Thanks!

theshy2:

What is the relationship between the size of unsigned int (32 bits) and its maximum value(4294967295)?

It astonishes me that someone embarking on using C/C++ does not know this, but I suppose that I should be grateful that they asked