Using the Numbers - Basic Algebra

In electronics, as with the rest of our lives, numbers matter. You might hear someone say, I need two 9-volt batteries, I want a 1500 watt portable heater, I have version 8.3 software, I need one-forth teaspoon of pepper, lets meet for lunch at 12:30, and so on. Numbers tell us something specific about our world. Without numbers it would be more challenging to communicate. In electronics this is no different.

In this section we will discuss numbers. I will address numbering systems by their BASE number and by their system number. With that idea in mind, we start off very slow with base-10 number system, and then show how to jump to other numbering systems. Base-10 numbers are also called decimal numbers. So what are some of the attributes that we know about the base-10 numbering system?

A look At Base-10 Or Decimal Number System

Base-10 numbers use these ten symbols that we call numbers
0 1 2 3 4 5 6 7 8 9
These ten symbols represent the base-10 number system.
All numbers within that system use some combination of
one or more of these symbols.

Lets start by thinking of the POWER of MONEY, which is based on the base-10 numbering system. Looking at the illustration to the right, the top row displays the BASE and something called an EXPONENT. This row had 10 as the base and the exponents 3, 2, 1, and 0. In simple terms, if the exponent is the number 0 you have what you have in the number set. In base-10 that is the range of numbers 0 through 9. Look at the far right-hand side of this illustration and note the 10 raised to the power of 0. This column with exponent 0 represents the numbers from 0 through 9 (cents in this example). The two columns with exponents 1 and 0 can represent any two-digit combinations within the number set. For my money chart that would be 0 to 99 cents. Column with exponents 2, 1 and 0 represent any three-digit number combination within the number set.

As we change from base-10 to different BASE-NUMBERS, this concept of an exponent to a base-number will become a key in understanding numbers that are not base-10. ONE MORE NOTE: We generally do not address what we do not have. If I said I have $50.00 that is equivalent to $0050.00 but the two leading zeros before the 5 are considered bad form. There is no need to tell the reader there are no hundreds and no thousands in the number. Even with the leading 0 being a valid number it adds no value to the statement $50.00. However, there are times, especially in binary math, where the 0 is handy as a place holder.

OK, time to dig in. Lets start by adding the number 123 to the number 345. In reality I am adding 100 plus 20 plus 3 plus 300 plus 40 plus 5. In breaking this process apart, we can look at the parts, in order.
In the "ones column" 3 plus 5 is 8. 8x1= 8
In the "10 column" 2 plus 4 is 6. 6x10= 60
In the "100 column" 1 plus 3 is 4. 4x100= 400
The answer is 468

We also know something about the word CARRY. To see how this works, replace the number 123 with the number 167 in this simple equation.
In the "ones column" 7 + 5 is 12.(carry the 1) 2x1= 2
The 10 is too large for the 1's column and
is carried into the 10's column.
In the "10 column" 1 + 6 + 4 is 11.(carry the 1) 1x10= 10
Again the 100 is too large for 10's column
and is carried into the 100's column.
In the "100 column" 1 + 1 + 3 is 5.(no carry) 5x100= 500
The answer is 512

Base-2 The Binary Number System

Now we move into the base-2, or binary numbering system.
In base-2 the carry is used in nearly EVERY math function.
The base-10 numbering system used 0,1,2,3,4,5,6,7,8,9.
The base-2 numbers are 0 and 1. Only two symbols
All numbers within that system use some combination of
one or more of these numbers.

We will add the base-10 numbers 17 and 23 in base-2 after we convert them to the base-2 numbering system.

Why do we care? Because many logic operators use base-2 logic. Consider the logical steps the eye doctor uses in selecting the correct glasses strength.
She or he might say, looking at the eye chart, is number one or number two clearer?
This is number ONE! This is number TWO! Again ONE! And TWO!

In electronics we want to know how to do operations based on binary logic. Electronic functions can answer a questions including: Is it dark outside, is the door open, did the car start, did somebody press a key on the keyboard, and so on.

