The class blog for Math 3010, fall 2014, at the University of Utah

Tag Archives: binary

In the class, we learned about the strange base-60-system of Babylon, and I was wondering were there any other counting system that seems unfamiliar to us.

Because I am taking a programming class, the first thing that came into my mind was the binary system. Binary numbers represent values using only two different symbols: 0(zero) and 1(one). This system seems easier than base-10 system, because we only need to remember two symbols to express all integers. For instance, the first 10 integers in the decimal system (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) can be expressed as : “ 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001.”

Origin of binary numbers

Although occupying more space, the expression of numbers in the binary system seems easier than in the decimal system. Then I am wondering who first invented it? It is said Gottfried Leibniz, a German mathematician and philosopher who is famous for the inventing of Calculus, first discover the modern binary number system and it appears in his article “Explanation of the Binary Arithmetic” . Leibniz also indicated that the ancient ruler of China Fuxi first invented the binary system in his work — “I Ching”; in “I Ching”, the binary numbers are being used to divine the fate of ancient Chinese people, for those people believe that the mysterious secrets of the universe are all in these simple numbers of signs.

Image: BenduKiwi and Machine Elf 1735, via Wikimedia Commons.

The arithmetic of binary numbers

Like the decimal system, binary numbers also have their arithmetic.

Addition

Addition is the simplest operation in the binary system. Adding two single-digit binary numbers is relatively easy, like this:

0 + 0 → 0

0 + 1 → 1

1 + 0 → 1

1 + 1 → 0, carry 1 (since 1 + 1 = 2 = 0 + (1 × 21) )

Here when adding two 1s, we carry the value divided by 2, and add the quotient to it the left-next positional value, so multiple-digits number addition is:

0 1 1 0 1

+ 1 0 1 1 1

—————–

= 1 0 0 1 0 0

Subtraction

The subtraction of binary numbers is the inverse operation of addition, when two single-digit number doing a subtraction, like this :
0 − 0 → 0

0 − 1 → 1, borrow 1(from the left-next position)

1 − 0 → 1

1 − 1 → 0

So, likewise, the multiple-digits numbers’ subtraction are like this:

* * * * (starred columns are borrowed from)

1 1 0 1 1 1 0

− 1 0 1 1 1

——————

1 0 1 0 1 1 1

3)Multiplication

Multiplication in binary numbers is simpler than in the decimal system, for two number A and B, there are only two rules:

If the digit in Bis 0, the partial product is also 0

If the digit in B is 1, the partial product is equal to A

For example, the binary numbers 1011 and 1010 are multiplied as follows:

1 0 1 1 (A)

× 1 0 1 0 (B)

———–

0 0 0 0 ← Corresponds to the rightmost ‘zero’ in B

1 0 1 1 ← Corresponds to the next ‘one’ in B

0 0 0 0

+ 1 0 1 1

—————–

= 1 1 0 1 1 1 0

And for division, it is the inverse operation of multiplication.

Transfer between binary number and decimal number

How to transfer a binary number into a decimal number? For example:

11011(2) = 1 * 2^4 + 1*2^3+0*2^2+1*2^1+1=27(10)

And the inverse transfer is to count the power of 2s in a decimal number, like:

36(10) = 1*2^5+ 0*2^4 +0*2^3+1*2^2+0*2^1+0*2^0= 100100(2)

The application of binary numbers

The reason why I introduce the binary numbers is that they are the base of modern science, especially the computer science. The basic element of a computer is the logical circuit, which only has two basic situations: 0 for switch off, and 1 for switch on. As the old saying: less is more. The binary system is coincidentally perfectly fitting the feature of the logical circuit(0 for no, and 1 for yes). And the logical circuit led to the invent of computer. For example, when calculating, the computer will translate the numbers into binary form and do the operations, and then transfer the answer back to decimal number like it shown above.

Conclusion

It is unbelievable when you think of the powerful computer is based on the binary system, and considering the huge works computer have done so far, we can say that the binary system is the key of modern science and technologies. Even when I am typing this article, the binary numbers keep working in my computer.

