Any decimal number in the range 0 to 2^(n-1)can be represented in binary form

  • #1
jackson6612
332
1
I have read somewhere: Any decimal number in the range 0 to 2^(n-1) can be represented in binary form as an n-bit number.

I suspect it's wrong. Shouldn't it rather be 0 to [(2^n)-1]?

Please guide me. Thanks.
 

Answers and Replies

  • #2
mathman
Science Advisor
8,059
540
You're right. n=3 table
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

7=23 - 1
 
  • #3
jackson6612
332
1
Thanks a lot, Mathman.
 
  • #4
AlephZero
Science Advisor
Homework Helper
7,002
297
I have read somewhere: Any decimal number in the range 0 to 2^(n-1) can be represented in binary form as an n-bit number.

I suspect it's wrong. Shouldn't it rather be 0 to [(2^n)-1]?

It's not "wrong". For example if n = 3, then any decimal number in the range 0 to 2^2 = 4 CAN be expressed as an n-bit binary number.

Sure, there are some other numbers that can be expressed as well, like 5 6 and 7, but that doesn't make the statement false.

Often in math proofs, there is no value in stretching every condition to its ultimate limit just for the sake of it. Possibly, in the context where you read this, the smaller range was all that was relevant.
 

Suggested for: Any decimal number in the range 0 to 2^(n-1)can be represented in binary form

Replies
24
Views
15K
Replies
6
Views
6K
  • Last Post
Replies
3
Views
6K
  • Last Post
Replies
5
Views
3K
Replies
25
Views
3K
  • Last Post
Replies
14
Views
1K
Replies
12
Views
2K
Replies
6
Views
2K
  • Last Post
Replies
2
Views
2K
Top