Do NOT follow this link or you will be banned from the site!
How a Computer Works Part 3
Submitted by thedosmann on Sun, 11/25/2012 - 15:36
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.
"What We Have Here Is Failure to Communicate"
Part 3 in a 4 Part Series
Booting
Communication is the primary use of computers and communication is what allows a computer system to process, execute, store, and retrieve, information. This communication could be a web site to someone browsing that site, a program communicating to another program, a computer communicating with another computer, and a long list of other scenarios. That communication can be as simple as receiving input by means of an input source and then processing that communication to deliver a response or it can also involve several layers of communication and to several other processes.
Inside a computer system we can have several layers or a set hierarchy that distributes information and responses to that data. To better explain internal computer communication it is best to start at what initiates it.
There is a mixture of different inputs or data processes that can initiate a communication session. That session could terminate at one level or cascade to other levels. Some of these include an automated internal system process, a program command, a user initiated session, a remote connection, and others. The one we will look at a little later is a user initiated communication.
In the next article in this series we will look at how computer programs work and how we interact with them. In this article we will explore how the computer and its programs and components communicate with each other. As we discussed in the previous articles, once the computer powers on it starts collecting and distributing information on the components present, the operating system, the programs configured to start when the computer powers on, and the general environment of the computer.
‘Booting’ is the term given for when the computer starts and verifies a computer operating system is present. If it does not find any the computer will error or present a message that it can’t find one. While the computer is starting up and taking inventory of what components are present it is also looking for components that could contain an operating system. These could be hard drives, USB drives, CD/DVD drives, fixed ROM, or network connections. These components require a physical mapping or protocol of the information about the ‘boot’ system they contain and the files present.
The operating system could be Windows, Linux, OSX, and other systems including server operating systems. The operating system is what controls information or communication flow between programs and the computer components. Without an operating system the computer has no way of allowing communication between programs. The operating system has a map of where program information is and how to address that information. It also allows for communication between those programs and the various computer hardware components. The operating system will receive communication from the CPU and Bios as to where the components are in the computer system and how to electronically address those components.
It's All Up To You Now
Once the ‘boot’ process transitions over to the operating system it starts collecting information about the system and begins loading program files that allow for communication between the operating system and those components. The CPU, as we discussed in a previous article, determines the speed of that communication and the size of the communication flow according to the configuration and management of the CPU. The computer system can communicate at various speeds and at different size packets of information flow. Most computers today will send and receive internal information at a size of 64 bits, which is how much data processes at a time.
Using dams as an example again, this would be like tracking the flow of water in 64 gallon increments instead of 2 gallon increments. If we are controlling water flow we can get our information and measure per 64 gallons and if we require a flow of 10,000 gallons we can track and respond to measurements per 64 gallons. The speed is another factor and is comparable to the time it takes (x) number of 64 gallons to flow from one point to another. Other factors, in the flow of information, are also measured and factored.
It is possible to have a system that communicates at 64 bits and programs that operate at a lesser amount. This is often factored in but in some cases a type of virtual communication needs programed to allow the system to accommodate programs designed to run at lesser packets of data. It is important to note, it is also possible to program a software CPU that will enable a virtual communication channel to allow programs to communicate in a native manner or an environment that the original program is designed to work in.
What Is Your Input?
Once the computer is ‘booted’ to the operating system it is in a ready state to receive and send communication. A user initiated communication would be a mouse click on a desktop icon or pressing a keyboard key or combination of keyboard keys. Let’s assume the computer is ‘booted’ and you are looking at the desktop screen. When you move your mouse to arrow over an icon you just released a number of electrons to specific channels in a pre-configured circuit. The resulting flow is then measured and a solution reached based on a number of stored information streams. The communication (flow of electrons) goes to the CPU which first looks at its registers and cache and then the rest of its memory store to find a solution or reaction to the specific flow of electrons. The operating system has already loaded the needed programs to handle the reaction of the CPU and communicates this to the rest of the computer system. The result is you see the mouse arrow move over the icon.
The operating system carries out the commands needed to make this happen by allowing all the computer components to work and communicate with each other. The communication starts as an electrical signal which is then communicated via ‘machine code’. This is the hot spot or where the rubber meets the road. In order for the program to communicate with the computer we need a method to turn code into electrical energy.
All input into a computer system is electronic. The method of the computer system interpreting that input is what we have discussed in the previous articles. With the movement of the mouse, described above, an electrical signal, defined by the circuits inside the mouse, travels to the main board of the computer which routes it to the CPU. The CPU interprets the received input and routes it to the operating system that relays back signals that cascades to the entire system, through the CPU, all the defined responses in order to make the arrow move over the icon.
We will discuss programming those responses in our next article “Is There Anybody Out There”. It is enough to grasp this concept by understanding that any code written must first translate into machine code before it can be electrically interpreted and transferred throughout the computer system. So each letter, character, or combination of these will eventually correspond to a specific electrical signal and this machine interpretation stores in the memory banks, registers, and memory caches, we discussed earlier. The various programming languages are at the highest levels of communication and, depending on the language, may or may not require more interpreters before that code translates to the machine code which can then process electrically.
Delivering The Message Of What To Do
Because the interpretation circuits are in place when the computer is in a ready state the computer system can react to variance in the electrical signals it receives. We have already mentioned electrons and discussed their critical role in the communication process. Because electrons have a natural and predictable flow, circuits can be built to act upon the flow of electrons. Predominantly, the work-flow of a computer is in performing math functions. Computing and factoring the amount, flow, and type of electronic signals is how a computer determines or solves what the configuration of the electrons are prompting it to do. Based on the electrical information it receives the computer will cause electrical reactions that correspond to existing circuit configurations.
Remember the dam examples we have mentioned earlier? Let’s say we have a configuration of 6 dams. 3 dams are 5 feet apart one on top the other and 3 channels on the left side of each dam (3 lines one on top of each other, 5 feet apart). At the end of the three channels are three other dams. So we have 3 dams on one side and three on the other with a channel running in between all of them and channels connecting the dams going up and down. Yes, we have a figure 8 or 2 squares one on top the other. Each of the dams can allow or stop water flow in in any of their connecting channels. With this circuit of dams and channels we can selectively fill each channel making all the numbers from 0-9.
Let’s number the dams: 1 (top left), 2 (top right), 3 (middle left), 4(middle right), 5(bottom left), 6(bottom right). And to make the illustration easier let’s use a program I wrote to show how you can configure the Dams to create characters. Just click on the below image to get a working example .
The transference of characters into machine code is quite complex but, as we have discussed, it is a representation of defined instructions in an on/off state corresponding and reacting to electron flow. This is how the computer and all its components communicate and how it’s able to interpret the input. Every response or action on a computer is electrical but the responses can be configured using electronic circuits and programming code that interprets into virtual electronic circuits. Different CPU types will have their own inherit language or instruction set to interpret the input. The end result will be an on/off or neg/pos or 1 and 0 which processes using registered instructions in the CPU.
Keep in mind that the CPU will process countless 1’s and 0’s corresponding to the frequency or speed of the system configuration. Each electron passing through its gates gets counted, factored, processed, and computed to a set of pre-determined instructions. Most CPU types can actually read ahead in order to further speed the processing of the enormous data flow. There are a number of factors, not mentioned, that are a part of the internal computer communication process but this article is already a little long.
All data in a computer is electronic. What you see on the screen or what prints or even the sounds you hear are all electronic responses to electronic input.
In our next article we will look deeper into the programming code and user interaction with a computer.
by Jim Atkins 'thedosmann'
Share it now!