Thursday, August 20, 2009

Computer literacy 101 -- what is memory?


We talked about the microprocessor, or CPU, of a computer last blog -- but what can it do without someplace to store, and retrieve, information (next entry will talk about how that information -- or data -- is used)?

The first thing to know about memory for computers is the idea of address space. Address space serves the same purpose for computers as postal addresses do for paper mail. Often that address space will start at zero (0) and continue to as large as the physical memory allows. As an example, you have a 4GB flash drive that you use for assignments -- carried between home and work, or classes. The addresses of the information on that flash drive will be from 0 up to 4 gigabyte - 1 (or
actually 4,294,967,295 but you can think of it as 4,000,000,000 units of information).

You also may have many different locations for memory -- these are called storage units. So, you may have a hard drive, a DVD-ROM drive, a USB flash card, and a set of backup files on a tape unit. Using the comparison to the paper mail system, let's say that each of these are in a different city -- so addresses consist of the information location (0 to 4 gigabyte on the flash drive) and storage location "G:flash_drive".

Alright, this is pretty cumbersome and it can really strain a microprocessor to directly address 4 gigabyte of memory (although it is possible for computers that describe themselves as "64-bit processors"). So, what most computer systems do is to break this memory down into separate "blocks" (or streets in the mail system). Each block may consist of 512 bytes. Therefore, we can now address a block as "G:flash_drive", "block 0 to 8,388,607" and a specific location as "G:flash_drive", "block 1,567", "byte 93".

OK. We see that by numbering the information and then breaking it down into separate groups we can effectively find all the information. But it is still rather clumsy talking about "G:flash_drive", "block 1,567", "byte 93". That is where the file system comes into play. A file system starts putting all of those numbers into friendlier terms. "Charles resume" is a lot easier to remember when one is doing a word processing program than telling it -- give me "C:CKS_hard_drive", "block 7,432 through 7,987", "bytes 0 (of first block) through 345 (of last block)".

Not only that, but this specific labeling of the location makes it very hard to move it -- what if I add something to the information (or file)? It will get bigger and the location will also get bigger -- do I now have to remember a whole new set of numbers? No. The file system will keep track of just where the file is now located and how large it is. (It also means that the file does not have to be contiguous -- the bytes can be located in different blocks and not come one after another.)

There are two other regions of memory that should be understood -- these are RAM and registers. Random Access Memory (RAM) is like your own pile of papers on your desk. It can be gotten to very quickly and is "right there". Registers are like "post-its" and are used for temporary copies of numbers to be used. RAM will often be addressed just by the byte numbers and registers will be referred to by special names (R1 for register 1) -- but these details aren't really important to most people.

Now that we have information in memory, how do we use it? That is the concept of data.

Wednesday, August 19, 2009

Computer literacy 101 -- what is a computer?


