Computer is an electronic machine (made of semiconductors) that takes data through an input device and computes the result and displays on an output device.
A computer computes results using a device called central processing unit (CPU). It performs arithmetic and logical computations using simple instructions. The data input, computations and the output are all in binary number system. That is all decimal numbers and alphabets are converted into zeros and ones. After computation in the binary arithmetic, the results are converted back into decimal numbers or alphabetical text.
The data after inputting into the computer is stored in electronic memory called RAM. The ALU (arithmetic and Logic Unit) in the CPU retrieves data from the memory and after computation stores back the results in the memory.
Memory is used to storing and retrieving data and program instructions. A program is a set of instructions to compute the desired result. It is more like a function and series of arithmetic and logic equations.
The CPU fetches an instruction of the program, executes it and then fetches the next instruction and executes. It continues until the end of the program, or if an exception occurs. The program is written in a high level programming (English like) language and is translated in to machine level instruction set.
The data in the memory is stored and retrieved using an addressing mechanism to locate each memory cell. Memory is organized in terms of units called bytes or words. A hard disk is used to store data permanently. Programs and data are retrieved from a hard disk even after the computer is switched off and on again. Where is RAM retains data only as long as the power is on.
Examples of input devices are keyboard, mouse, joy stick, light pen, micro phone, web camera, hard disk, flash pen etc. Output devices are the monitor (console), printer, speaker or electronic display devices, hard disk, flash pen etc.
A computer can perform 1 million simple computations per second. Modern computers are called digital computers. Computers are of many types depending on the computational capacity and its size.