Computer Software is divided into two categories: System and Application software.
System software manages the computer resources. It provides the interface between the hardware and the users, but does nothing to directly serve the user's needs.
Application software is directly responsible for helping user's solve their problems.
System software consists of programs that are used to manage the hardware resources of computer and perform required information processing tasks. These programs can be divided into three categories:
Operating System provides services such as a user interface, file and database access and interfaces to communication systems. It helps to keep the system operating in an efficient way, while allowing access to users.
System Support Software provides system utilities and other operating services. For example, disk format programs.
System Development Software include the language translators, which are used to convert user's programs into machine language for execution, debugging etc.
Application software is divided into two categories: general-purpose and application-specific software.
General-purpose software can be used for more than one application. These software programs are called general-purpose because they solve a variety of user computing problems. For example, word processors, database management systems and computer-aided design systems.
Application-specific software is used for a specific purpose only. They can be used only for the task, they were designed for.
In order to understand any programming language, it is important to understand how memory is available to a program.
Bits and Bytes
The computer only understands two things; ON and OFF or 0 and 1. On is represented by the number (1), while off is represented by (0). This is based on the binary number system (described below), these digits are known as bits.
A byte is necessary in order for the computer to store a character of information. So in terms of storage space a byte can be considered to be the size of a character. One BYTE consists of eight bits.
Computer Numbering Systems
There are four different numbering systems used in computer programming:
1. Decimal numbers
2. Binary numbers
3. Octal numbers
4. Hexadecimal numbers
Computer itself uses binary system. In binary system, there are two values for each number position - 0 and 1.
Decimal numbers is based on ten. Let's say, if we have a three digit number, that will be interpreted as: first position from right is ten raised to the power zero, second position will be ten raised to the power one and third position will be ten raised to power two.
Binary system is based on two. There are only two digits in binary system - 0 and 1. Binary digits are known as bits. As described for decimal numbers, it is similar to that, but numbers will be raised to the power of 2, instead of 10.
The base of the octal system is eight. There are eight different symbols in this: 0, 1, 2, 3, 4, 5, 6, 7. Here, the numbers are raised to the power of 8.
The hexadecimal system is based on 16. It's symbols are from 0 through 9, A, B, C, D, E, F. Here, the numbers are raised to the power of 16.
Binary to Decimal Conversion
Since computers are based on binary numbers, we need to understand binary to decimal conversion and vice versa. Let's look at the binary to decimal conversion. To convert from binary to decimal, you start with the binary number and multiply each binary digit by two raised to the position of the digit. For example, if binary number is 10110 -- we will do the following:
Decimal representation of 10110 will be 0 + 2 + 4 + 0 + 16 = 22
Decimal to Binary Conversion
To convert from decimal to binary, you use repetitive division. Let's say our number is 47. We will divide 45 by 2 - remainder 1 will become our first binary digit and the second binary digit is determined by dividing the quotient 22 with 2. Now the remainder of 0 becomes our second digit and the next digit is determined by dividing the quotient with 2. This process is continued, till the quotient becomes zero.
Memory is divided into program memory and data memory. Program memory consists of the memory used for main and other functions. Data memory consists of constants, local definitions, global data and dynamic data memory. We will discuss memory overflow in the later chapters.