Very few people ever stop to think about why numbers are the way they are. Have you ever stopped to consider why you live in a society that uses a ten based (or decimal) number system? This is a system where you start at 1 and go all the way up to 9 before you reset with one followed by a zero (or 10). Well if you haven’t taken the time to ponder this deeply complex situation that you find yourself in, fear not, for I will explain why. For the most part, human beings find themselves in the possession of 10 fingers. So the leading hypothesis for why we use a base 10 system is because it was convenient since we could count to 10 on our hands. For that single and simple reason, society decided that its number system would have a base of 10. There you have it, one of the great mysteries of life has been cleared up for you.

Now that you have an open space where a mystery used to rest, allow me to fill that spot with a new mystery. Why don’t we use a differently based number system? No really, think about it! Throughout history, multiple societies chose not to use a decimal system. For example, Babylonians used a base 60 number system and the Mayans used a base 20 system. Likewise, there are quite a few key things in our lives today that don’t really rely on the conventional base 10 way of doing things.

For example, we are surrounded by computers, which utilize Binary, a base 2 number system. At every position there is either a 1 or a 0, so the number ten in binary looks like 1010.

Another example of something that isn’t really 10 based is a clock. Take a second to look at an old school clock with an hour and minute hand (gasp! Not digital!) . You’ll quickly notice that it goes from 1 to 12 instead of 1 to 10. Weeks are broken down into 7 days and minutes as well as hours are in chunks of 60. So as you can see, the case could be made to switch to a different based number system. Let’s take a look at another option that society could use in place of the current base 10 system.

The system that we’ll look at is one of my personal favorites (thanks to my Computer Science bias), the hexadecimal system. As you can probably guess from the name, the hexadecimal system adds six to the base 10 system, leaving us with a grand total of base 16! The system uses 0 to 9 to represent numbers 0 to 9 and then uses A to F to represent the numbers 10 to 15. Hexadecimal is a positional numeral system just like the decimal system. Just to give you a better idea of what hexadecimal is, lets learn how we can represent a hexadecimal number in decimal.

Let’s take the random hexadecimal number 3FB1. Since it is a positional system, meaning the position of the symbol is part of its value, we can just take the symbol and multiply the symbol’s value by its base to the power of its position (position numbering goes right to left and starts with 0 rather than 1). So we would take (3 x 163) + (15 x 162) + (11 x 161) + (1 x 160). Simplifying this further we get (3 x 4096) + (15 x 256) + (11 x 16) + (1 x 1). At the end of this we are left with 16,305. So right off the bat we can begin to see the some of the potential benefits that would come with using a base 16 system. Firstly, we notice that it takes fewer symbols to represent numbers. Where in decimal we had to use 5 symbols (6 if you count the comma) to represent 16305, in hexadecimal we only had to use 4. We can also note that because of this space bonus, we could potentially represent higher numbers in the same number of hexadecimal characters. Even though this all sounds great, there are some disadvantages that would come with using the hexadecimal system. For one, performing mathematical operations on base 16 numbers can get complicated quickly (a base 16 multiplication table has 256 instead of 100 elements). Try performing long division on two hexadecimal numbers! Also, I personally believe that it would be trickier to set up equations with variables due to the fact that the characters “A”, “B” and “C” could no longer be used (there goes the quadratic formula song). On a similar note, there are many people who think that we would be better off on a duodecimal system (base 12), but that is a conversation for another time.

So next time when you are counting on your fingers, take some time to think about the effects of you simply having 10 fingers!

Our base ten number system is so ingrained in us that it is difficult to imagine using anything else. With our ten fingers to count on, it makes sense that we have ten symbols to represent numbers. Despite this, other cultures have used extremely different number systems. The Ancient Mesopotamians used a sexigesimal, or base 60, number system. The Mayans used a vigesimal, or base 20 system. Roman numerals are used to number the Rocky movies despite them being almost completely useless. Most computer techies are familiar with binary and hexadecimal. Many early peoples even used a system with only 5 symbols (Boyer 3). Our current number system may be intuitive but it may not be the best one around. What if we had an extra finger on each hand? We would be using a much more useful number system. We should move away from the decimal numbers we currently use, and switch to a base twelve, or dozenal, number system.

