Learning GNU C

Categories:

Recommended

What are Programming Languages?

A programming language is a way to give a computer a sequence of instructions to do something. Programming languages can be sorted into three three categories: machine languages, Assembly languages, and High-Level languages. Of these types only machine languages can be understood directly by a computer.

A machine language is the set of instructions that a computer’s central processing unit (CPU) understands. All instructions and information are represented by numbers; very fast for computers, very hard for human brains to read or write. To ease the task of computer programming, people designed easier languages called assembly languages. An assembly language is one which provides textual names for the available machine language commands. This, along with the fact that assembly languages allowed programmers to add spaces and tabs to their code, made assembly languages far easier to program with. Assembly code can then be fed to an assembler which translates it into the machine language of the target computer’s CPU.

The use of assembly languages spread very fast, they became known as second generation languages but there were still two problems with assembly languages. Firstly, each command does only a very basic task such as add two numbers or load a value from memory. Using these small commands was quite tedious. The second problem was much bigger. Programs written in an assembly language are bound to a particular type of CPU. Each type of CPU has it’s own machine language and, therefore, it’s own assembly language.

Finally, machine independant languages were developed, known as third generation or high-level languages. Designed to be easy to read, these languages were made up of English words, basic mathematical symbols, and a few punctuation characters.

What is C?

C is one such high-level language. A tool called a compiler is used to convert C into machine code. A program can be written in C and compiled for any computer, it’s up to the compiler to get the hardware-specific instructions right.

 

Category:

Attribution

Ciaran O’Riordan. Learning GNU C. https://download-mirror.savannah.gnu.org/releases/c-prog-book/learning_gnu_c.pdf

VP Flipbook Maker

Make stunning flipbooks online. Create flipbooks for free with Visual Paradigm. Create online flipbooks, design, publish and share your flipbooks online, try it now!