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

  • #1
332
1

Main Question or Discussion Point

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
7,797
429
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
332
1
Thanks a lot, Mathman.
 
  • #4
AlephZero
Science Advisor
Homework Helper
6,994
291
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.
 

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

Replies
24
Views
15K
  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
3
Views
5K
Replies
2
Views
7K
Replies
2
Views
2K
Replies
4
Views
577
  • Last Post
2
Replies
33
Views
5K
Replies
5
Views
626
Replies
1
Views
1K
Top