Take a quick look at the chart illustration. Along the top we see the base number is 2 and the exponent numbers are 5, 4, 3, 2, 1, and 0. We can easily have exponents larger then 5 but for this example this is large enough. The illustration also has a section on the left titled B-10 Carry and numbers written below in base-10.
To the right of the number 17 is the 32s column.
17 is not equal to or larger than 32, place a 0 in that column.
Moving one column to the right to the 16s column.
17 equal to or larger than 16, place a 1 in that column,
and subtract 16 from 17, with remainder of 1. This is because the 16s column is the placeholder for that amount of the origional number.
Moving one column to the right to the 8s column.
1 is not equal to or larger than 8, place a 0 in that column.
Same with 4s and 2s placing 0 in each of these.
1 is equal to or larger than 1, place a 1 in that column, and subtract 1 from 1, with remainder of 0, so stop.
17 in base-10 equals 010001 in base-2.

Now repeat these steps with the number 23.
To the right of the number 23 is the 32s column.
23 is not equal to or larger than 32, place a 0 in that column.
23 equal to or larger than 16, so 1, with remainder 7
7 is not equal to or larger than 8, place a 0 in that column.
7 equal to or larger than 4, so 1, with remainder 3
3 equal to or larger than 2, so 1, with remainder 1
17 equal to or larger than 16, so 1, with remainder 7
1 is equal to or larger than 1, place a 1 in that column, and subtract 1 from 1, with remainder of 0, so stop.
23 in base-10 equals 010111 in base-2.

Starting at the far side add numbers and the carry.
1) 1s column, 1 plus 1 is 0 with carry of 1 to column 2s = ? ? ? ? 0 plus carry
2) 2s column, 1-carry plus 0 plus 1 is 0 with carry of 1 to column 4s = ? ? ? ? 0 0 plus carry
3) 4s column, 1-carry plus 0 plus 1 is 0 with carry of 1 to column 8s = ? ? ? 0 0 0 plus carry
4) 8s column, 1-carry plus 0 plus 0 is 1 with NO-carry to column 16s = ? ? 1 0 0 0 NO carry
5) 16s column, NO-carry plus 1 plus 1is 0 with carry of 1 to column 32s = ? 0 1 0 0 0 plus carry
6) 32s column, 1-carry plus 0 plus 0 is 0 with NO-carry = 1 0 1 0 0 0

Converting 101000 back to base-10 by adding the 1 in the 32s column to the 1 in the 8s column equals 40 in base-10.

Hexadecimal Number - Base-16

In this illustration we will take a look at base-16 numbers. Because our decimal number system does not have 16 symbols we need to add 6 additional symbols to the 10 we generally use.
Base-16 numbers use these symbols as numbers
0 1 2 3 4 5 6 7 8 9 a b c d e f
In base-16 also called hex and hexadecimal, all numbers within that system use some combination of one or more of these numbers.

The table is in three sections. Starting at the top of the left section in its fat left column is the number zero. Looking two lines below that, in the third line, it reads 2 0000 0010 2. The first number 2 is a base-10 number. The numbers 0000 0010 is a base-2 number for 2. The last 2 is a base-16 number for 2. Moving to the last line in that section, the line reads 15 0000 1111 f. In this line the 15 represents the base-10 number for 15. The number set 0000 1111 is the binary number for the same value of 15 and the f is the hexadecimal number for 15. Note that when writing base-2 numbers it is easier to read them if they are split is sets of 4-digits starting at the right side. For base-16 numbers, the f is the largest single digit number in that set. Now, moving to the top line in the center column, this number represents the values for the number 16. Review the table and notice how the base-2 and base-16 numbers change over their number sets.

When working with mixed numbers the base needs to be written. For example 20h(hex) times 101b(binary) equals 160d(decimal).
If you add
5d = 0000 0101b
8d = 0000 1000b
7d = 0000 0111b
4d = 0000 0100b
___ _________
24d = 0001 1000b
It is easy to use a chart or a calculator to start with.
This chart has the first 48 numbers (0 is a common number in electronics)
The same number 24 as represented in base-10, is 0001 1000 in base-2 and 18 in hex(base-16)

One more bit of useful information is using a conversion table. It is common to use letters to represent number. At the center of the table is the 1's place. To convert form 100 pennies to 1 dollars divide by 100. To convert a kilometer to meters multiply by 1000. A MICRO-something is very small at one-millionth of the something. If your camera has a 5.1 megapixel rating you will have 5.1 million pixels (5100000 pixels) of picture resolution. A tera-byte of data is one-thousand-billion bytes of data. That is a lot.


« Previous Chapter Next Chapter »




Copyright 2018, All Right Reserved