Before one should learn something, they must know what they are learning. Let us say, we have a Computer. In the simplest form a computer consists of a Input device (like our keyboard), a Output device (like our monitor), a CPU (for processing the input we give), a memory device (like RAM, Hard Disk etc for storing the programs and datas we supply).
Now, how does computer function with all these ? Computer doesn't have intelligence. It simply does what we ask it do through Programs. Every CPU has it own set of operations that it can perform like Addition, Subtraction, Multiplication, Division, comparision etc. We can make use of these operations to occamplish complicated tasks, Say finding the n'th power of a number. For that we need to specify a series of instructions (Program) to the CPU. The data is present here, and the program is present here. The CPU then starts executing the program and sends the output to the output device as we have requested.
Earlier days, we used to write Machine Codes. Machine codes are codes which corresponds to each basic CPU operation. Say we have a code 2E for Addition. (2E - Hexadecimal number - Just an example). So to add two numbers we need to send something like 2E 34 23 to the CPU. Now the CPU understands that it needs to perform addition operation on 34 and 23. As the requirement for dynamic data increased, we place the data in the memory location and send the instruction like 2E [2000] [2004]. Now the CPU knows that It needs to take data from memory locations (address given to memory) 2000 and 2004 and add them.
As it was very difficult for us to remember each and every instruction code, we started developing something call Mnemonics. Where we simply say Add 34,23 and there will be a compiler which will understand Add 34,23 and sends the ouput as 2E,34,23 to the CPU. CPU then processes this. This compiler itself is a program written with the instruction codes. Still mnemonics are very hard, because we still need to specify the address where the data should be stored and where the CPU needs to put the output. Also it is not easy to handle loops, control statements etc without actually knowing the instruction sets of CPU.
The result of all our expectations for faster and efficient programming is C Programming Language. C is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. Though there are many languages that were developed prior to C, it is one of the basic languages for understanding many other Programming langugages. Knowing C, we can learn other programming languages very easily.
I am quite sure that if you understand how C Programming works, you will enjoy programming.
Now, how does computer function with all these ? Computer doesn't have intelligence. It simply does what we ask it do through Programs. Every CPU has it own set of operations that it can perform like Addition, Subtraction, Multiplication, Division, comparision etc. We can make use of these operations to occamplish complicated tasks, Say finding the n'th power of a number. For that we need to specify a series of instructions (Program) to the CPU. The data is present here, and the program is present here. The CPU then starts executing the program and sends the output to the output device as we have requested.
Earlier days, we used to write Machine Codes. Machine codes are codes which corresponds to each basic CPU operation. Say we have a code 2E for Addition. (2E - Hexadecimal number - Just an example). So to add two numbers we need to send something like 2E 34 23 to the CPU. Now the CPU understands that it needs to perform addition operation on 34 and 23. As the requirement for dynamic data increased, we place the data in the memory location and send the instruction like 2E [2000] [2004]. Now the CPU knows that It needs to take data from memory locations (address given to memory) 2000 and 2004 and add them.
As it was very difficult for us to remember each and every instruction code, we started developing something call Mnemonics. Where we simply say Add 34,23 and there will be a compiler which will understand Add 34,23 and sends the ouput as 2E,34,23 to the CPU. CPU then processes this. This compiler itself is a program written with the instruction codes. Still mnemonics are very hard, because we still need to specify the address where the data should be stored and where the CPU needs to put the output. Also it is not easy to handle loops, control statements etc without actually knowing the instruction sets of CPU.
The result of all our expectations for faster and efficient programming is C Programming Language. C is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. Though there are many languages that were developed prior to C, it is one of the basic languages for understanding many other Programming langugages. Knowing C, we can learn other programming languages very easily.
I am quite sure that if you understand how C Programming works, you will enjoy programming.
3 comments:
A Computer Science portal for geeks. It contains well written, well thought and well
explained computer science and programming articles, quizzes and practice/competitive
programming/company interview Questions.
website: geeksforgeeks.org
A Computer Science portal for geeks. It contains well written, well thought and well
explained computer science and programming articles, quizzes and practice/competitive
programming/company interview Questions.
website: geeksforgeeks.org
A Computer Science portal for geeks. It contains well written, well thought and well
explained computer science and programming articles, quizzes and practice/competitive
programming/company interview Questions.
website: geeksforgeeks.org
Post a Comment