Hacker News new | ask | show | jobs
by damir 604 days ago
Yes, each possible 6^16 outcome is it's own subpage...

/000000 /000001 /000002 /000003 etc...

Or am I missing something?

4 comments

You are missing something. How many two-digit decimal numbers are there from 00 to 99? Obviously 99+1 = 100: 10 options for the first digit times 10 options for the second digit; 10 in the form 0X, 10 in the form 1X, etc. up to 9X, a total of 10 * 10 = 10^2.

So how many 6-digit hexadecimal numbers from 0x000000 to 0xffffff? 0xffffff+1 = 16777216 = 16^6. 16 options for the first digit, times 16 options for the second digit, times 16 for the 3rd, times 16 for the 4th, times 16 for the 5th, times 16 for the 6th is 16^6. Or go to bytes: 3 bytes, each with 256 possible values is 256^3 = (16^2)^3 = 16^6. Or bits: 2^24 = (2^4)^6 = 16^6.

It's also pretty trivial to just count them. Run this in your browser console:

  count = 0; for(i = 0x000000; i <= 0xffffff; i++) { count++; } console.log(count, 16**6, 0xffffff+1, 6**16)
16^6 == 256^3 == 2^24 == 16,777,216
You have it backward. There are 16^6 URLs, not 6^16.
you mean 16^6