Está en la página 1de 3

What Is Programming?

For many years, one of the biggest problems in computer science was the question: "How do you get computers to do what you want?". From this question, the concept of programming arose, by allowing people to actually give computers instructions. Programming - creating a sequence of instructions to enable the computer to do something But it took many years for programming languages to evolve to their current state. In this section, you will learn how programming languages work, as well as get a brief insight into their history.

Machine Language
At the extreme lowest level, a program is simply a bunch of switches being turned on and off. The lowest level code possible is Machine Language which is essentially the raw binary data that is actually executed by the computer. Thankfully, you don't need to understand this, but just know one thing.

Important Fact: The only thing that the computer knows how to run is Machine Language
The following is an example of machine language code.

Something That You Don't Need To Understand:


000000 00001 00010 00110 00000 100000

See how confusing that is? Just by looking at it, you can't tell what it does. Not only is machine language hard, but it is also not portable. By this, I mean that the machine code used to display text is different on Microsoft Windows then it is on Mac OSX. This posed a problem for programmers.

Assembly Language
When texting or using internet chat, people often use abbreviations to speed up their typing. In the same way, Assembly Language consists of abbreviations used in an attempt to make programming easier. The following is an example of Assembly.

Binary Representation(You don't need to understand this)


10110000 01100001

Assembly Representation(You don't need to understand this either)


MOV AL, 61h

Now recall earlier:

Important Fact: The only thing that the computer knows how to run is Machine Language
So how does the computer read assembly? The answer: it doesn't. A program called an Assembler takes the assembly, and translates it into machine language. Assembly still has many problems. First off, it's still hard to understand! The other thing is that assembly is not standard. Different assemblers use different acronyms, or abbreviations. Now, we come to the modern language.

High Level Programming Languages


High Level programming languages were created in an effort to make programming more like English. Developers wanted programming languages to make sense, rather than requiring advanced computer knowledge. From this many languages were born. Examples include Fortran, Pascal, ALGOL. Now here is the problem. What should the programming language be like? How should it work? This was the question that faced the creators of these high-level languages. There were two main possible models

Functional Programming
In mathematics, a function is usually an equation, or a series of equations used to model a real world situation. Functional Programming is the concept of creating a language that allows user to program as if they were writing mathematical functions. This model, unfortunately, did not become very popular, due to inflexibility.

Procedural Programming
Procedural Programming is the concept of a programming language that forces users to program by giving the computer a series of steps, with logic statements, and data structures. This is an algorithm, almost like what would be found in a cook book. Ex: "Stir till golden brown". This, ultimately, is the model that prevails today, due to its ability to represent a wide range of real-world situations. Now remember how I said earlier:

Important Fact: The only thing that the computer knows how to run is Machine Language
So how does the computer run a high level language? Well, It' doesn't! A program called a compiler is used to translate the code into machine language that can actually be run. This is similar to the assembler that we talked about earlier. Compilers, however, are more complex. Assembly is just a bunch of abbreviations, but a high level language is something completely new. It's like translating English to animal communication. Now, I want to talk about what is probably the most famous programming language: C. C was procedural, and was based on the concept of methods. A method is a block of code that does

something. For example, Exit() would make the program exit. These methods essentially constitute the building block of C. A C program is almost entirely a bunch of methods called by other methods.

También podría gustarte