I think it probably helps to know units and powers cold, so you can use your short term memory for the actual calculation. I was able to do the first calculation in the article because, as it says, it’s just summing exponents on powers of 10. It should be second nature that M=6, G=9, T=12, or that “nano” means -9.
Powers of 2 are incredibly helpful too: I can estimate that the square root of 4000 is around 60 because 4000 is close to 2 to the 12th, for instance. As a coder it’s well worth your time to memorize powers of 2 up to at least 2 to the 16.