Content Deep Dive
Be a Magician by Calculating Powers of Two in Your Head
Blog post from Twilio
Post Details
Company
Date Published
Author
Matthew Gilliard
Word Count
616
Company Posts That Month
Language
English
Hacker News Points
-
Source URL
Summary
You can quickly calculate powers of two in your head by using the rule: add three zeros for each ten in the power, then multiply by whatever is left. This trick is based on three key facts: 2(a+b) = 2a × 2b, 210 is close to 1000, and knowing the powers of 2 up to 210. By approximating numbers using this rule, you can quickly estimate values like the difference between 243 and 7 trillion or the number of items that can be stored with a 32-bit identifier. The trick may underestimate the true answer by about 2.4% per 210, but it's good enough for quick approximations and can be improved upon by adding an additional quarter percent for each 210 in the calculation.
Trends Found in this Post
No tracked trend matches for this post yet.