Multiple choice

What is the range of n-bit unsigned integer number?

  1. 2^n

  2. 0 to (2^n) - 1

    • 2^(n - 1) to + 2^(n - 1) - 1
  3. 0 to (2^n + 1)

  4. 0 to (2^n - 1) + 1

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

An n-bit unsigned integer can represent integers from 0 to (2^n) - 1. For example: 8-bit unsigned integer range is 0 to (2^8)  - 1 ( = 255).