A power of two, when expressed as a binary number, is easy to spot: it has one, and only one, 1 bit. For example, 1000, 10, and 0.001 are powers of two. Inside a computer, however, numbers are more generally represented in binary code, not as “pure” binary numbers. As a result, you may not be able to look at the binary representation of a number and tell at a glance whether it’s a power of two or not; it depends on how it’s encoded.
Well, it’s been one year! I’m very happy about how things are going, even if I didn’t meet any of my goals! (See below for how I did in 2009.)
This post was motivated by the article “What Are Your Internet Goals for 2009?”, by Daniel Scocco.
Since I am new to blogging (I just started this blog a month ago), my internet goals for 2009 are my goals for Exploring Binary specifically. I’d like to get this blog off the ground before I try anything else!
I’ve been maintaining a long list of things I want to accomplish with this blog, but I whittled it down to the most important goals — all challenging but realistically attainable:
The Binary Marble Adding Machine is a device that adds binary numbers mechanically. It uses wood instead of silicon, gravity instead of voltage, and marbles instead of current. We don’t need no stinkin’ CMOS!
The machine may be more cool than practical, but it certainly is educational. It illustrates basic principles of binary numbers, binary arithmetic, and binary logic. Let’s take a closer look.
What is a binary clock? Before doing a web search I would have guessed this:
In other words, a regular digital clock, except with binary numerals instead of decimal numerals. But as far as I know, a clock like this doesn’t exist. If you search for “binary clock,” you get a clock of a different design, one like this:
The following infinite set of numbers is known as the powers of two:
Why are they called powers of two? What is the pattern you see? How is the set described mathematically? What are the set’s components? We will answer those questions in this article.
What is a power of two exactly? Is 20 a power of two? Is 2-1 a power of two? How about or ? It depends on how you define it; there are several definitions from which you could choose. Let’s see if we can sort them out and propose a standard definition, or at least a standard definition for our use.
Now that you know how the powers of two are named, lets look at other, nonstandard ways to name them. You will see these names on the internet as well as in books. We will not use them on this site other than in this article, and we only discuss them here to make you aware of their use. As a by-product of this discussion, you may gain some insight into the nature of the powers of two. But beware — you may become confused as well!
How can you tell if a number is a power of two?
That’s easy if it’s in the form 2n, where n is an integer. For example, 212, 20, and 2-37 are powers of two. That is by definition. But what about arbitrary positive numbers like 16,392, 524,288, or 0.00390625? Are they powers of two? Here’s how to tell — if they can be simplified to the form 2n, they are; if they can’t, they’re not.
Powers of two can be combined, under the laws of exponents, to create other powers of two. Under these rules, you can multiply powers of two, divide powers of two, or raise a power of two to a power and still get another power of two. You can combine these rules to create complicated expressions, expressions that result in a single power of two. For example,
The laws of exponents apply generally to any base; two is no different. But since we’re interested in powers of two, we’ll couch them in terms of powers of two. Once we explain the laws in this way, you’ll understand the math behind the example above.
“There are only 10 types of people in the world: those who understand binary and those who don’t.”
Figure it out yet?