0% found this document useful (0 votes)
54 views5 pages

PSDS Note-1

The document discusses different types of programming languages and number systems. It describes low-level, high-level, and middle-level programming languages. It also explains binary, octal, decimal, and hexadecimal number systems. Conversion rules between different number systems are provided.

Uploaded by

chinmayamalik861
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views5 pages

PSDS Note-1

The document discusses different types of programming languages and number systems. It describes low-level, high-level, and middle-level programming languages. It also explains binary, octal, decimal, and hexadecimal number systems. Conversion rules between different number systems are provided.

Uploaded by

chinmayamalik861
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Unit - I

1. Programming Language

A programming language is a computer language that is used by programmers (developers) to


communicate with computers. It is a set of instructions written in any specific language (C,
C++, Java, Python) to perform a specific task.

A programming language is mainly used to develop desktop applications, websites, and mobile
applications. Programming languages are of 3 types.

1.1 Low-level programming language

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.

Low-level language is further divided into two parts –

1.1.1 Machine Language

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.

1.1.2 Assembly 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.

1.2 High-level programming language

High-level programming language (HLL) is designed for developing user-friendly software


programs and websites. This programming language requires a compiler or interpreter to
translate the program into machine language (execute the 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.

A high-level language is further divided into three parts –

1.2.1 Procedural Oriented programming language

Procedural Oriented Programming (POP) language is derived from structured programming


and based upon the procedure call concept. It divides a program into small procedures called
routines or functions.

Procedural Oriented programming language is used by a software programmer to create a


program that can be accomplished by using a programming editor like IDE, Adobe
Dreamweaver, or Microsoft Visual Studio.

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.

Examples: C, FORTRAN, Basic, Pascal, etc.

1.2.2 Object-Oriented Programming language

Object-Oriented Programming (OOP) language is based on objects. In this programming


language, programs are divided into small parts called objects. It is used to implement real -
world entities like inheritance, polymorphism, abstraction, etc in the program to make the
program reusable, efficient, and easy to use.
The main advantage of object-oriented programming is that OOP is faster and easier to execute,
maintain, modify, as well as debug.

Examples: C++, Java, Python, C#, etc.

1.3 Middle-level programming language

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.

Example: C, C++, 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.

2.2 Octal 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.

2.3 Decimal 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.

2.4 Hexadecimal Number System

The hexadecimal number system uses sixteen digits/alphabets: 0,1,2,3,4,5,6,7,8,9 and A, B, C,


D, E, and F with the base number as 16. Here, A-F of the hexadecimal system means the
numbers 10-15 of the decimal number system respectively. This system is used in computers
to reduce the large-sized strings of the binary system. For example, 7B316, 6F16, 4B2A16 are
some examples of numbers in the hexadecimal number system.

2.5 Conversion Rules of Number Systems

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.

You might also like