There are several reasons to seek more mainstream use of base 12. The factors of a number, or the numbers that divide into it evenly, determine a lot about the number. Twelve can be broken down into more factors than ten can be. Ten is divisible by only 2 and 5, whereas 12 is divisible by 2, 3, 4, and 6. This gives 12 an advantage over 10. The additional factors make it easier to think of many fractions, such as fourths and sixths, since they will now have only have a single significant digit after the point. This is particularly effective when dividing 1 into thirds because it will not leave us with an infinite series of 3s like it does in decimal. The simple tricks that help us do arithmetic, such as the fact that in base ten if a number ends in an even number the whole number is even and thus is divisible by 2, depend on the factors that make up our number base. Since 12 has more factors, similar tricks can be used for more numbers. In base twelve, if a number ends in 0, 4, or 8 the entire number is divisible by 4, if it ends in a 0, 3, 6, or 9 then it is divisible by 3. We will not even miss out on the trick for evens that base ten has since twelve is also divisible by 2. The trick we now currently use for 11, where you alternate adding and subtracting the digits of a number and see if the resulting number is divisible by 11, will work for 13 when we make the switch, because now 13 will be the number that is one larger than our base. Don’t be concerned about 11, because we will have a new trick for 11 in dozenal. The trick we currently use for 9, where we just add up the digits of a number and then check if the sum is divisible by 9, will work with 11 once we change to dozenal. It is easy to check the divisibility of far more numbers in dozenal than it is to check in decimal.

For a dozenal system, we would have to make some changes to the actual symbols we use. We have 10 symbols to use for the numbers 0-9 and a base twelve number system would need 2 more symbols to represent ten and eleven. There are many different sets of symbols we can use to fill the two new places. Some number sets use *, and # to represent ten and eleven in order to correspond to the symbols on most phone number pads. Others use X, and a backwards 3, and some use a backwards and upside down 2 and 3. Some sets completely replace all the symbols we use for 0-9, along with adding two new symbols. We could use any group of numbers that would help us acclimate to a base twelve system.

Some things that we already do everyday would assist in our transfer to a base twelve system. We already have specific terminology for 12 and several of its powers. We use the word dozen to refer to twelve, a gross for a dozen dozens, or twelve sets of twelve, and a great gross for a dozen gross, or twelve gross. When looking at a clock, we already deal with twelves to determine the time. Figuring out what the time is 5 hours after 10 pm is basically the same thing as adding 5 to 10 in base twelve. As Professor James Monroe notes, thinking of egg cartons makes thinking of dozenal numbers easy. If 1 egg carton holds 12 eggs, and 1 case holds twelve cartons, a number like 426 in base 12 can simply be thought of as 4 cases, 2 cartons, and 6 loose eggs. Twelves seem almost as prominent in daily life as the number ten.

Despite the familiarity we already have with base twelve, switching to dozenal will still be incredibly difficult. Because we would have more digits, kids would have to memorize larger multiplication tables. Luckily, the tables will not be anywhere near as large as they would be if we still used Cuneiform. However, the real difficulty in switching has little to do with what number base we want to use. The trouble will be in converting all the numbers on everything that we use. Every road sign, price tag, page number, and countless other places have numbers that will need to be converted to base twelve. This will be more difficult than changing from using imperial units to metric units, and America still has not completely converted to metric. Here in the U.S., some things are measured with metric units, but we still measure distances in miles and a sack of potatoes at the grocery store is measured in pounds. Also, to add more difficulty, in metric we would have to come up with new prefixes that are based on powers of 12 instead of powers of 10. Changing to dozenal numbers is such a monumental task we may not be able to accomplish it.

In spite of the difficulties, I believe we should do it. The conversion will not happen overnight. We must look further down the road. Perhaps, start by teaching people how to do arithmetic in dozenal in addition to teaching them the usual decimal system that we use. Then when people are comfortable with it, we could move on to using base twelve alongside decimal. Eventually, our ancestors will be able to move on to a better number system than what we currently have. Like the Kwisatz Haderach from Frank Herbert’s Dune, we must endure temporary struggles in order to achieve the Golden Path.