Basics of Programming Languages

Everything from your favorite social media site, television, microwave oven, Smartphone, app, missiles, etc (the list is long) are made possible, or should we say operational, by a code – often referred to as source code (term used to describe a computer program) written in some language.

Programming Languages Share Similarities to Actual Languages

Basics of Programming LanguagesAnd speaking of language, a computer language is not very different from English (or any other) language in terms of rules (syntaxes) and meanings (semantics). They both conform to specific and acceptable set of rules. Just like an English sentence would not be considered correct if it violates grammatical rules, a source code is considered incorrect (will not compile – meaning it will not allow you to see any results, expected or otherwise) if it violates syntax rules. Additionally, statements will not be interpreted correctly in the source code if proper semantics are not observed or applied.

Furthermore and while we have only one category of the English language, computer languages are typically categorized into low/machine/computer (understandable only to a computer and is made up of zeros and ones), assembly (vaguely understandable to human), and high level (makes sense to human but more so to a computer programmer than the average person). The following diagrams show examples of the above language categories.

Machine Language

Early computers were programmed in machine language. To calculate wages = rate * hours in machine language:

100100 010001   //Load
100110 010010   //Multiply
100010 010011   //Store

Assembly Language

Calculating the same problem, wages = rate * hours, using assembly language can be written as:

LOAD   rate
MULT   hour
STOR   wages

High Level Language

High level languages include Basic, FORTRAN, COBOL, Pascal, C, C++, C#, and Java. A compiler translates a program written in a high-level language into machine language. The same equation of wages = rate * hours can be written in C++ as:

wages = rate * hours;

Before either an assembly or high level language can be useful, it must be translated (converted) into a low (computer) language by programs called assembler and compiler, respectively. This is because humans do not speak computer, also known as binary language, and the computer does not speak our language, which is high level language.

In essence, these two programs serve as translators between humans and computers. There are numerous high level languages in use today (some of which are listed above), although there is only one binary language and one assembly language. Most of the software in use today, are written in high level languages.

Which programming language(s) do you know?

UMHB’s Computer Science and Engineering Department, in an effort to equip its graduates with the tools necessary to succeed in the real world, offers three of today’s widely used high level languages (C++, C# and Java). Though computer programming is viewed as a foreign language by many incoming students, the process of writing a program is very straightforward once the necessary skills are learned and practiced. If you’re interested in pursuing a degree in Computer Science and Engineering, come by and visit us.
Dr. Isaac Gang

Dr. Isaac Gang

Dr. Isaac Gang is an Assistant Professor of Computer Science and Engineering at the University of Mary Hardin-Baylor’s Department of Computer Science and Engineering. He joined the UMHB CSE faculty in the fall of 2011 from USM.
Dr. Isaac Gang

Latest posts by Dr. Isaac Gang (see all)

Dr. Isaac Gang

About Dr. Isaac Gang

Dr. Isaac Gang is an Assistant Professor of Computer Science and Engineering at the University of Mary Hardin-Baylor’s Department of Computer Science and Engineering. He joined the UMHB CSE faculty in the fall of 2011 from USM.

  • web hosting companies reviews

    Hey! If by any chance you looking a top web hosting and don’t know which is better, I believe you can find answers here – http://www.webhostsreview.net