Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#1: Initial revision by user avatar Canina‭ · 2021-05-08T09:19:03Z (almost 3 years ago)
The short answer: because 2<sup>16</sup> = 65536, it follows that 2<sup>16</sup> - 1 = 65535.

Remember how exponentials work: *i*<sup>*n*</sup> is *i* multiplied by itself *n* times (for integer values of *n* &ge; 1).

Therefore, 2<sup>16</sup> = 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2 \* 2. (2 multiplied by itself 16 times.) Since the only distinct multiplicant is an even number, it follows that the result must also be an even number.

2<sup>16</sup> is the number of *distinct values* that can be represented with exactly 16 symbols each taking one of two values (in this case, traditionally 0 and 1). The more general form is *m*<sup>*n*</sup> where *m* is the size of the symbol set, and *n* is the number of symbols being used. The latter is why, for example, 2<sup>16</sup> = 16<sup>4</sup> (you can use 16 binary digits, or 4 hexadecimal digits, to represent the same value range).

When you include being able to represent the number 0, which is often useful and the lack of which would require some kind of special handling, the maximum number possible to represent within 2<sup>16</sup> distinct values is 2<sup>16</sup> - 1; you need to subtract 1 because the value 0 is one ("1") possible value.