The beauty of a computer is that it can run a word-processing program one minute and then a photo-editing program five seconds later. In other words, although we don't really think of it this way, the computer can be reprogrammed as many times as you like. This is why programs are also called software. They're "soft" in the sense that they are not fixed: they can be changed easily. By contrast, a computer's hardware the bits and pieces from which it is made and the peripherals, like the mouse and printer, you plug into it is pretty much fixed when you buy it off the shelf. The hardware is what makes your computer powerful; the ability to run different software is what makes it flexible. That computers can do so many different jobs is what makes them so useful and that's why millions of us can no longer live without them.
Tuesday, January 5, 2016
What do you mean by operating system?
A typical computer architecture linking the hardware to the applications via the BIOS and the operating system.
That's the basic idea behind an operating system: it's the core software in a computer that (essentially) controls the basic chores of input, output, storage, and processing. You can think of an operating system as the "foundations" of the software in a computer that other programs (called applications) are built on top of. So a word processor and a chess game are two different applications that both rely on the operating system to carry out their basic input, output, and so on. The operating system relies on an even more fundamental piece of programming called the BIOS (Basic Input Output System), which is the link between the operating system software and the hardware. Unlike the operating system, which is the same from one computer to another, the BIOS does vary from machine to machine according to the precise hardware configuration and is usually written by the hardware manufacturer. The BIOS is not, strictly speaking, software: it's a program semi-permanently stored into one of the computer's main chips, so it's known as firmware, it is usually designed so it can be updated occasionally, however.
Photo: Typical computer architecture: You can think of a computer as a series of layers, with the hardware at the bottom, the BIOS connecting the hardware to the operating system, and the applications you actually use (such as word processors, Web browsers, and so on) running on top of that. Each of these layers is relatively independent so, for example, the same Windows operating system might run on laptops running a different BIOS, while a computer running Windows (or another operating system) can run any number of different applications.
Operating systems have another big benefit. Back in the 1970 and early 1980 virtually all computers were maddeningly different. They all ran in their own, idiosyncratic ways with fairly unique hardware (different processor chips, memory addresses, screen sizes and all the rest). Programs written for one machine (such as an Apple) usually wouldn't run on any other machine (such as an IBM) without quite extensive conversion. That was a big problem for programmers because it meant they had to rewrite all their programs each time they wanted to run them on different machines. How did operating systems help? If you have a standard operating system and you tweak it so it will work on any machine, all you have to do is write applications that work on the operating system. Then any application will work on any machine. The operating system that definitively made this breakthrough was, of course, Microsoft Windows, written by Bill Gates. It's important to note that there were earlier operating systems too. You can read more of that story in our article on the history of computers.
what is computer program?
As you can read in our long article on computer history, the first computers were gigantic calculating machines and all they ever really did was "crunch numbers": solve lengthy, difficult, or tedious mathematical problems. Today, computers work on a much wider variety of problems but they are all still, essentially, calculations. Everything a computer does, from helping you to edit a photograph you've taken with a digital camera to displaying a web page, involves manipulating numbers in one way or another.
Suppose you're looking at a digital photo you just taken in a paint or photo-editing program and you decide you want a mirror image of it in other words, flip it from left to right. You probably know that the photo is made up of millions of individual pixels colored squares arranged in a grid pattern. The computer stores each pixel as a number, so taking a digital photo is really like an instant, orderly exercise in painting by numbers! To flip a digital photo, the computer simply reverses the sequence of numbers so they run from right to left instead of left to right. Or suppose you want to make the photograph brighter. All you have to do is slide the little "brightness" icon. The computer then works through all the pixels, increasing the brightness value for each one by, say, 10 percent to make the entire image brighter. So, once again, the problem boils down to numbers and calculations.
What makes a computer different from a calculator is that it can work all by itself. You just give it your instructions (called a program) and off it goes, performing a long and complex series of operations all by itself. Back in the 1970s and 1980s, if you wanted a home computer to do almost anything at all, you had to write your own little program to do it. For example, before you could write a letter on a computer, you had to write a program that would read the letters you typed on the keyboard, store them in the memory, and display them on the screen. Writing the program usually took more time than doing whatever it was that you had originally wanted to do (writing the letter). Pretty soon, people started selling programs like word processors to save you the need to write programs yourself.
The Importance of the main() Function in C Programming
By Dan Gookin from C All-in-One Desk Reference For Dummies
All C language programs must have a main() function. It's the core of every program. It's required. The main() function doesn't really have to do anything other than be present inside your C source code. Eventually, it contains instructions that tell the computer to carry out whatever task your program is designed to do. But it's not officially required to do anything.
The basic main() function
When the operating system runs a program in C, it passes control of the computer over to that program. This is like the captain of a huge ocean liner handing you the wheel. Aside from any fears that may induce, the key point is that the operating system needs to know where inside your program the control needs to be passed. In the case of a C language program, it's the main() function that the operating system is looking for.
At a minimum, the main() function looks like this:
main() {}
Like all C language functions, first comes the function's name, main, then comes a set of parentheses, and finally comes a set of braces, also called curly braces.
If your C program contains only this line of code, you can run it. It won't do anything, but that's perfect because the program doesn't tell the computer to do anything. Even so, the operating system found the main() function and was able to pass control to that function — which did nothing but immediately return control right back to the operating system. It's a perfect, flawless program.
Dissecting the main() function
The set of parentheses after a C language function name is used to contain any arguments for the function — stuff for the function to digest. For example, in the sqrt() function, the parentheses hug a value; the function then discovers the square root of that value.
The main() function uses its parentheses to contain any information typed after the program name at the command prompt. This is useful for more advanced programming. Beginning programmers should keep in mind what those parentheses are there for, but you should first build up your understanding of C before you dive into that quagmire.
The braces are used for organization. They contain programming instructions that belong to the function. Those programming instructions are how the function carries out its task or does its thing.
By not specifying any contents, as was done for the main() function earlier, you have created what the C Lords call a dummy function — which is kind of appropriate, given that you're reading this at Dummies.com.
Note that the basic, simple main()function doesn't require a specific keyword or procedure for ending the program. In some programming languages, an END or EXIT command is required, but not in C. In the C language, the program ends when it encounters the last brace in the main() function. That's the sign that the program is done, after which control returns to the operating system.
All C language programs must have a main() function. It's the core of every program. It's required. The main() function doesn't really have to do anything other than be present inside your C source code. Eventually, it contains instructions that tell the computer to carry out whatever task your program is designed to do. But it's not officially required to do anything.
The basic main() function
When the operating system runs a program in C, it passes control of the computer over to that program. This is like the captain of a huge ocean liner handing you the wheel. Aside from any fears that may induce, the key point is that the operating system needs to know where inside your program the control needs to be passed. In the case of a C language program, it's the main() function that the operating system is looking for.
At a minimum, the main() function looks like this:
main() {}
Like all C language functions, first comes the function's name, main, then comes a set of parentheses, and finally comes a set of braces, also called curly braces.
If your C program contains only this line of code, you can run it. It won't do anything, but that's perfect because the program doesn't tell the computer to do anything. Even so, the operating system found the main() function and was able to pass control to that function — which did nothing but immediately return control right back to the operating system. It's a perfect, flawless program.
Dissecting the main() function
The set of parentheses after a C language function name is used to contain any arguments for the function — stuff for the function to digest. For example, in the sqrt() function, the parentheses hug a value; the function then discovers the square root of that value.
The main() function uses its parentheses to contain any information typed after the program name at the command prompt. This is useful for more advanced programming. Beginning programmers should keep in mind what those parentheses are there for, but you should first build up your understanding of C before you dive into that quagmire.
The braces are used for organization. They contain programming instructions that belong to the function. Those programming instructions are how the function carries out its task or does its thing.
By not specifying any contents, as was done for the main() function earlier, you have created what the C Lords call a dummy function — which is kind of appropriate, given that you're reading this at Dummies.com.
Note that the basic, simple main()function doesn't require a specific keyword or procedure for ending the program. In some programming languages, an END or EXIT command is required, but not in C. In the C language, the program ends when it encounters the last brace in the main() function. That's the sign that the program is done, after which control returns to the operating system.
Programming the ENIAC
Built in 1943-45 at the Moore School of the University of Pennsylvania for the War effort by John Mauchly and J. Presper Eckert (no relation to Columbia University's Wallace Eckert) but not delivered to the Army until just after the end of the war, the Electronic Numerical Integrator And Computer (ENIAC) was the first general-purpose electronic digital computer. It was 150 feet wide with 20 banks of flashing lights and about 300 times faster than the Mark 1 at addition. Wallace Eckert is cited in the histories as an influence on the designers, as he was for the Mark 1. These US Army photos from the archives of the ARL Technical Library show two early programmers (Gloria Ruth Gordon [Bolotsky] and Ester Gerston) at work on the ENIAC.
The ENIAC was not a stored-program computer; it is "better described as a collection of electronic adding machines and other arithmetic units, which were originally controlled by a web of large electrical cables" (David Alan Grier, IEEE Annals of the History of Computing, Jul-Sep 2004, p.2). It was programmed by a combination of plugboard wiring (shown at the top) and three "portable function tables", shown above (CLICK HERE and HERE for better views). Each function table has 1200 ten-way switches, used for entering tables of numbers. Note the IBM punches on the far right -- a bit hard to make out; better visible in this clearer but less atmospheric copy of the same photo. Franz Alt writes in Archaeology of Computers -- Reminiscences, 1945-47, Communications of the ACM, July 1972:
One of the peculiarities that distinguished ENIAC from all later computers was the way in which instructions were set up on the machine. It was similar to the plugboards of small punched-card machines, but here we had about 40 plugboards, each several feet in size. A number of wires had to be plugged for each single instruction of a problem, thousands of them each time a problem was to begin a run; and this took several days to do and many more days to check out. When that was finally accomplished, we would run the problem as long as possible, i.e. as long as we had input data, before changing over to another problem. Typically, changeovers occurred only once every few weeks.
Later, ENIAC's plugboards were permanently "microprogrammed" with a repertoire of 50-100 commonly used instructions that could be referenced from a "user program" entered as a sequence of instructions into the function-table switches. [40]
Herb Grosch says of this page [10 May 2003]:
I was roaming around the links and sublinks in the ENIAC story, and note with much interest that there were three or four castered twiddle boards [portable function tables A, B, and C], where I had always assumed only one.
I note the almost complete absence of Col.[then Major] Simon, and of Dick Clippinger, who should share with von Neumann the credit for moving from plugging to twiddling for program insertion.
I was pleased to see short reference to the IBM I/O units, which show in your and other copies of the most famous photo. I wonder if John McPherson knows how they were sold/rented/given to the Moore School --- never thought to ask him at the time. Unusual.
Bashe [4] says, "When the Army requested special card reading and punching units for an undisclosed project underway at the University of Pennsylvania, [IBM Chief Engineer James W.] Bryce and his staff coordinated IBM's response... In 1946, the instrument produced by the project was revealed as ENIAC..."
Not on your page, but in the Richie story and other Aberdeeneries there should have [been made] mention of the astronomer who taught them how to calculate trajectories by hand: Forest Ray Moulton, circa 1920 [my p.89].
That prolly wasn't intentional, but the elision of all references to the big punched card shop Cunningham ran, and to the two relay machines IBM built, certainly was. Those are what actually did firing tables, after desk calculators were overwhelmed and until the Bell machine arrived, and until ENIAC was moved in and later freed up.
Now, about the "I'm dubious ..." above. I don't think Wallace Eckert had any influence whatsoever on the designers of the ENIAC or the ASCC. Certainly in the hundreds and hundreds of hours he and I talked about those two machines, he never mentioned such, nor did Frank Hamilton, who was Number Two on the ASCC, ever hint at the latter.
A 1938 meeting between ASCC's Howard Aiken and Wallace Eckert is well known [9]. Gutzwiller [90] says that Presper Eckert (among other well-known pioneers of computing including Aiken and Vannevar Bush) got his first inspiration from Wallace Eckert's 1940 "orange book". I have not been able to pin down any evidence of direct contact between the two Eckerts. Since ENIAC was a war project (as was the Aberdeen Relay Calculator, with which Eckert was also ostensibly involved) it would not be surprising that records are not available.
The ENIAC was not a stored-program computer; it is "better described as a collection of electronic adding machines and other arithmetic units, which were originally controlled by a web of large electrical cables" (David Alan Grier, IEEE Annals of the History of Computing, Jul-Sep 2004, p.2). It was programmed by a combination of plugboard wiring (shown at the top) and three "portable function tables", shown above (CLICK HERE and HERE for better views). Each function table has 1200 ten-way switches, used for entering tables of numbers. Note the IBM punches on the far right -- a bit hard to make out; better visible in this clearer but less atmospheric copy of the same photo. Franz Alt writes in Archaeology of Computers -- Reminiscences, 1945-47, Communications of the ACM, July 1972:
One of the peculiarities that distinguished ENIAC from all later computers was the way in which instructions were set up on the machine. It was similar to the plugboards of small punched-card machines, but here we had about 40 plugboards, each several feet in size. A number of wires had to be plugged for each single instruction of a problem, thousands of them each time a problem was to begin a run; and this took several days to do and many more days to check out. When that was finally accomplished, we would run the problem as long as possible, i.e. as long as we had input data, before changing over to another problem. Typically, changeovers occurred only once every few weeks.
Later, ENIAC's plugboards were permanently "microprogrammed" with a repertoire of 50-100 commonly used instructions that could be referenced from a "user program" entered as a sequence of instructions into the function-table switches. [40]
Herb Grosch says of this page [10 May 2003]:
I was roaming around the links and sublinks in the ENIAC story, and note with much interest that there were three or four castered twiddle boards [portable function tables A, B, and C], where I had always assumed only one.
I note the almost complete absence of Col.[then Major] Simon, and of Dick Clippinger, who should share with von Neumann the credit for moving from plugging to twiddling for program insertion.
I was pleased to see short reference to the IBM I/O units, which show in your and other copies of the most famous photo. I wonder if John McPherson knows how they were sold/rented/given to the Moore School --- never thought to ask him at the time. Unusual.
Bashe [4] says, "When the Army requested special card reading and punching units for an undisclosed project underway at the University of Pennsylvania, [IBM Chief Engineer James W.] Bryce and his staff coordinated IBM's response... In 1946, the instrument produced by the project was revealed as ENIAC..."
Not on your page, but in the Richie story and other Aberdeeneries there should have [been made] mention of the astronomer who taught them how to calculate trajectories by hand: Forest Ray Moulton, circa 1920 [my p.89].
That prolly wasn't intentional, but the elision of all references to the big punched card shop Cunningham ran, and to the two relay machines IBM built, certainly was. Those are what actually did firing tables, after desk calculators were overwhelmed and until the Bell machine arrived, and until ENIAC was moved in and later freed up.
Now, about the "I'm dubious ..." above. I don't think Wallace Eckert had any influence whatsoever on the designers of the ENIAC or the ASCC. Certainly in the hundreds and hundreds of hours he and I talked about those two machines, he never mentioned such, nor did Frank Hamilton, who was Number Two on the ASCC, ever hint at the latter.
A 1938 meeting between ASCC's Howard Aiken and Wallace Eckert is well known [9]. Gutzwiller [90] says that Presper Eckert (among other well-known pioneers of computing including Aiken and Vannevar Bush) got his first inspiration from Wallace Eckert's 1940 "orange book". I have not been able to pin down any evidence of direct contact between the two Eckerts. Since ENIAC was a war project (as was the Aberdeen Relay Calculator, with which Eckert was also ostensibly involved) it would not be surprising that records are not available.
Multi function device (MFD)
A product or device that has multiple functions. An example of this might be a printer that also makes copies, faxes, and scans. Another example is a CD or DVD that might contain multiple applications on the same disk; this may be a Mac and PC version of the same software or media meant to be played on more than one platform. Also called multi function product (MFP), all-in-one.
Read more: http://www.businessdictionary.com/definition/multi-function-device-MFD.html#ixzz3wM5ABYwc.
Monday, January 4, 2016
Function of computer hardware components
A processor is the brains of any computer system. Also known as a CPU or central processing unit it is used to execute instructions that enable the operating system and application software to run on a system. A processor performs arithmetic and logical calculations in the ALU (arithmetic logical unit) and control instructions in the control unit. The processor communicates with storage devices such as the hard drive and RAM to process information used to control the operating system and applications that run on a computer system. Processors are being made smaller and faster all the time and this allows systems to carry out instructions faster and perform better. A processor in a mission critical system used in space or a medical device needs to be very powerful to carry out instructions quickly.
Processors are integrated into a computer system by placing them on the motherboard. A Motherboard is like the body of a computer system it contains a socket to house the processor and links a lot of internal components together such as RAM and graphics cards using communication buses. The have integrated controllers to enable the processor to communicate with storage devices such as HDDs and CD/DVD drives. A motherboard is a printed circuit board (PCB) and links the components using lines drawn on the circuit board. Motherboards contain expansion slots to insert RAM or graphics, sound and network cards to improve system performance. They allow a computer engineer to upgrade the RAM so that a machine runs faster. Motherboards also contain sockets to enable a computer system to communicate with external devices using USB ports, sound jacks and VDU outputs. A motherboard comes in different form factors (this is the shape and size) and you need to check if components are compatible with this form factor before purchasing them. A phone also has a motherboard which is much smaller than that used in a PC obviously. PC motherboards normally require them to be cooled to keep components running at optimal performance. This is done using fans and heat sinks.
BIOS or basic input/output system is firmware (firmware links hardware and software) built into a computer system. The BIOS is used to ensure that a system boots up correctly and all hardware components are configured to work correctly. It contains information about the hardware components connected to the system such as keyboard and mouse and enables applications installed on the system to be controlled by the hardware. The BIOS is stored in non-volatile ROM (read only memory) of a system and is configured to allow that motherboard and all connected components and peripherals to run correctly.
A power supply or PSU (power supply unit) is used to power all of the components in a computer system. The power supply runs from 120 or 240 volts mains supplied and provides 12v, 5v and sometimes 3.3v outputs to power different components. A hard drive needs a power supply to run and the PSU has a specific output connector that can be used to connect to different hard drive types. Standard connectors are ATX – you can find out more by researching the different type of connectors that power supplies have. They normally range from between £20 to £50 in price.
A fan is used in a computer system to suck hot air out of the system to make sure that it does not overheat. Most computer systems will have fans on the casing to suck the hot air out of the system. The fans are connected to the power supply. Most processors also have a fan connected to them to draw the heat away from them and ensure the operate at the best speed possible. You will hear a system that is getting hot become noisy as the fans increase in speed. Heat sinks are also used to keep systems cool. Heat sinks are made from materials that draw heat away such as aluminium and copper. Often a heat sink is placed on top of a processor to draw the heat away from it. A fan will be placed on top of the heat sink to continuously draw out the heat that the processor produces. This heat is then drawn away from the systems by fans placed on the casing. Sometimes water is used to cool systems that are prone to heating up – you can investigate this further to see how water cooling is used in gaming systems as an example.
For a computer system to run it needs a storage system to store information about the operating system and applications. Knowledge of hard drive configuration and controllers is an important skill to have when setting up a system. There are different ways to communication with HDDs (hard disk drives) such as SATA, IDE or EIDE. SATA or Serial ATA (Serial Advanced Technology Attachment) is a serial communications method that communicates over a serial cable. If your motherboard is configured with SATA then you need to buy a SATA compliant HDD. IDE (integrated drive electronics) that has the controller for the hard drive stored on the drive itself. Master/slave configuration is used when installing an additional HDD on your computer system. The master/slave hard drive configuration means that both drives can be controlled using a single cable. The IDE controllers in each HDD talk to each other to say when it is ok for the system to send or receive data to and from the storage device. If the master drive is in use it will send a message to the slave to tell it that. When the master drive is finished communicating with the system it will send a message to say that the communications are complete and the slave can go ahead and perform the required actions. This is normally configured using hardware jumpers to say with is the master and which is the slave drive.
Most computer systems use ports such as USB, parallel and serial to communicate with external devices. A USB (universal serial bus) port allows you to plugin in an external storage device such as a keyboard or mouse to connect to the motherboard and enable the user to control the system. The motherboard comes with a USB controller chip to enable the communication to take place. Parallell ports were initially used for printers and are not as common these days. They are used for devices that need a lot of communication such as a plotter used in sign writing. The have more communication lines than a serial port and therefore can send and receive more data.
In order to explain the function of computer hardware components in full it is important to consider the internal memory components of a computer system. The three main types of internal memory in a computer system are RAM, ROM and cache. RAM or random access memory is memory that linked to a processor on the motherboard. Data can be written to and read from random access memory at roughly the same speed. RAM chips are stored on separate printed circuit boards that can be plugged into a system motherboard. Applications write data to the RAM chips based on current operations. RAM is wiped when a systems shuts down. For example, if a large amount of data is copied on to the clipboard it would be stored in random access memory. If you do not clear the clipboard the information will still be available to paste in an hour or even week’s time but if the system shuts down the information will not be available to paste as the RAM will be cleared. RAM upgrades can increase system performance as more applications can be used at the same time with less impact on system resources. ROM or read only memory contains system information such as the BIOS (although some bios is stored directly on the motherboard itself). Although it is considered read only it can be configured in some sense like setting the BIOS password. ROM also stores information about the operating and other programs stored on the system. ROM does not get wiped when a system reboots. Cache memory is ram that can be accessed much quicker than regular RAM that is slotted into a motherboard on a computer system. Cache is normally stored within the CPU or on a separate cache memory chip located right beside the CPU. Cache has different levels high speed and ultra high speed. L1 or level 1 cache is normally stored on the CPU chip and is the fastest type of cache. Cache memory is used by the processor to carry out instructions more quickly as data can be accessed by the processor quicker due to the proximity of the cache and ultra high speed.
Specialised cards such as network and graphic cards are used to increase the functionality and performance of a computer system. Some motherboards come with integrated graphics meaning that the graphics driver is stored on the motherboard. For better graphical performance a specialised graphics card with increase the performance in terms of outputting a better quality and higher resolution picture from your computer system. Installing a specialised graphics card would be important for someone like a movie editor who wanted to see the full impact of high definition video when editing. A network card can be plugged into an expansion slot to enable a computer system to connect to a network. This can be an internal network or the world wide web. Again some motherboards come with integrated networking capability but installing a specialised NIC (network interface card) will increase performance in terms of connection speed etc.