C Programming series Intro
1.1 Introduction to Programming
C Programming is at the root of every machine, as it is used in most of the OS kernels, Embedded Machines etc.
First let’s understand what programming is and how to do it.
Programming by definition means to give specific instructions
to the computer for performing a task. This task may be simple as printing
something onto the screen or complex calculations.
Electronic devices work only with binary system i.e. 0 or 1
also called bits. So each pixel you see onscreen to each input you enter by
keyboard or mouse are in the form of series of bits. As an electronic machine
works only by this system you can only use binary number system to give
instructions i.e. to program any machine. In fact, the early machines were
given instructions to perform the tasks in the same binary language. But the
problem with programming with binary code was that it was so difficult to learn
and read, error-prone and was different for each machine. Every line was in
series of one’s and zero’s.
So by the time it was felt necessary to solve the above problem and Assemblers were introduced.
In general, Assemblers are programs that analyze the code written in basic human readable form (called Machine Language) and report the errors, and kind of translate them to binary language. Even assemblers couldn't solve the problem as each machine was different. Then compilers and interpreters were introduced. Let’s limit our discussions with compilers.
What compilers facilitated programmers was it allowed them to write code with
human readable characters i.e. A-Z, 0-9 and special characters using specific
rules. Those specific rules are to be going to be discussed here. Compilers
then compile the code written into machine language specific to different machines. Rules are different for
several languages and even compilers.Wires like above were plugged in and out to give instructions to the computer. |
Well, we will continue in our next post...
This comment has been removed by the author.
ReplyDeleteHelpful
ReplyDelete