Understanding Data

Lesson Details:
July 10, 2020

I: Introduction

In this paper, you will learn about different programming languages. You will learn how to write a program in any of these languages. In today’s competitive world, the role of computers and software is increasing rapidly. In fact, computers have become an inseparable part of our daily life. It is very important that you know how to write a good program for any of the programming languages presented in this paper. This programming language can help you in your career growth. If you are a programmer, this programming language will definitely help you in your work. Therefore, it is very important that you learn one or more programming languages.

II: Body

A: Understanding data

Data is the basic element of any computer program. It contains information about the persons, places, events and things that we want to include in our program. Data is stored in the computer’s memory and the way we store the data depends on the programming language we use to write our program.

The two most common ways of storing data in a computer’s memory are:

1) As numbers (numeric data).

2) As text (alphanumeric data).

Numbers we use every day like 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 are called integer values or whole numbers. Numbers with decimal points like 2.5 or 3.14159 are called floating point numbers or real numbers. They contain fractional parts and are more accurate than integers. We can also represent numbers as hexadecimal numbers where each number is represented by four symbols, 0 to 9 and A to F. The main reason why we need non-integers is because they enable us to represent fractional amounts of money and other quantities. There are many other number representations we can use in a computer program such as octal and binary numbers.

Text is what we normally see on a computer screen or on paper or hear on a radio or on a television set for example. In a computer program, text has to be converted into numbers for the computer to store it in its memory. This process is called parsing and it is done automatically by the compiler. To represent text in computers, we use special characters called ASCII characters or American Standard Code for Information Interchange characters. A character can be a normal character like “a” or “z” or a special character like “%” or “\$”. For example “\$” represents the dollar sign and “%” represents the percent sign. Since there are only 127 ASCII characters, we cannot represent all possible alphanumeric characters with them. In that case, we use escape sequences which are combinations of ASCII characters that have special meanings in a computer program. For example “t” represents a tab character and “n” represents a line feed character. Computer programs can convert each of these escape sequences back to their corresponding alphanumeric characters when they read them from a file. There are many other kinds of escape sequences too such as C-style escape sequences which begin with a backslash and HTML-style escape sequences which begin with an ampersand & .

B: Different Programming Languages

1) C Language: C is one of the oldest programming languages in use today and was introduced in 1972 by Dennis Ritchie at Bell Laboratories when he was working on the UNIX operating system. It is used when you need high-level control over your code and when you need to minimize memory and CPU usage during runtime. C language compilers come integrated in most modern operating systems like Windows and Linux and therefore provides an easy way to interface with these operating systems without having to develop your own operating system layer. Because of this, C language has been widely used for developing operating systems such as UNIX and LINUX and commercial software such as Microsoft Windows and Adobe Photoshop. The main advantage of learning C language is that it doesn’t require any kind of high level support from the underlying operating system or hardware architecture unlike Java or Python which need Java Virtual Machine or Python interpreter respectively to run properly on the underlying hardware and operating system architecture. Also C language is used to develop low level software such as device drivers and kernels of operating systems so if you learn C language, you will be able to develop low level software also. The disadvantages of learning C language is that it requires a lot of debugging time because it doesn’t have any built-in error handling mechanism like Java or Python do have. It also requires more memory space than other languages because it allows the programmer to directly manipulate data in memory rather than manipulating program counters according to some predefined code structure like Java does do.