Recent Finds on the Web

Refresher on numbers and a breakdown of their representation in computer code and how to do bitwise operators on them. “A number is a very abstract concept. Unlike physical objects, which are easily recognizable on sight, a number can be represented in an infinite number of ways. The representation we are used to is called decimal, or base 10. The first time is pretty familiar, but if you’re reading this section, the second term may be new to you. To see why we use the term “base 10,” let’s take a look at an arbitrary number, say 5346. Read aloud, this is five thousand, three hundred, forty-six. We hear numbers like that so often that it’s not immediately obvious, but this sounds a lot like a formula. Specifically: 5346 = (5 * 1000) + (3 * 100) + (4 * 10) + (6 * 1)
Or, if we write it another way, we see that a decimal number is actually the sum of its digits multiplied by successive powers of 10: 5346 = (5 * 103) + (3 * 102) + (4 * 101) + (6 * 100)
Do you see why the term “base 10” is used to describe the way we normally write numbers? Any integer can be written this way. Suppose we call the least significant digit (the digit in the ones place) “digit 0,” and each successively higher digit is digit 1, digit 2, and so on. Then the full
number is represented by digit 0 times 100, plus digit 1 times 101, and so on, up through digit n times 10n.”

If you love numbers and math and want a quick refresher, check out the “30-Second Maths” eBook.

Advertisements