- Computers & Software
A Computer Tutorial
What is a computer? In specific, a general purpose computer or a Turing machine. There are specialized computers that does many amazing things. This hub is a tutorial on the basic computer that we are all familiar with. They come in two flavors, an IBM PC and an Apple Mac. If you are looking for tutorial on how to use a computer, you are in the wrong place. I suggest a PC User's guide.
Most of us know how to use computers just like driving a car. However, few of us knows what is under the hood. In some cases, it helps to know a little about the guts of a computer. This will give one a better perspective and a better understanding of the computer as a powerful tool with limitations.
- February 2016
I've been around computers of all sorts for over 40 years. I started on the IBM 370 mainframe and now owns a Mac. I've been designing microprocessors and have been programming in various languages. I have a unique perspective having been through the computer revolution. There is a mystique about computers and most people don't have a clue about it. They know how to use it for various tasks but they don't know the basics.
This basic tutorial is to teach a novice about the computer. Not so much how to use it but to understand what makes it tick. I will try to simplify the concepts and use analogies to explain them when appropriate.
What Is a Computer?
Think about it, a computer is just a fancy calculator. It is very good at crunching numbers. It is a tool that we can use to help with our various tasks. It can help us write a letter, do our taxes, look up information or order products. It is also entertainment with music and videos and various games. Perhaps the most important thing to realize is that it is not intelligent. It is not a "brain" as some use that comparison. It is wired to follow instructions exactly as programmed. Occasionally, it crashes due to some unexpected errors.
A Global View
Taking the big picture view of a computer(a Turing machine), is that it is a machine that is designed to process data from one form to another. What makes it different from all other machines is that it is a "general purpose" machine. Unlike a car or a washing machine or a vacuum cleaner, the computer can do many tasks that the other machines can only do one specific task. This was not always the case. I can remember a machine called a word processor. It's soul purpose is to create office documents similar to what we can do with MS Word or Adobe Acrobat. Or going back a little more into history, the typewriter is a machine designed to create a paper document.
What makes a computer different? The genius of the computer is realizing that information no matter what they are (words, music, images) can be represented digitally with a binary code of ones and zeros. Once we have the "coded" data, we can process them much more easily and manipulate them exactly and precisely based on a set of rules. Once we got the results we needed, they can be "decoded" or translated back to forms that we humans can relate to.
What's even more interesting is that Charles Babbage, the inventor of the programmable machine, realized from the point of view of the machine, it makes no difference between the data and the program. They are essentially equivalent. This simple realization lead to the design architecture of the modern computer by Von Neumann.
The Various Parts of a Computer
- Operating System
- Disk Storage
- I/O devices
- GUI interface
The Clock and Multi-tasking
When you look at the common specification of a computer, one of the number quoted is the clock speed of the processor. 2.8GHz is a common speed of some Apple Mac computer. What does that mean?
The clock rate of a processor is the smallest slice of time that a computer processor operates. The faster this rate, the more slices you can divide a second of time and therefore the more things you can do.
In computer jargon, every operation or application is called a task. Suppose you are working on a letter using MS Word, that is a task. Let's say you are also printing a draft, that is another task. Let say you are also monitoring the stock index in another window, a third task. The term multi-tasking refers to the concept that you can do multiply things at the same time with your computer. However, in reality, at the machine level, this is an illusion. The computer hardware can only do one thing at any given time. Because it can do it so fast, at lighting speed, it is able to switch back and forth many "tasks in progress" and give the user the illsion that they are working in parallel.
In order for this to work, the computer must assign a priority scheme. Certain tasks that are time critical must have a higher priority than some other tasks. As I am tying these words on my computer, the processor is sitting idle most of the time. Just as I type a character on the keyboard, an interrupt is sent to the processor that it must capture the key stroke and cause the right character to display on the screen. Meanwhile, in another window on my screen, an application could be receiving the DOW index data as it is changing one second to the next.
A good analogy to explain this is to think of a short order cook in a kitchen. He is only one person but he must prepare many dishes at the same time. The things that require his attention most gets done while others may wait for a slightly later time. All is completed on schedule.
The Operating System
The Operating Systems such as Windows 10 or Mac OS Yosemite, are the main software program that control the computer. One way to think of OS is that it act as the traffic cop at a busy intersection. It knows and sees about all the tasks that are pending and it directs the flow of data so that system runs smoothly and there are no bottlenecks or grid lock.
Inside the Computer chassis, are all the physical components that make up the guts of the computer. The peripherals such as printers, displays, mouse and keyboard are also considered hardware.
Within the chassis, is the CPU, memory chips, disk storage, power supply, cables and I/O ports and motors and fans.
Various Software Components
The software description lumps many parts that needs to be explained individually. There are several software parts to a computer.
- Operating System
- Application programs
Files and Extensions
The most basic storage unit on a computer is a file. What is a file? The answer is, it depends on the extension. A file on the computer has a name portion followed by a "." and an extension. The extension is the qualifier that explains what type of file it is. For example, a basic text file has an extension of .TXT This tells the computer OS that the file contains ASCII codes where each code represents a character. A different extension of PCs is .EXE This tells the OS that this file is a program for the computer to execute as is. There are many extension types that are created either by the OS, or by various Applications and they are reserved and have specific meaning. For example a typical image file has the extension .JPG standing for a specific compression scheme for images. Any file with .JPG would be expected to follow a set of protocol in the data layout. If the information is not there, the file would be rejected.
A .DOC file extension is a common format for MS Word. This is the basic word processor application created by Microsoft. This format contains the ASCII code of the text but also includes the layout and fonts and size and various other attributes that creates a final formatted document.
On a computer, you can try as an experiment to save a file and give it a different extension and see what happens...
Why So many Extensions?
Why do we have so many extensions? even when it seems they are representing similar things. The prime example is .DOC vs .PDF, both are files that represent a formatted document. Indeed, there are file conversion utilities that can convert one to the other. Both formats are widely used. The answer is they were created by different applications that historically had different focus.
In the case of image files, .TIF, .JPG, .GIF all represent images and there are many other formats. Some formats are better suited for certain type of images. For example, graphic images are quite different than a photograph. There are also various compression schemes that are targeted for certain type of data.
File and Data Compression
Why do we need compression? This is the one instance where a larger number is bad. In most cases, a large number in computer spec. is good. A higher clock rate, a larger memory, a larger disk capacity are all good and makes your computer run faster. The one exception is data size. The larger the file size, the longer it takes to process, to transmit, and it cost resources both in storage space and transmission time.
When it come to data compression, there are two types. An "exact" compression which is usually applied to text data which may result in a 10 to 1 compression ratio. This means a 100KB file may be compressed to 10KB in size. This will reduce the transmission time by a factor of 10, such as downloading file from the internet. That is an amazing feat. Moreover, the data is exact with no errors. The reason this is possible is because of smart algorithms that people have invented to "code" data taking advantage of some attributes of the data.
For a simple example, a page of FAX document usually contains a lot of empty white spaces. Instead of coding 1's and 0's where a 1 is black ink and 0 is white background, a run length encoding scheme will reduce the data and still produce the exact same output.
The other type of compression is called "lossy." This means that the data after de-compression is not exactly equal to the original file. This type of compression is usually applied to images or music or video files where a slight error is hardly noticeable and it leads to a much higher rate of compression 50 to1 or more.
On a computer, there are various storage types.
- Disk Storage (DASD)
- Memory (RAM)
A Disk Storage is the permanent portion of that memory. Even when you power off your computer, the disk storage will not loose the data. It is a magnetic medium.
The CDROM is also a form of storage and it is a portable unit that allows you to eject from the system. It is an optical medium.
The memory call RAM (random access memory) is the memory that both programs and data resides while being processed. RAM are based on silicon chips that require power to work.
The cache memory is a smaller portion of memory that is usually running at a higher speed than the main memory which allows for faster computation.
The ROM (read only memory) is something that the computer hardware contains that is needed to power on your system. The "boot up" process requires the ROM to bring the computer alive before it can load in the rest of the OS that are located on Disk files. ROM are hard coded programs from the manufacturer.
The description of "boot up" is a very good concept. While a computer is off, everything is blank. To get it to a working state, a few things need to happen in sequence. It needs to load in a small program so that it can talk to the disk drives and the keyboard and the display. Once it has that capability, it can start loading all the files it need to run the OS and put up the logo and the pointer and the hour glass...
Industry standards are the glue that holds the whole thing together. It is what allows a person to buy a printer from Epson and connect it to a HP computer seamlessly. Standards are important because it creates order among chaos.
The beauty of standards is that ultimately, the market place will decide on the success or failure. One example of competing standards is with VCR back in the 1980's. There were two proposals the BETAMAX and the VHS format of video tapes. After a short time, the VHS won out and became the industry standards. It won because it was the better technology and more economical. In this case, the smaller size of the BETAMAX tape cartridge was not the winner.
The part that makes computer amazing are the thousands of applications programs created by smart programmers. It is the spreadsheets and databases and interactive games that makes the computer useful and enjoyable. The artists that created imagery and music and scripts all using computers and then distributed to the masses via these same computers. Imagine if you had to buy a separate machine to do each of the tasks.
System Command Prompt
A history lesson from the early days of computers. When IBM PC came out in 1982, the OS was DOS written by Bill Gates of Microsoft. This was a command driven interface. When you boot up the system, all you see on the screen is a DOS prompt which looks like this: C:\>
This is all the user interface to the computer. From here, you can issue various commands to the computer and it will execute them. If you enter the wrong command or a typo, you will get an error message. Needless to say, it was not very friendly. As time progress, the designers created a GUI (graphical User Interface) to help the user. This is the Windows and Mac that we are familiar with today.
GUI (Graphical User Interface)
The GUI interface is what made the computer usable for the common person. Most people will not remember a list of command to type into a terminal. Only a computer professional would be able to operate in this fashion.
GUI is a front end interface to the computer. It uses a mouse pointer and navigate around a screen that contains graphical icons. They allow the user to perform tasks without having to memorize commands. It is user friendly but it does have its limitations.
System Crash (Blue Screen) or Freeze
As I said, computer is a dumb machine. Ever so often, unexpectedly, it will crash or freeze. Some possible causes might be due to a hardware failure (usually memory or disk problems) but most likely, it would be a software issue. You can usually recover by power off the system and restarting. You may loose what you were working on at that moment but that's expected.
It may help to understand what causes these unexpected failures. Remember the simple computer model where memory is shared by both program and data. This works fine as long as the program portion is completely separated from the data portion and it is well managed by the programmer. In some cases, a programmer may loose track of some memory space and a program suddenly jumps to a region that is unexpected causing the program to crash. This is called a "bug." As long as it is repeatable, the programmer can fix it. Sometimes, a complicated program have too many variables and not every unique case can be tested. Most programs go through a "beta" test phase so that it can be exercised in a production environment. The hardest bugs are those that are intermittent and not easily reproduced.
Even if a system don't crash, there is another common problem with memory fragmentation. This will lead to programs running slower and slower. To understand this, the memory in the computer is a large space and portion of it is setup to run a given program. When a program ends, that memory block is freed up for another program. After a while, you end up with a fragmented space where a new program especially a large one, cannot fit into one contiguous part. The system handles this by linking smaller fragments to create the space amount needed. This will slow the access time of the data. The more fragmented the memory becomes, the slower the process will run.
A system utility that is helpful is the Task Manager. You can check it periodically to see what is your CPU process and your memory usage. It is a tool when your computer seems to run slow for no reason. In some cases, a system utility is tying up all the CPU cycles and causing other programs to run slow. The task manger can identify the offending process and allow you to stop it.
A Tool For Man
The computer is a tool just like a hammer or a screw driver. It can be used for good or harm. It is not an intelligent unit. It cannot create something on its own. It requires a person behind the keyboard and mouse to create something useful.
Recent advances in computer artificial intelligence systems seems to suggest that the computer can replace a human worker. I don't think so. The computer is a tool and can assist humans in productivity. It cannot replace the whole being.
One of the main motivation for me to write this hub is to explain and make clear to people that the computer is just a tool. Even with recent developments of AI and Apple Siri and IBM Watson, the computer with all the bells and whistles is still just a dumb machine IMHO.
World Wide Web
The internet or World Wide Web has extended our computer reach. Once connected, we have a portal to a whole hosts of information. There are online libraries and books and courses and videos and music... A simple analogy would be a person buying one book and read it at home versus going to the library and accessing a variety of books.
Tim Berners Lee is the inventor of the WWW. He developed the WWW to help his fellow scientist share information. What makes it so appealing are the search engine such as Google and the browser software such as Internet Explorer that allows anyone to just click on a link and navigate around the vast amount of information.
The Web level the playing field for the masses. Anyone with a computer can have access to all the collective information and more importantly can interact and contribute to that collective.
Garbage In Garbage Out is a term used often with dealing with computers. It means the quality of the results you get is directly proportional to the quality you put into it. In most human activity, that is true. However, with computers it can be magnified many times since the programs we run are fast and they may apply to many things instead of one or two.
Getting back to my point about the computer being a dumb machine. It will perform exactly what it is programmed to do, no more no less. When you don't take care in providing the proper instructions or guidance, it can really lead to a mess.
Some Recommended Practices
- Power off your computer periodically and re-start
- Install an Antivirus program
- Have an automatic data backup subscription
- Install a surge protector and a battery backup unit
- Keep your computer in an open space to allow ventilation
- Have a Firewall and security passcode on your wireless router
In this hub, I tried to explain some of the details behind the basic computer. Understanding the computer will set the stage for knowing what are the limitations. The computer is a fantastic tool but it can't do everything.
Excuse me for this diversion. The recent experiments with advanced self driving cars is an example that I want to bring to people's attention. Behind all that technology are many computers. Imagine a scenario where cars are zipping down highways at 60 MPH and a computer crash for unknown reason. How do you resolve it in real time? Do you want to be an occupant in that car?