Computers Simplified
Computers are stupid. They do not
understand English or mathematics. All they understand is on and off. Humans
are intelligent (even your neighbor who wears plaid pants with a pinstripe shirt). Intelligence is the ability to learn then
apply that learning. Consider the following example: how do you divide six apples among three people? The correct answers
are either to make applesauce or two apples each. To translate this into language the computer understands it has to be fed
the data in the form of six divided by three and receive the answer of two. It could be apples, oranges, or even elephants.
The items being divided do not enter into the equation. Sorry kids, 6 ¸ 3 = 2 is an equation.
There appears to be a contradiction here.
A ‘stupid’ computer is required to calculate trajectories for space travel.
This ‘dumb’ machine corrects spelling when writing letters. The advantage computers have is speed. A computer
computes by translating English into a code of ON’s and OFF’s. When a light switch is turned on, a light bulb
is lit. When the switch is turned off, the light bulb goes out. When lit there is one glow of light. When the switch is turned
off, there is zero light. By using one to represent on and zero for off, we have translated an English statement into mathematical
terms. By expanding on this, computers can work with numbers and words. A number system that only uses zeros and ones is called
binary. An advanced degree in mathematics is not needed to use a computer, but to totally understand them requires understanding
the basics of number bases.
The base of a number is the number of digits
used. The prefix bi means two, and has the digits 0 and 1. Thus binary is base
two. Octa is the prefix for eight and has the digits 0, 1, 2, 3, 4, 5, 6, 7, and is the octal number
system. Base ten has the deci prefix and is referred to as decimal with the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Hex is the abbreviation
for sixteen, and is called hexadecimal. This will be explained in more detail later. Most humans use the decimal number system,
computers use binary numbers. Octal and hexadecimal are shortcuts used between decimal and binary. Since hex (hexadecimal) is the most commonly used, it will be explained in detail later, while octal is
only mentioned in passing. All number systems start counting from zero and the
base numbers are all single digits. This presents the problem with hex. The ‘digits’ in this system are: 0, 1,
2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, and 15. Ten through fifteen are not single digits, so they are represented by
the letters a, b, c, d, e, f.
The first step is to understand how numbers
are represented. To indicate a number larger than the largest digit is done with exponents and
place value. Let’s start with decimal. 100 = 0, 101 = 10, 102 = 100, 103
= 1000, etc. The exponents (the little number above on the right hand side), is the multiplication factor. This multiplication
factor is the number of base numbers multiplied together. 100 is zero 10’s multiplied together, 101
is 10 times one or 10, 102 is 10 X 10 or 100, 103 is 10 X 10 X 10 or 1000. Any number less than
the base number is then is multiplied by that base and added. For example the number 6 is 100 + 6, 31 is 101
X 3 + 100 + 1 or 10 X 1 X 3 + 10 X 0 + 1, which is 30 + 1 or 31. Clear as mud, right? There is an easier way. We
will come back to exponents later when hex is fully explained. The exponents
can be viewed as placeholders. Starting from the right and going to the left we have: 103102101100.
To make this explanation easier, the numbers will be written as X’s and the exponent as it’s actual place value. X1000X100X10X1X0. Written another
way we have:
5642 or
10 X 0 + 2 = 2
10 X 1 X 4 = 40
10 X 100 X 6 = 600
10 X 1000 X 5 = +5000
5642
By adding these numbers we arrive at our
final answer of five thousand six hundred and forty two.
Binary numbers are ideal for computers. A switch is either on or off. Two primary functions for computers are number
crunching and data manipulation. Number crunching uses the total numeric value for addition and subtraction. Data manipulation
relies mostly on place value. All mathematical operations such as multiplication, division, square root, and all other advanced
formulae use repeated additions and/or subtractions.
Before we leave the subject of exponents,
let’s take a preliminary look at memory and prefixes. All large numbers
in the data processing world is done with metric prefixes. The smallest is kilo or
k for short. Kilo means 1000. The basic unit, k, is equal to 210,
or 1024 in decimal. The next size is mega, or million, and is equal to 2100, billion is 21000 and uses
the prefix giga. Ok, we know the three primary prefixes, kilo, mega, and giga, but what are the prefixes to?
Let’s start with memory, what it
is, how does it work, and what is the relationship with the exponents. The best example is a simplified description of early
mainframe core memory. Ferrite beads are placed on each cross section of a wire
grid. Through the center of each bead is a sensor wire. The basic principle is a voltage is applied to the cross wire such
that when that intersection has a voltage on both wires the bead shifts to the right, is detected by the sensor wire, and
transforms from a zero to a one. These ferrite beads are called bits. A contiguous row of eight bits is called a byte. Thus 360k (kilobytes) is 8 X 360,000 or 2,880,000
bits. Later chapters will go deeper into how these computers worked. An addition
problem would be entered into the computer with the switches on the console. First the top number would be entered then the
operation followed by the second number. The answer then would be displayed as a row of lights. For example: 4 would be entered
as 0000 0100, the operation for addition is keyed in, then the next number, 6 is entered as 000 0110 and the answer, 10, is
instantly displayed as 0000 1010 in lights on the console. Because the operation is done at the speed of electrons, the size
of the numbers means nothing to the machine. Entering data with switches and reading lights for answers, especially in binary,
is very time consuming. There must be a better way.
There is, it’s called hexadecimal.
By using hex, writing programs and converting alphabetic characters into a standardized code is possible. A very brief explanation
of numerical values follows. The digits are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. due to the large size, only four
places will be displayed. 163162161160 = 4096, 256, 16, 1. For example: the decimal number 2368. The hex value is 94016 or 9 X 162 + 4 X 161 + 0 X 160 = 2,304
+ 64 = 2,368. In binary the value is 1001010000002 or 211
+ 28 + 26, which is 2048 + 256 + 256 = 2,368. Manipulating small numbers is done on paper just as easy
as using one of these old time computers. It is not difficult to accidentally input a zero where a one should be or a one
instead of a zero. It would be better if we could enter data and numbers as we
see it. Another question along the same line is; how does the computer perform these numerical calculations and data manipulations?
The answer is programming.
Simply Math (Introduction)
Numbers, mathematics, algebra and geometry
give everyone a warm feeling inside. It is one of the easiest, most basic parts of life to understand. The simple fact of
the matter is that life as it is now would not exist without mathematics. Numbers do indeed form the foundation upon which
technology is built.
Ok, so maybe you are one of the millions
of people who shudder at the very word. It is not hard to agree to the necessity of math, but enjoying it is not as easy.
This is understandable. From day one in school people are thrown to the wolves as it were and told they had to learn math.
For the most part all training in the manipulation of numbers is done the same way. You get a book and have chapter after
chapter of problems to work out. As soon as you learn how to count, some fool always wants to know the answer when you take
two sets of those numbers and add them. It’s not enough that you have to learn how to do this, they inundate you with
page after page of numbers to add. After a few chapters of this they reverse themselves and want you to subtract numbers. They repeat this with multiplication and division.
This process is repeated for all mathematical
operations. The bottom line is that it gets tedious. It can get to be so mechanical that a persons mind gets turned off. No
excitement. This is supposed to be remedied by the famous or rather infamous, story problem. However, these do not just give
the numbers and say do this or do that. There are key words that indicate what operation or operations are to be performed.
The key is to understand what these words are. Story problems have scared off more students than anything that could be thrown
at them in a history class.
You graduate from high school and apply
for college. In many cases you are given a set of tests to determine the classes you need. The math test tells you what grade
level your skills are. Where do you fit in? Maybe you know ahead of time that your math skills are not as strong as they should
be, so you decide to work on raising them. Where do you start? The first thing you notice is that all math books tend to be
divided by grade level. Maybe you take a pretest and find out that your math skills are lower than you think. It is hard for
a person to pick up a book designed for grade seven when you are much older than that and realize you are unable to solve
many of the given problems. This book is about skills, not grade levels. As you age, many of the techniques learned earlier
tend to get rusty. This book is designed to be steel wool for the basics.
There are a few assumptions being applied.
The first of course is that the basic operations are understood. How to add, subtract, divide, and multiply is known, but
there are complications of these that will be pursued here. The other assumption is that people reading this want a book that
does not over or under whelm. Start at chapter one, but if that is easy and well understood, skip and go to the next chapter.
A suggestion is that when you find the chapter that is not understood, start reading at the chapter just previous.
Chapter one will be an overview of the
basic operations. What will make this different is the approach. There are many books on the market that give problem after
problem. One learns by rote repetition. There won’t be any problems like
traditional math books have. These can be made up by the reader or found in other books. The idea of this book is to show
what and how the various operations work.
Chapter two will deal with the advanced
form of addition and subtraction, that is, multiplication and division. In both chapters I will include decimals. There will
be a few stray algebraic equations in this chapter just to show how they look.
The reader at this point will be
familiar with the operations but that does not mean the work is done. We need to discuss units. Although the problem is stated
in inches, once we get over twelve, it needs to be broken down to the lowest terms. This will of course imply more division,
and subtraction. All units are English, metric will be described and a brief explanation will be given, but nothing detailed.
This will be in chapter four, devoted to
the conversion between metric and what is commonly referred to as English. Actually, English, or the feet, inches, pound,
units used in the United States, is called Imperial. Each by itself is relatively easy to convert, say from inches to feet
or meters to kilometers. The problem comes in when converting from inches to meters or the other way around. There will be
a conversion table and instructions on how it is used, and when.
Most complaints about math appear to stem
from story problems. I hope a novel approach will ease some of the pain when these are encountered. Most math books take situations
that are easy to set up in story fashion but are not realistic. Most people don’t go down to the train station and try
to judge when one train will arrive as compared to another. In the modern world
we calculate how long it takes to get to work based on certain situations. We go to the store and need to ascertain how much
clothes will cost based on the sale prices. These are real world story problems.
Algebra, in chapter six, is almost as scary. Looking at an algebra book for the first time you suddenly see that you will be doing
operations with letters. Now how in the heck did they ever come up with that crazy idea? Numbers are bad enough. Closer to
the back of the book it gets worse, not only are they using letters, but now some idiot has thrown in a bunch of Greek letters.
We don’t have enough, now they start using foreign alphabets. Besides, algebra isn’t used in the ordinary real
life day-to-day existence, is it? It is and I intend to show where and how.
Chapter seven will present a new angle.
It will also show squares and rectangles. Here is where we enter the world of geometry. Some of the basic equations for area
and circumference could have been covered earlier, but it is easier to understand these concepts after a basic understanding
of working equations is established. It is also better to go from the simple to the more complex in the same location without
having to constantly refer back to earlier chapters or other books. By the end of the geometry chapter, we will enter the
modern digital world.
Now carpentry is a lot of sawing and hammering. All that’s needed is to know
how many boards to cut, how many nails will be needed and what holes need to be cut, right? That’s true if you want
a square house with a flat roof and don’t care that the hole for the sewer pipe and electrical lines are only twice
as big as they need to be. In reality however, most roofs are designed at an angle so water can run off and the squirrels
can have a slide to play on. Very few carpenters actually grab a pile of lumber and build their house. Most use something
called blueprints. It is here that the person has to know geometry to figure out all the angles and hole sizes. Some of the
basic equations are first learned in algebra, but anything beyond the simple angles requires a different division of mathematics.
There are more advanced forms of math but to go from addition to calculus,
a higher form of algebra, in one book is a little much. Each chapter will have a summary and at the end of the book will be
an appendix that contains abbreviations and the Greek alphabet. This book is for entertainment first and learning second.
So let’s round up those numbers and get them corralled, we have mathematical operations to perform!
One of the stories from Journey into the Surreal
Nightmare after Breakfast
The noise was deafening! What was all the commotion about? I jumped from my warm bed to still the racket. "Do you
hear that?” I asked my still sleeping partner. Getting a negative answer
I rushed to the kitchen and threw open the door on the refrigerator. The milk fairly jumped into my hand. "Take me, use me".
If it had knees it would have been on them, begging. The noise was still there, what was it? I flew to the pantry. Cornflakes!!
I seized the box, and poured some into a bowl. I topped it off with some cold milk. Yes, that was the source of all the ado.
Breakfast was calling me.
Some people have an ear for music, whereas mine is tuned to food. Garden items take on
a life of their own when I am around. Early mornings are the worst, because the cereals tend to make a sound similar to a
party about to be raided. The longer I wait the worse it gets. I tried to stay in bed past 8:00 one time, and woke up with
a string of cheerios tugging at my arm. Gotta watch them, they get themselves interlocked and act like a cowboy’s lasso.
They know when it is time to eat and will not stop until my fast is broken. I almost got nailed by a couple of eggs once,
but I threatened to hard boil instead of fry them. They sulked back to the fridge and left me alone. Eggs don't mind being
fried, but being hard-boiled is no yolk for them.
Having fed my face, I decided this might be the best time to
go get groceries. I learned a long time ago that it is not safe for me to do this on an empty stomach. I had a bad experience
with that situation. Foods that I would not even want to be in the same store with, suddenly jumped out at me. Okra's tried
rolling under my feet and I caught a couple of mushrooms trying to plant themselves in my cart! Hastily I tried to make my
escape, when I noticed some bean sprouts had intertwined themselves around my legs and were holding me fast. I broke free
just in time to avoid the eggplant rush. Those vegetables get mean sometimes.
I felt safe this morning. My stomach
was not sending out distress signals. As I guided my cart towards the vegetable aisle, my senses went on peak alert. I thought
I heard a plaintive cry. Rounding the corner, a poor chili pepper was shriveling up in utter distress. I learned the tail
soon enough. The poor pepper had the hots for a red hot tomato, but to his horror someone had just picked her up without so
much as a second thought as to the feelings of the poor pepper. He cried out to her to marry him, but her reply was, "Cantelope
with you; they won't lettuce." His woe was deepened when he heard the words, "This one looks very saucy". I tried to console
him by pointing out a very hot jalapeno just on the other side of him. She told him she was burning with desire. I left them
to get acquainted and proceeded down the aisle.
Off to my left, things were really jumping. The floor was soaked.
The onions were laughing so hard they were actually crying. The potatoes had their eyes glued across the aisle. I now understood
the source of the mirth. The very husky sweet corn was throwing out some really corny jokes. They were located in the right
place because right behind them were all the nuts. The walnuts were cracking one-liners left and right and the pistachios
were splitting their sides. Most of the Brazilians were a hard nut to crack, but some had busted their seams laughing. I saw
a small riot starting back besides the cabbages. The biggest head of the bunch was getting ready to jump over the wall and
smash their neighbors. I asked what the problem was. "Those are the freshest beans I have ever encountered". Turns out that
the longest and lankiest of the new pile of green beans was making passes at the wax beans on the other side of the cabbage.
I calmed the beans down and asked after the rest of the family. "Not so good, I'm afraid. Most of them got canned last week".
I pointed out that their bin mates on the other side of them didn't seem too upset about their family being taken. "Of course
not, they were being pickled". Just what this world needs, cucumbers with a hangover! I heeded the call of the next stop when
I heard the cry of "Lettuce be your salad". It was a good idea.
I found the bakery. A well bread aisle if there ever
was one. The eyes of the potato bread followed me all the way to the bagel section. I bagged a few bagels. The hunting was
good this morning. I set my sights a little higher and thought, "Cheese, there must be something I want." As I passed the
dairy section, a whimpering from the sack in my cart was heard to plea, "Butter me up". I threw in a pound of margarine. This
was not eggs actly where I wanted to be, but I grabbed a couple dozen of the hen fruits just for good measure. Never know
when a good yolk is called for.
I was startled by the loud yell, "Yogurt away from here". I know what that stuff
does to me, so I bee-lined it out of there. That reminded me, we don't have any honey at home. I made a mental note to pick
some up. I hate the idea of getting home and being stung by forgetting it. Hot dog! I mustard get some o this yellow stuff
to really bring out the flavor. I'll let my other half ketchup with me with this bottle of smashed tomato stuff. I have to
give my condiments to the cook, she can make a seven course meal out of dogs, burgers and chips. Ok, I know this sounds a
little corny, but I do need to pick up a bag of Fritos. As I headed down the aisle I noticed how some of the corn really exploded
just to please us. I preferred doing my popcorn in the hotbox at home so that it is nice and warm. My favorite way to relax
is to nuke some corn and wash it down with cola while enjoying a movie on the idiot box.
Stepping around the corner
to the soda aisle I get a large Jolt. Actually, the Jolt got me, a whole case o the stuff!! I threw it back, too much caffeine.
I'm from the Pepsi Generation, this new kid on the block knocks my system out of whack. With a spritely step, I wandered down
towards the cola section. "Orange you gonna grab ups a couple o me boxes?" Orange soda never was known for good English. Gingerly
ale made some selections. Might root around for some non-alcoholic beer. I looked down to reprimand the orange soda for such
poor use of the language. "Hey, now this is cherry! "Threw a case of black cherry into the cart. "Watch it!! We're getting
a little soft down here". I moved the margarine. Just for medicinal purposes I grabbed a case of Dr. Pepper.
Well,
it's time to cow down and check out the real piggish department. As it turned out, I was a little chicken, so I threw some
skinless breasts into the cart. I followed the cooler down towards Elsie's family. I steaked out some decent cuts and piled
them on top of the soda. Hunger was creeping up on me and my ribs were getting sore, so I grabbed a couple of packages. While
in that area I started licking my chops in anticipation. In goes some cellophane wrapped cuts of pork. While walking along
I realize that I am supposed to be the person that brings home the bacon, so into the cart with a couple of pounds. The cart
is almost overflowing.
Well, before there are no sides left on this cart, I better add in some side dishes. Ah, this
was so rice. If I sneak back and snatch one of those hysterical onions we could make pilaf. Working my way down the aisle,
some macaroni was trying to elbow its way in to my cart. I need to call my realtor when I leave here. I wanted a piece of
land that is a foot wide and a mile long so that I can raise spaghetti. If the land has too many bumps I may have to settle
for lasagna noodles. I just found the ideal side dish for Sunday, angel hair pasta.
Holy cow! I almost had the entire
heavenly meal for this coming day of rest. Already have the pasta and ribs (a few extra from Adam?). I just needed to pick
up some peas (a very well mannered vegetable), and an angel food cake. Let's see, on this end we have cashews, walnuts and
on the other end was where mushrooms and chickens get creamed. Cans to the left of me and jars to the right. I should be able
to complete the vegetables here anyway. These beans think they are just stringing me along. Into the cart with two cans of
the French cut style. I bean up and down this aisle and don't see anything else worth getting. I took a left at the end.
Now
this was flaky! Those pastries kept popping up. Sorry, I don't pick up tarts. That was the kinkiest aisle in the store. They
do things with corn and rice that is almost sinful. There was a box that put a whole new twist to popcorn. Well, for one thing
it said corn pops, not the other way around.
|