Do NOT follow this link or you will be banned from the site!
How a Computer Works Part 2
Submitted by thedosmann on Wed, 11/14/2012 - 22:04
Introduction
Over the next few weeks I will write a four part series on "How a Computer Works". I realize this has been covered many times before but it never hurts to have another perspective. I will try and write these articles as non-technical as possible and hope you enjoy the series and that you will find it informative. The four part series titles are as follows:
Ready, Set, Power On
In this first article we will take a look at what happens when we first turn a computer on. From the power surging into the computer's vein to the CPU waking up.
The CPU and the Rest of the Crew
In this second article we will examine how a CPU works and other major computer components like the monitor, video, keyboard, mouse, sound, and other components.
"What We Have Here Is Failure to Communicate"
In this third article we will discuss how a computer communicates with itself, other components, and how programs talk to the computer.
Is There Any Body Out There?
In this last article of the series we will look at general computer operation including programming, software, networks, and the internet.
I will publish these in my blog and as each one is published a link will be added to the above list. This introduction will be added to each article in the series.
The CPU and the Rest of the Crew
Part 2 in a 4 Part Series
Maestro
In the first article, Ready, Set, Power On, we found out what happens when we turn the power on and we ended with a brief look at electrons and the role they play in making a computer come to life. The CPU, the brain of the computer, is the primary component that receives the signals that electrons carry with them.
We can imagine the CPU, Central Processing Unit, as a master Conductor orchestrating a symphony of instruments in a myriad of frequencies that produces a collective energy critically tuned to a specific flow of musical notes.
As the electrons start coursing through the main electrical board of the computer they start encountering circuits that influence their natural flow. In the course of these transitions an information network starts to develop. Based on the configuration and the effect of the main circuit board, these electronic signals start reaching the CPU with information. This information is in the form of on/off, to simplify, or negative/positive power flow.
In our next article we will look closer at communication in a computer but for now just understand that the CPU and other components need a way to interpret this electrical signal. The CPU is not alone, it has several helpers and some of these 'helpers' already have information the CPU needs before the power even reaches the main board. The CMOS, BIOS, and other 'helpers', have information stored that is based on their circuitry.
All Present and Accounted For
The BIOS, Basic Input/output System, warrants a little closer look. This pre-programmed component assists the CPU by storing information it needs to get everything up and going. It records information so the CPU can be aware of its environment. The information it holds is memory size, hard drive size, and other computer components and it even stores information about the CPU. When the power turns on this component starts sending information to the CPU so it knows what other components are out there. The BIOS can make on-the-fly changes if it encounters them. When the computer comes to life the BIOS takes inventory and checks it against the stored information and it also checks if there is an operating system to turn things over to.
You can think of the BIOS like a Thumb drive or USB drive permanently attached to the main board. You can put information on this component that will always be there unless you change it or update it. Another way to look at the BIOS is like a picture; when the power comes on it looks at the picture and if it has changed it will either error, post, or it will accept the changes and move on, sometimes presenting a message that it noticed the changes. The changes could be additional memory, another hard drive, or other system changes.
Most of the components in a computer will have some type of identification of what it is and how to communicate with it. This stored information is either in the components own BIOS or other configured and non-changeable circuit. This recorded/stored information is in the main board BIOS so it can pass the information on to the CPU. One last note on the BIOS, it allows communication from all components to the CPU and each other. It provides the necessary input/output conduit provisions so all the computer components can send and receive information independent of software. The BIOS's job is complete when it it finds a bootable software interface.
Talk About Control Freaks
Meanwhile the CPU is recording and storing all of this information. The CPU may also have some pre-stored information on how to communicate or interpret the information it has to process. This stored information will be like a set of commands or actions to perform if it receives certain electrical signal combinations.
The CPU will control the speed, timing, and amount of information exchange within the computer system. It will also keep track of the various addresses or the whereabouts of the different computer components. The amount of information, flow of electrons, the CPU has to keep up with is what can slow down or even stop the information flow. That is where memory plays a crucial row in computer operation.
Hard or Soft?
Memory is at the core of allowing fast information flow. The types of memory used to assist the CPU, components, and software includes physical memory, which is memory that is attached, in some way, to the main board, and soft memory, which is memory written to a hard drive or other media. The physical memory can be accessed faster than memory written to some media because in physical memory the information is still in the form of electrons but on a writable media it is not and needs converted back to electrical signal before access.
Using the dam as an example, let’s propose you needed a ten feet level of water in reservoir A to maintain a two feet level in reservoir B. With physical memory you have a switch that allows water from reservoir C to fill reservoir A to exactly ten feet. In soft memory you first have to fill reservoir C to the point that reservoir A is at ten feet which allows reservoir B to fill to two feet. With soft memory you have the computation but you first must convert this, or fill reservoir C, in order to solve. In physical memory you already have reservoir C filled.
When the computer first starts up, the CPU begins storing information and it will allocate what physical memory it needs to keep the system up and running.
With memory you also have a cache of memory. A cache is simply a place to look for something before going to the whole memory store. This could be frequently used computations or the last few used or a combination and can include separate levels of cache. The CPU will have several banks of cache to store this type of information.
Mixed Signals
Based on the electronic signals it receives, the CPU will do countless math computations and then carry out various configured reactions/instructions to those signals. Some of those instructions store in cache, some in memory, and some are learned the moment the signal reaches the CPU. Without going into the communication process, we will do that in the next article, a simple example is when you press the 'A' key on your keyboard. When you press the 'A' key an electrical signal goes to the CPU that results in the CPU instructing your monitor to display an 'A'. There are, of course, several other processes that are in the mix but this is a simple explanation.
The video, speakers, monitor, sound, WI-Fi, keyboard, and all other components, use this same process in order to work. These other components may have their own CPU, memory, BIOS, and other on-board helpers. On some systems most all components are integrated into the main board or added via communication interfaces.
Communication interfaces are places in your system that allow the addition of peripherals or hardware. These can be slots in the main board for devices to be 'plugged' into, or they can be various connectors. Some types are PCI, IDE, AGP, USB, Serial, and a long list of others. Physical memory is added using these interfaces. Also, some of these interfaces are external so as to allow adding peripherals without removing the computer case. The USB and card reader slots are examples. All of these components are constantly sending out electrical signals in the form of controlled electron flow.
In our next article "What We Have Here Is Failure to Communicate" we take a closer look at how all of these components interact and communicate with each other and how software communicates with the computer.
by Jim Atkins 'thedosmann'
Share it now!