Does anyone know of an easier way to calculate large powers of 2 than the way I've come up with? The reason I'm asking is I haven't found my way very easy, but is easier to me than memorizing the powers of 2.
Here's what I do. First you do need to at least memorize the numbers for 2^8 (256), 2^16 (65,536) and 2^24 (16,777,216). Then if I wanted to calculate a number like 2^20, I'd subtract the next lower power of 2 I memorized, 2^16 from 2^20 = 2^4. I'd then multiply 2^16 * 2^4 to get my answer or 65,536 * 16 = 1,048,576.
This way still requires multiplying large numbers or factoring which isn't very quick either (well, at least for me).
I'm looking for a quicker way to come up with an answer on subnetting questions that ask how many hosts you'd have if, as in this example, you'd have 20 host bits.
Hope this makes sense and any help would be appreciated.