Basics of Computer
Let's take an overview on computer and try to understand it's basic functionality so that we can make computer code accordingly. First of all the definition of computer that being as this:
- Computer is an electronic device that takes data from user, process data and gives some results
So what we mean by this? Let's take an example of calculator, which when you turn on will take an input and then take your choice of operation and another value and display output. Hence it's an electronic device, it took input by it's keys and gave back result on it's LCD.
From this example we can see that there are different input and output devices that allow user to give input to computer and take some output. Most common devices being as follows:
Input devices:- Keyboard
- Mouse
- Microphone
- Scanner
- Joystick
- Touch pan and many other.
- Monitor (LCD)
- Speaker
- Printer
- Projector and many others including robotics.
Now the question rises how does computer work with these devices and user inputs??? Here is how we divide it's functionality. Computer has 2 basic parts that play basic role in taking user input and giving output. These are Memory and Processor. Memory being storage of data that is being processed and processor being the main part that will process the data according to requirement.
Let's take a look in our example of calculator
- When you type input on calculator it will save it in it's memory then it will save the operation choice and then it will take your 2nd output and save it as well.
- After it has gathered all required data, it's processor will perform the required operations on the data and it will show results to LCD.
In computer when you do ANY thing, like opening a program, playing a game it's controlled by the processor hence you can say that it's the mind of computer that is doing all the work.
Processor:
The mind of computer has 2 basic parts, one part controls data flow (from user to memory, memory to user) and other part will process the data if required. Controlling part of processor is called CU (control unit). The processing unit is called ALU (arithmetic and logical unit) and it has some basic functions that it can perform on data. Those being either arithmetic +, -, *, / or logical comparison operations which will compare data for processing. You do not need to go into details, it's just an overview.
Memory:
The memory has 2 types
- Fist type is non-volatile memory and it is permanent memory i.e. when you save some data on this type it will remain there whatever it is connected to electricity or powered off until you delete that data. For example hard Disk, USB flash drive, floppy disks
- Second type of memory which is not permanent is called volatile memory which is lost when power is disconnected. Which mean data on this type of memory remains there until it's powered on and as it loses power the data will be lost. For example when you turn your computer on it loads windows every time, which is being loaded on this type of memory. RAM is an example of this type of memory.
So why we use volatile memory when it's not permanent??? And it's not cheap as well...!!! Here is the answer, the volatile memory is very fast i.e. saving and reading data on volatile memory takes less time then non-volatile memory. Computer processors are very fast and if we use non-volatile memory it will reduce computer speed hence computer performance. This is why we use volatile memory to support fast computing.
Let's summarise it all. When user will enter some data through keyboard or mouse or any device the CU (control unit) will direct this data to either be stored on ram or send to ALU for processing. Similarly it can get data from memory and show it to user. In next part we will learn about data which is the central purpose for memory and processor.
Comments
Post a Comment