Back from jury duty (actually, jury selection -- I didn't have to serve). I am going to start my short series on areas that I feel are important to become computer literate. I will try to make it useful but not to go into greater detail than necessary.

A computer, of today, is based on a semiconductor chip called a microprocessor. This is also sometimes referred to as a CPU (Central Processing Unit). This microprocessor changes numbers. It does very simple things with the numbers -- moves them from one location to another, shifts them (which effectively multiplies them by 2 or divides them by 2), does "logic" operations on them (which, if you don't know what that is -- will be another topic in the future), and changes the order in which it follows directions depending on the values that it has been given or has created based on the instructions given. That's about it, although some microprocessors will have other instructions that are actually shortcuts for a sequence of operations that could be done with a long series of simpler instructions.

The microprocessor does simple things with the numbers -- but it does them very, very quickly. When you see an advertisement for a "4 GHz CPU", it is an indication of how fast the microprocessor is and an indication of how quickly instructions can be processed. Larger numbers indicate a greater potential for speed. I say potential because the final speed depends on many design factors but, in general, you can use these numbers as an indicator of speed.

Microprocessors are used in many devices in our modern world. When they are in something that allows its use for different, non predetermined, purposes, it is called a "general purpose computer" or just plain old computer. Most people are familiar with smaller computers that are referred to as Personal Computers (PCs) but computers come in many sizes from a "smart" cell phone to a large "mainframe" which might be as large as several filing cabinets (they keep getting smaller, though).

The other category of use of microprocessors is for specialized uses -- the microprocessor is used for only one thing, or for one category of uses. Televisions, amplifiers, DVD players, watches, digital clocks, refrigerators, coffee makers, fuel injection and engine monitoring systems, traffic lights, alarm systems and MP3 players are all examples of devices using specialized processors. Some devices start entering into a "grey" area where they could be used for various, non-predetermined, purposes but are actually primarily used for a single purpose.

The microprocessor does not exist just by itself. It must have access to ways of giving it information upon which to work and ways to give results. In order to do this, other electronic devices will be connected to it and they, in turn, will be connected to other devices. A digital watch is an example of a very "simple" system which has buttons for setting information and a display to give results.

One very important additional item to which the microprocessor must have access is memory, which will be the topic of the next blog.

Friday, August 14, 2009

Computer Literacy?


My 10-year-old, fifth grade, son came to me the other day -- he had a micro SD disk that he said had cheat codes on it that he wanted to use for some Wii games. I connected up my card reader to the USB connection on the Windows machine and looked at the files. I looked -- and then I rewatched the Youtube tutorial on how the program was supposed to work -- then I said to him "OK, this is the data file -- where is the program?" He responded "what is a program?".

Admittedly, only people with a historical bent are truly interested in how I started programming with little toggle switches on the front of a DEC computer -- or the huge decks of punched cards that I used in college to meet the needs of my programming classes. But, I do think that children who are in a school with a computer lab and multiple computers in the classroom should not be asking "what is a program?" by the time they're in fifth grade. And it's a good school.

Computer literacy seems to be interpreted as the ability to use particular programs (even if they don't know what a program is). My son did a couple of PowerPoint presentations last year for class and he's used Microsoft Word for a few papers. He has no problem in using a browser (even if he doesn't know what a browser is) and searching for information with Google. BUT, I still maintain that it is hard to transfer skills from one program to another without knowing some computer basics.

Many of the readers of this blog will already know most of this -- but I'm going to use my next week of blogs to talk about computer basics that I, personally, think ought to be known to be computer literate.

Subjects will include:

What is a Computer?

What is memory, files, and storage?

What are data (besides being a character on Star Trek: The Next Generation)?

What is an operating system (all my children keep complaining when a Windows program won't work on the family Macintosh)?

What are programs and how do they work?

What are peripherals -- what is I/O?

And any other topic that comes up within this realm. I once wrote a book ( never published) on computers and how they work -- let's see if I can summarize in a set of reasonably sized blogs.

Thursday, August 13, 2009

Smart plugs, dumb plugs, and dumb designs


I read a lot of emails, and articles in the magazines I read, about the next way to save electricity.

Some of these are related to the problem of passive power loss. This occurs when an electrical appliance is plugged in but is not actively in use. If designed well, then they will not use any power when they are turned off -- but what is off?

Any device that can be turned on by a remote is not completely without power. Any device that maintains an active clock (not powered by batteries) is not completely without power. And, in today's world, that makes up a large percentage of the electrical devices in our houses.

A "smart" electrical strip is designed to have one unit on a power monitoring circuit. The remaining outlets are triggered to provide power only if the monitored outlet starts consuming electricity beyond a certain level. For example, a television might be plugged into the monitored outlet. When it is "off", it only requires a certain level of power but, when on, it greatly increases the electricity needed. At this point, the other outlets become active. A DVD player, for example, might be plugged into a "client" outlet and the television into the monitored outlet. Until the television is turned on, no power is given to the DVD player (and the remote will not work with it).

Unfortunately, this is very limited in its uses. A DVR cannot be plugged into a client outlet because it runs timed events (an active clock). Same is true with a VCR. It MIGHT be useful with an amplifier or receiver but not with a satellite receiver which requires passive checks for updates of data over the phone lines. Every potential scenario must be carefully examined.

I purchased a "Kill-A-Watt" power monitor via a "Gold sale" on amazon.com. It seems to be designed well (with a few not-too-important caveats) but I have been unsuccessful in tracking down the largest electrical uses within the house. I thought that my study -- with four computers, a printer, LAN, and quite a few other individual devices (such as hard drives and powered disk readers) was surely the culprit. But it wasn't -- so the "Kill-A-Watt" was useful to disprove that. I now believe that the main drains are the pool pump and the house fans -- usually direct wired and often badly inefficient and expensive to replace.

So, how to reduce electricity use? Unplug those items not in use (some DO use power even when "off"). Run as many items though an Uninterruptible Power Supply (UPS) as possible in a study -- a UPS will act as a buffer for items on reduced power demand. Reduce the number of internal clock devices. Keep the lights off when not in use. Use fans that have energy star ratings if possible -- and keep energy use in mind when purchasing new items.

Tuesday, August 11, 2009

It's not easy to drive green


As the joke goes, the simplest way to drive a green car is to take it into the body shop for a new paint job. Personal automotive transport just isn't the overall best way to reduce carbon output. Walk, bicycle, ride public transportation, skateboards, pogo sticks -- fill it in.

But folks love having their own "wheels" -- the freedom to go when and where they want and not have to take a long time in the process. So, recognizing that it'll never be the "best" solution, what are the ways to make it as green as possible?

First thing to do is to recognize that there are two different statistics involved with the eco-friendliness of transportation. These are the local carbon footprint and the overall effects on the environment.

On the local carbon footprint, matters are fairly clear. If you use a traditional gas/diesel engine, get one that has the best MPG. Next down comes hybrid cars -- which have an "extra" in that they pollute less when stopped at an intersection. Yet cleaner (locally), are natural gas, all electric, hydrogen, and solar (not quite feasible yet -- but perhaps soon).

So, if everyone drives an electric car, there will be no more pollution and the world will be saved. Right?

No, not that simple. Of course, there is the fact that private transportation is only part (albeit an important part) of the climate problem. But the big problem is that it doesn't cover the overall effects on the environment -- which are NOT easy to determine and which are not always immediately "obvious".

The June 2008 issue of Wired mentions that manufacture of batteries for hybrid cars has a BIG carbon footprint. I don't have the issue nearby but it offsets the carbon savings from using a hybrid by many years (5 to 10, as I recall). So, a Smart car is still a better bet -- in spite of the excitement of hybrid.

What about the zero-emission alternatives? Well, they have to manufactured. They also need roads to drive on. They need parking spaces (take a peek from Google Earth and just see how much of the land is occupied by roads and parking spaces -- especially in cities). And, except for yet-to-be-viable solar cars, their fuel still needs to created and transported.

Let's say that you have an all-electric car. How is that electricity produced? Is is a solar farm or a geothermal plant? Well, probably not (though possible). The electricity is produced and the conversion of energy is not 100% efficient (it varies a lot depending on design and fuel). Wikipedia indicates that there is a little over 7% loss in transporting over the electrical grid.

Depending on many factors -- such as how eco-conscientious the power producer may be, that electric car may actually have a larger carbon footprint than a Smart car. (I keep using a Smart car as an example -- if you prefer, just exchange that for a "very small, efficient internal combustion car".)

I used electric cars as an example but the same analysis holds for hydrogen cars.

The bottom line is that it's not easy to drive green -- so check the first paragraph for truly better alternatives. Then, if that doesn't fit with your life, organize your trips to reduce miles. Get as small of a car as works for you -- rent something for those "once a year" situations. Live and work locally if at all possible. Reduce the miles driven and spend more time with your friends and family.

Most of all, keep the "big picture" in mind. Don't feel guilty -- act responsibly.

Monday, August 10, 2009

From cordless to mobile


Apologies for taking so long to resume my posts. Frankly, it was a bit difficult to feel like posting when it seemed like no one was paying any attention. But, I've decided that that is no reason not to post, and I really appreciate the feedback from my one (perhaps only ) reader -- thank you Leda. Please, everyone, do tell me about what you are interested.

Last post, I talked about going into the details of what makes a mobile/cellular phone different from a cordless phone. There really isn't that much real difference. The primary differences are distance between the handset and the base station and the fact that each base (cell) station will handle more than one phone. In addition, there is a need for handover (handoff) of the phone from one base (cell) station to another as one moves around.

When one uses a cordless phone, it must synchronize with the base station. To do this, it may require cycling between "channels" to find a clear connection. However, it is still a relatively simple connection -- usually no need for identification or security.

A cell phone goes through a number of stages. When it is powered up, it basically "shouts" into the air and these transmissions are omnidirectional (unlike a satellite link, the handset may be in any position relative to the base station) so the signal must go all directions. Although it is possible for carriers to share a pool of transmission frequencies, it is more common for a single carrier to use a set of frequencies. So, the phone shouts out within this bandwidth and waits for a response.

The cell station listens and then, using identification information found in the initial transmission from the mobile handset, sends back a response. It is possible that a further exchange of information (called a handshake) will take place to further identify the specific phone and the services available to that handset. This process is known as registering. Much of the registration information will reside in the memory (or specialized memory -- known as a SIM) of the handset. The first time you use your handset, much more information is exchanged to build up the store of data in the handset.

Once registered, people can call you and you can call others. Signal strength (or number of "bars") will make a difference about the clarity of the call. However, calls are really made between the base station and the other phone -- not the handset. The handset is the final destination/origination of the data (voice or email or whatever) but the call is really between the base station and the other end (peer).

The base station may make an additional jump to a more powerful station or it may directly connect into the wired "landline" phone networks. At some point, almost all mobile calls are actually routed via landlines. It is just more efficient to use the Radio Frequency (RF).

The ability to do the "handover" is what really disctinguishes a mobile phone from a cordless phone. As you move, with your handset, the signal strength from the current base (cell) station will change. If it decreases, it may reach the point where the signal just isn't strong enough to continue the call. When the signal strength decreases, the handset will start shouting again. If it finds a new, stronger, base station, it will initiate the "handover", which is basically the same thing as a "transfer" from a non-mobile phone. The call is transferred from the old base station to the new base station and it will then act as the primary endpoint for the call (with data continuing to be exchanged with the handset).

This transition must be done very quickly to allow an interrupted use of the circuit. Because of this transition delay, the handset and base station may behave a bit differently if a data session is in use -- perhaps setting a lower signal strength trigger for handover and waiting for a pause in data to do the transfer.

Of course, all this doesn't actually work as simply as described. In particular, the RF transmission and reception are very difficult areas to engineer. Although I have taken enough physics and engineering courses to understand, in principle, how the RF works, my general impression is that RF engineers are magicians.

So, that is really the difference between a cordless phone and a mobile phone -- the ability to do that transfer (handover) as smoothly as possible.

I leave you at that point but will try to post on a much more regular basis.

Friday, October 5, 2007

What makes a phone mobile?


I have a mobile phone. No, it isn't a cellular phone. It's a cordless phone and I love it. I can work on the laundry or putter about in the kitchen or even go out and get the mail and still be able to converse on the phone.

But, I admit, that's not what most people think of when you say a mobile phone. So, what is?

A phone has basically two parts. One part connects to the network, or phone company, or central office, or carrier, or whatever term you want to use. Over that part, the information related to how, and to whom, you want to connect to someone else is conveyed. There are a lot of different mechanisms from POTS (Plain Old Telephone System), to ADSL (sometimes the "A" is dropped nowadays), to ISDN, to optical fiber using a version of ATM over SONET. What do all those mean? Not much to most people although it is important to the service provider and makes a difference as to what things you can do over your phone. The main point is that it lets you be called and make calls.

The other part is the control part. Usually that means a keypad but it may be voice activated or have a touch pad. This lets you enter in the information needed to connect to whom you want to connect -- or make use of the services provided (call waiting, Instant Messaging, etc.).

The control part can be all in one unit -- traditional phone or "cell phone". Or, as in the case of my cordless phone, it can be separated from the control base and the information exchanged very locally (usually less than 500 feet).

The point of a mobile phone is mobility. Presently, that means more than 500 feet to most people. What do you need for that?

Basically, you have to extend your "access point". The access point is where you connect to the network. A "landbased" line has a physical line that connects to a jack in the wall (well, there are some other ways -- but that's the way almost all are connected). A "cellular" phone connects via "airwaves" (let's leave out the various frequency bands for the moment) to a transmission tower which is the access point.

And that is what is meant by a mobile phone -- extending the access point. How is that done? Stay tuned for that in the next post.

It takes two: But somehow, US legislators hide the other behind a curtain

     This newsletter is about something that should be of concern to everyone. But, to discuss it, I will be jumping over a topic that is of...