an unsigned integer
An unsigned integer is the simplest way a computer stores a whole number: a fixed number of bits read straight as plain binary, with no room reserved for a minus sign. Because nothing represents negativity, an unsigned value is always zero or positive — like a car odometer or a tally counter that only ever climbs from zero upward. This is the right choice when a value genuinely cannot be negative, such as a length, a count of items, or a memory address.
With n bits you can store any value from 0 up to 2^n minus 1. The reason is place value: the largest pattern is all 1s, which sums every place value 2^0 + 2^1 + ... + 2^(n-1), and that total is exactly 2^n minus 1. So an 8-bit unsigned integer ranges 0 to 255, a 16-bit one ranges 0 to 65535, and a 32-bit one ranges 0 to about 4.29 billion. Reading the number is the ordinary binary trick: add the place values wherever a 1 appears.
Unsigned integers matter because that fixed range has a hard edge. If you add past the top value the count wraps around back to zero (255 + 1 becomes 0 in 8 bits), which is the unsigned form of overflow. This is not a rare corner case: it has caused real failures, such as counters that silently reset. A classic, dangerous beginner mistake is looping while an unsigned variable is 'greater than or equal to 0' to count down — since it can never go below zero, subtracting one from zero wraps to the maximum and the loop runs forever.
An 8-bit unsigned integer holds 0 to 255. The pattern 0b11111111 is 255, the maximum; adding 1 wraps it to 0b00000000, which is 0. There is no way to write a negative number in this scheme.
An n-bit unsigned integer ranges 0 to 2^n minus 1, then wraps around at the top.
Counting down with an unsigned variable using 'while x >= 0' loops forever, because an unsigned value is never negative — at zero, subtracting one wraps to the maximum. Use a signed type or restructure the loop.