PSDS Note-1
PSDS Note-1
1. Programming Language
A programming language is mainly used to develop desktop applications, websites, and mobile
applications. Programming languages are of 3 types.
Low-level language is machine-dependent (0s and 1s) programming language. The processor
runs low-level programs directly without the need for a compiler or interpreter, so the programs
written in low-level language can be run very fast.
Machine language is a type of low-level programming language. It is also called machine code
or object code. Machine language is easier to read because it is normally displayed in binary
or hexadecimal form (base 16) form. It does not require a translator to convert the programs
because computers directly understand the machine language programs.
The advantage of machine language is that it helps the programmer execute the programs faster
than the high-level programming language.
Assembly language (ASM) is also a type of low-level programming language that is designed
for specific processors. It represents the set of instructions in a symbolic and human-
understandable form. It uses an assembler to convert the assembly language to machine
language.
The advantage of assembly language is that it requires less memory and less execution time to
execute a program.
The main advantage of a high-level language is that it is easy to read, write, and maintain.
High-level programming language includes Python, Java, JavaScript, PHP, C#, C++, Objective
C, Cobol, Perl, Pascal, LISP, FORTRAN, and Swift programming language.
The advantage of POP language is that it helps programmers easily track the program flow and
code can be reused in different parts of the program.
Middle-level programming language lies between low-level programming language and high-
level programming language. It is also known as the intermediate programming language and
pseudo-language.
A middle-level programming language's advantages are that it supports the features of high-
level programming, it is a user-friendly language, and closely related to machine language and
human language.
2 Number Systems
Number systems are systems in mathematics that are used to express numbers in various forms
and are understood by computers.
A number is a mathematical value used for counting and measuring objects, and for performing
arithmetic calculations. Numbers have various categories like natural numbers, whole
numbers, rational and irrational numbers, and so on.
Similarly, there are various types of number systems that have different properties, like the
binary number system, the octal number system, the decimal number system, and the
hexadecimal number system.
2.1 Binary Number System
The binary number system uses only two digits: 0 and 1. The numbers in this system have a
base of 2. Digits 0 and 1 are called bits and 8 bits together make a byte. The data in computers
is stored in terms of bits and bytes. The binary number system does not deal with other numbers
such as 2,3,4,5 and so on. For example, 100012, 1111012, 10101012 are some examples of
numbers in the binary number system.
The octal number system uses eight digits: 0,1,2,3,4,5,6 and 7 with a base of 8. The advantage
of this system is that it has lesser digits when compared to several other systems, hence, there
would be fewer computational errors. Digits like 8 and 9 are not included in the octal number
system. Just like the binary, the octal number system is used in minicomputers but with digits
from 0 to 7. For example, 358, 238, 1418 are some examples of numbers in the octal number
system.
The decimal number system uses ten digits: 0,1,2,3,4,5,6,7,8 and 9 with the base number as 10.
The decimal number system is the system that we generally use to represent numbers in real
life. If any number is represented without a base, it means that its base is 10. For example,
72310, 3210, 425710 are some examples of numbers in the decimal number system.
A number can be converted from one number system to another number system using number
system formulas. Binary numbers can be converted to octal numbers and vice versa, octal
numbers can be converted to decimal numbers and vice versa, and so on. Let us see the steps
required in converting number systems.