SlideShare a Scribd company logo
Introduction to Computers
1.6 Types of Programming Languages
● Language is a mode of communication that is used to share ideas, opinions with each
other.
● 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.
● Each programming language has a vocabulary—a unique set of keywords that follows a
special syntax to form and organise computer instructions.
● Software are of two types:- Application software and system software.
● Application software:- like Ms-word , excel, PowerPoint
● System software:-operating system Like Ms-Dos ,Unix, Linux ,Windows XP etc
● Operating system:-Manages all the resources of the computer system Hardware and
software.
Introduction to computer and its fundamentals.pptx
Types of programming language
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 of a compiler or interpreter, so the programs written in low-level language can be
run very fast.
i. Machine Language Machine language is a type of low-level programming language. It is also called as 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 to execute the programs faster than the high-level
programming language.
ii. 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.
Introduction to computer and its fundamentals.pptx
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 -
i. 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 to easily track the program flow and code can be reused in different parts of the program.
ii. Object-Oriented Programming language
Object-Oriented Programming (OOP) language is based upon the 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 makes 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.
Example: C++, Java, Python, C#, etc.
iii. Natural language
Natural language is a part of human languages such as English, Russian, German, and Japanese. It is used by
machines to understand, manipulate, and interpret human's language. It is used by developers to perform tasks such
as translation, automatic summarization, Named Entity Recognition (NER), relationship extraction, and topic
segmentation.
The main advantage of natural language is that it helps users to ask questions in any subject and directly respond
within seconds.
3. Middle-level programming language
Middle-level programming language lies between the 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 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
Main features of programming languages
● Simplicity: the language must offer clear and simple concepts that are easy to understand, facilitating learning and
application. But simplicity can be a difficult balance to strike without compromising the overall capability of the
language.
● Capability: apart from being easy to use, the language must be well-equipped with a robust set of features to perform
a wide range of tasks. If a programming language was designed to be used in a specific area, it must provide the
necessary means (operators, structures, and syntax) to achieve ideal results.
● Abstraction: it is the language’s ability to define and use complicated structures or operations while ignoring certain
low level details.
● Efficiency: programming languages that can be translated and executed efficiently help avoid the excessive
consumption of memory and time.
● Structuring: the language allows programmers to write their code according to structured programming concepts to
avoid creating errors.
● Compactness: a language with this characteristic can express operations concisely without having to write too many
details.
● Principle of Locality: also known as the locality of reference, this phenomenon describes a computer program’s
preference for continually accessing the same areas of memory over a short span of time. By enabling the usage of
loops and subroutines, a programming language can exploit the principle of locality for optimising the overall
performance of an application.
1. Compiler
The language processor that reads the complete source program written in high-level language as a
whole in one go and translates it into an equivalent program in machine language is called a Compiler.
Example: C, C++, C#.
In a compiler, the source code is translated to object code successfully if it is free of errors. The compiler
specifies the errors at the end of the compilation with line numbers when there are any errors in the
source code. The errors must be removed before the compiler can successfully recompile the source
code again the object program can be executed number of times without translating it again.
2. Assembler
The Assembler is used to translate the program written in Assembly language into machine code. The
source program is an input of an assembler that contains assembly language instructions. The output
generated by the assembler is the object code or machine code understandable by the computer.
Assembler is basically the 1st interface that is able to communicate humans with the machine. We need
an assembler to fill the gap between human and machine so that they can communicate with each
other. code written in assembly language is some sort of mnemonics(instructions) like ADD, MUL, MUX,
SUB, DIV, MOV and so on. and the assembler is basically able to convert these mnemonics in binary
code. Here, these mnemonics also depend upon the architecture of the machine.
3. Interpreter
The translation of a single statement of the source program into machine code is done by a language
processor and executes immediately before moving on to the next line is called an interpreter. If there is
an error in the statement, the interpreter terminates its translating process at that statement and
displays an error message. The interpreter moves on to the next line for execution only after the removal
of the error. An Interpreter directly executes instructions written in a programming or scripting language
without previously converting them to an object code or machine code. An interpreter translates one line
at a time and then executes it.
Compiler Interpreter
A compiler is a program that converts the entire source code of a
programming language into executable machine code for a CPU.
An interpreter takes a source program and runs it line by line,
translating each line as it comes to it.
The compiler takes a large amount of time to analyze the entire
source code but the overall execution time of the program is
comparatively faster.
An interpreter takes less amount of time to analyze the source
code but the overall execution time of the program is slower.
The compiler generates the error message only after scanning the
whole program, so debugging is comparatively hard as the error
can be present anywhere in the program.
Its Debugging is easier as it continues translating the program
until the error is met.
The compiler requires a lot of memory for generating object
codes.
It requires less memory than a compiler because no object code
is generated.
Generates intermediate object code. For Security purpose
compiler is more useful.
No intermediate object code is generated.The interpreter is a
little vulnerable in case of security.
Examples: C, C++, C# Examples: Python, Perl, JavaScript, Ruby.
1.7 Number Systems
A number system is a way or a system of writing that we use to express numbers. It is a mathematical notation
used for the representation of numbers of a given set by using digits or other symbols in a logical manner. The
number system allows us to represent every number in a unique way. It represents the arithmetic and algebraic
structure of the figures. Not only that but it also lets us perform arithmetic operations like addition,
subtraction, and division.
The value of a digit in a number is usually determined by:
● The digit
● The position of it in the number
● The base of the number system
Types of Number System
In mathematics, we can represent numbers in various types but the four most basic number systems are
1. The decimal number system (Base- 10)
2. The binary number system (Base- 2)
3. The octal number system (Base-8)
4. The hexadecimal number system (Base- 16)
Octal Number System
This is a system that has a base of eight and uses the number from 0 to 7. It is one of the classifications of number
systems apart from Binary Numbers, Decimal Numbers, and Hexadecimal Numbers. The symbol of the octal is used
to represent the numbers that have a base of 8. There are various applications and importance of octal numbers.
One of the most common uses of it is in computer basics.
Decimal Number System
A number system with a base value of 10 is termed a Decimal Number system. It uses 10 digits i.e. 0-9
for the creation of numbers. Here, each digit in the number is at a specific place with a place value of a
product of different powers of 10. Here, the place value is termed from right to left as the first place
value called units, second to the left as Tens, so on Hundreds, Thousands, etc. Here, units have a place
value of 100, tens have a place value of 101, hundreds as 102, thousands as 103, and so on.
For example, 12265 has place values as,
(1 × 104
) +(2 × 103
) +(2 × 102
) +(6 × 101
) +(5 × 100
)
= (1 × 10000) + (2 × 1000) + (2 × 100) + (6 × 10) + (5 × 1)
= 10000 + 2000 + 200 + 60 + 5
= 12265
Binary Number System
Number System with base value 2 is termed as Binary
number system. It uses 2 digits i.e. 0 and 1 for the
creation of numbers. The numbers formed using
these two digits are termed as Binary Numbers.
Binary number system is very useful in electronic devices
and computer systems because it can be easily performed using just two states ON and OFF i.e. 0 and 1.
Decimal Numbers 0-9 are represented in binary as: 0, 1, 10, 11, 100, 101, 110, 111, 1000, and 1001
Example
Write (14)10 as a binary number.
Solution:
(14)10 = 11102
Octal Number System
Octal Number System is one in which the base value is 8. It uses 8 digits i.e. 0-7 for creation of Octal
Numbers. Octal Numbers can be converted to Decimal value by multiplying each digit with the place
value and then adding the result. In the octal number system, the base is 8 and it uses numbers from 0 to 7 to
represent numbers. Octal numbers are commonly used in computer applications..
Example: Convert 2158 into decimal.
Solution:
2158= 2 × 82 + 1 × 81 + 5 × 80
= 2 × 64 + 1 × 8 + 5 × 1
= 128 + 8 + 5
= 14110
HEXADECIMAL NUMBER SYSTEM
Number System with base value 16 is termed as Hexadecimal Number System. It uses 16 digits for the
creation of its numbers. Digits from 0-9 are taken like the digits in the decimal number system but the
digits from 10-15 are represented as A-F i.e. 10 is represented as A, 11 as B, 12 as C, 13 as D, 14 as E, and
15 as F. Hexadecimal Numbers are useful for handling memory address locations.
1. Conversion from Decimal
to Other Number Systems
Decimal numbers are represented in base 10, but the
binary numbers are of base 2. Hence, to convert a decimal
number to binary number, the base of that number is to be
changed. Follow the steps given below:
● Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the
conversion is to binary, hence the divisor will be 2.
● Step 2: The remainder obtained from the division will become the least significant digit of the new
number.
● Step 3: The quotient obtained from the division will become the next dividend and will be divided by
base i.e. 2.
● Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the
left of the previously obtained digit.
2. Decimal to Octal Conversion
Octal Numbers are represented in base 8. Hence, to convert a decimal number to octal number, the base of that
number is to be changed. Follow the steps given below:
● Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the
conversion is to octal, hence the divisor will be 8.
● Step 2: The remainder obtained from the division will become the least significant digit of the new number.
● Step 3: The quotient obtained from the division will become the next dividend and will be divided by base
i.e. 8.
● Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the left
of the previously obtained digit.
3.Decimal to Hexadecimal Conversion
Hexadecimal Numbers are represented in base 16.
Hence, to convert a decimal number to hexadecimal
number, the base of that number is to be changed.
Follow the steps given below:
● Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the
conversion is to Hex hence the divisor will be 16.
● Step 2: The remainder obtained from the division will become the least significant digit of the new
number.
● Step 3: The quotient obtained from the division will become the next dividend and will be divided by base
i.e. 16.
● Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the
left of the previously obtained digit.
1.7.3 Simple Addition, Subtraction, Multiplication, Division
These representation techniques hold basic laws for various arithmetic operations:
(i) Unique Existence Law: The sum and product of any two numbers exist uniquely. Where 0 is the identity
element for additions and 1 is the identity element for multiplication.
(ii) Associative Law:Addition and multiplication of binary numbers are associative.
(iii) Commutative Law:Addition and multiplication of binary numbers are commutative.
(iv) Distributive Law:Multiplication of binary numbers is distributive over two or more terms in addition.
Arithmetic Operations of Binary Numbers:
1. Addition:Binary arithmetic is essential part of various digital systems. You can add, subtract, multiply, and
divide binary numbers using various methods. These operations are much easier than decimal number
arithmetic operations because binary system has only two digits: 0 and 1.
Binary additions and subtractions are performed as same in decimal additions and subtractions. When we perform
binary additions, there will have two outputs: Sum (S) and Carry (C) . There are four rules for binary addition.
These are given as following below,
Subtraction Operations of Hexadecimal Numbers:
Binary Multiplication
Binary Multiplication is a mathematical operation that involves multiplying two binary numbers, which are numbers composed of only 0s and 1s. Binary multiplication is similar to decimal multiplication, except that the base of the number system is 2 instead of 10. Binary multiplication is a mathematical operation performed on binary numbers, which are composed of only the digits 0 and 1. We use 0 to 9 in the case of decimal division, whereas 0’s (zeros) and 1’s (ones) are used in binary
multiplication.
How to do Binary Multiplication?
There are five key steps involved in Binary Multiplication that are,
Step 1: Write the multiplicand and the multiplier one below the other, aligning the rightmost digits.
Step 2: Multiply the multiplicand by each digit of the multiplier, starting from the rightmost digit.
Step 3: Move to the next digit of the multiplier and multiply it by the multiplicand. Write the result below
the multiplier after shifting it to the left by one position.
Step 4: Repeat this process for each digit of the multiplier, shifting the result to the left by one more
position each time.
Step 5: Add all the results using binary addition rules. The final sum is the product of the two binary
numbers.
Binary Multiplication
Binary Multiplication is a mathematical operation that involves multiplying two binary numbers, which are numbers composed of only 0s and 1s. Binary multiplication is similar to decimal multiplication, except that the base of the number system is 2 instead of 10. Binary multiplication is a mathematical operation performed on binary numbers, which are composed of only the digits 0 and 1. We use 0 to 9 in the case of decimal division, whereas 0’s (zeros) and 1’s (ones) are used in binary
multiplication.
Binary Division
Binary division is a mathematical operation that involves dividing two binary numbers, which are
numbers composed of only 0’s and 1’s. Binary division is similar to decimal division, except that the
base of the number system is 2 instead of 10.
Introduction to computer and its fundamentals.pptx
Introduction to computer and its fundamentals.pptx

More Related Content

Similar to Introduction to computer and its fundamentals.pptx (20)

DOCX
Fundamentals of Programming language.docx
bijayakumarsahoo22
 
DOCX
SYSTEM DEVELOPMENT
shahzadebaujiti
 
PDF
Languages in computer
The University of Lahore
 
PPTX
Chapter 5
meisaina
 
PPTX
2 High level and translators.pptxUUUUUUUUU
EG20910848921ISAACDU
 
PPTX
Programming languages.pptx
Christ Association
 
PPTX
1.Overview of Programming.pptx
Vishwas459764
 
PPTX
introduction to programming languages
NaqashAhmad14
 
DOC
ICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.doc
AmanGunner
 
PPT
Introduction to high level Computer programming
bilalchuddher
 
PPT
Computer languages
Buxoo Abdullah
 
PDF
Ict topic 5
kwongliik
 
DOC
Richa garg itm
richagarg16
 
PPTX
Programming language
Shuja Qais
 
PPTX
programming.pptx
DarianElmyra
 
PDF
sege.pdf
SegezzBrian
 
PDF
Introduction to computer programming
VanessaBuensalida
 
PDF
Language processing system.pdf
RakibRahman19
 
PPTX
Programming Fundamental Slide No.1
Arslan Hussain
 
DOC
Algorithm and flowchart(1)
Suneel Dogra
 
Fundamentals of Programming language.docx
bijayakumarsahoo22
 
SYSTEM DEVELOPMENT
shahzadebaujiti
 
Languages in computer
The University of Lahore
 
Chapter 5
meisaina
 
2 High level and translators.pptxUUUUUUUUU
EG20910848921ISAACDU
 
Programming languages.pptx
Christ Association
 
1.Overview of Programming.pptx
Vishwas459764
 
introduction to programming languages
NaqashAhmad14
 
ICT-DBA4 -05-0811-Apply-Object-Oriented-Programming-Language-Skills.doc
AmanGunner
 
Introduction to high level Computer programming
bilalchuddher
 
Computer languages
Buxoo Abdullah
 
Ict topic 5
kwongliik
 
Richa garg itm
richagarg16
 
Programming language
Shuja Qais
 
programming.pptx
DarianElmyra
 
sege.pdf
SegezzBrian
 
Introduction to computer programming
VanessaBuensalida
 
Language processing system.pdf
RakibRahman19
 
Programming Fundamental Slide No.1
Arslan Hussain
 
Algorithm and flowchart(1)
Suneel Dogra
 

More from Guna Dhondwad (16)

PPTX
Unit -1 cryptography contiues with algorithm.pptx
Guna Dhondwad
 
PPTX
Unit 1 Network Fundamentals and Security .pptx
Guna Dhondwad
 
PPTX
Unit 3 -Symmetric Key Cryptographic Algorithms – I.pptx
Guna Dhondwad
 
PPTX
Network and Internet Security.pptx
Guna Dhondwad
 
PPTX
Computer Security Essentials.pptx
Guna Dhondwad
 
PPTX
Deadlocks and Deadlock Detection Other Issues
Guna Dhondwad
 
DOCX
Concurrency : Mutual Exclusion and Synchronization
Guna Dhondwad
 
PDF
Process And Scheduling Algorithms in os
Guna Dhondwad
 
DOCX
A brief introduction about an operating system and its architecture
Guna Dhondwad
 
PPTX
operating systems and it's services.pptx
Guna Dhondwad
 
PPTX
Introductions to Problem solvings.pptx
Guna Dhondwad
 
PPTX
Internet Networking with its working.pptx
Guna Dhondwad
 
PPTX
Wi-Fi Hacking with the help of various tools.pptx
Guna Dhondwad
 
PPTX
Web Application Hacking tools .pptx
Guna Dhondwad
 
PPTX
Privilege Escalation in Ethical Hacking.pptx
Guna Dhondwad
 
PPTX
System Hacking in brief with the help of examples .pptx
Guna Dhondwad
 
Unit -1 cryptography contiues with algorithm.pptx
Guna Dhondwad
 
Unit 1 Network Fundamentals and Security .pptx
Guna Dhondwad
 
Unit 3 -Symmetric Key Cryptographic Algorithms – I.pptx
Guna Dhondwad
 
Network and Internet Security.pptx
Guna Dhondwad
 
Computer Security Essentials.pptx
Guna Dhondwad
 
Deadlocks and Deadlock Detection Other Issues
Guna Dhondwad
 
Concurrency : Mutual Exclusion and Synchronization
Guna Dhondwad
 
Process And Scheduling Algorithms in os
Guna Dhondwad
 
A brief introduction about an operating system and its architecture
Guna Dhondwad
 
operating systems and it's services.pptx
Guna Dhondwad
 
Introductions to Problem solvings.pptx
Guna Dhondwad
 
Internet Networking with its working.pptx
Guna Dhondwad
 
Wi-Fi Hacking with the help of various tools.pptx
Guna Dhondwad
 
Web Application Hacking tools .pptx
Guna Dhondwad
 
Privilege Escalation in Ethical Hacking.pptx
Guna Dhondwad
 
System Hacking in brief with the help of examples .pptx
Guna Dhondwad
 
Ad

Recently uploaded (20)

PPTX
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
PPTX
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
PPTX
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
PPTX
K-Circle-Weekly-Quiz12121212-May2025.pptx
Pankaj Rodey
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PDF
Tips for Writing the Research Title with Examples
Thelma Villaflores
 
PPTX
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PDF
John Keats introduction and list of his important works
vatsalacpr
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
Applied-Statistics-1.pptx hardiba zalaaa
hardizala899
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
K-Circle-Weekly-Quiz12121212-May2025.pptx
Pankaj Rodey
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
Tips for Writing the Research Title with Examples
Thelma Villaflores
 
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
John Keats introduction and list of his important works
vatsalacpr
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Applied-Statistics-1.pptx hardiba zalaaa
hardizala899
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
Ad

Introduction to computer and its fundamentals.pptx

  • 2. 1.6 Types of Programming Languages ● Language is a mode of communication that is used to share ideas, opinions with each other. ● 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. ● Each programming language has a vocabulary—a unique set of keywords that follows a special syntax to form and organise computer instructions. ● Software are of two types:- Application software and system software. ● Application software:- like Ms-word , excel, PowerPoint ● System software:-operating system Like Ms-Dos ,Unix, Linux ,Windows XP etc ● Operating system:-Manages all the resources of the computer system Hardware and software.
  • 4. Types of programming language 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 of a compiler or interpreter, so the programs written in low-level language can be run very fast. i. Machine Language Machine language is a type of low-level programming language. It is also called as 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 to execute the programs faster than the high-level programming language. ii. 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.
  • 6. 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 - i. 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 to easily track the program flow and code can be reused in different parts of the program.
  • 7. ii. Object-Oriented Programming language Object-Oriented Programming (OOP) language is based upon the 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 makes 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. Example: C++, Java, Python, C#, etc. iii. Natural language Natural language is a part of human languages such as English, Russian, German, and Japanese. It is used by machines to understand, manipulate, and interpret human's language. It is used by developers to perform tasks such as translation, automatic summarization, Named Entity Recognition (NER), relationship extraction, and topic segmentation. The main advantage of natural language is that it helps users to ask questions in any subject and directly respond within seconds.
  • 8. 3. Middle-level programming language Middle-level programming language lies between the 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 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
  • 9. Main features of programming languages ● Simplicity: the language must offer clear and simple concepts that are easy to understand, facilitating learning and application. But simplicity can be a difficult balance to strike without compromising the overall capability of the language. ● Capability: apart from being easy to use, the language must be well-equipped with a robust set of features to perform a wide range of tasks. If a programming language was designed to be used in a specific area, it must provide the necessary means (operators, structures, and syntax) to achieve ideal results. ● Abstraction: it is the language’s ability to define and use complicated structures or operations while ignoring certain low level details. ● Efficiency: programming languages that can be translated and executed efficiently help avoid the excessive consumption of memory and time. ● Structuring: the language allows programmers to write their code according to structured programming concepts to avoid creating errors. ● Compactness: a language with this characteristic can express operations concisely without having to write too many details. ● Principle of Locality: also known as the locality of reference, this phenomenon describes a computer program’s preference for continually accessing the same areas of memory over a short span of time. By enabling the usage of loops and subroutines, a programming language can exploit the principle of locality for optimising the overall performance of an application.
  • 10. 1. Compiler The language processor that reads the complete source program written in high-level language as a whole in one go and translates it into an equivalent program in machine language is called a Compiler. Example: C, C++, C#. In a compiler, the source code is translated to object code successfully if it is free of errors. The compiler specifies the errors at the end of the compilation with line numbers when there are any errors in the source code. The errors must be removed before the compiler can successfully recompile the source code again the object program can be executed number of times without translating it again.
  • 11. 2. Assembler The Assembler is used to translate the program written in Assembly language into machine code. The source program is an input of an assembler that contains assembly language instructions. The output generated by the assembler is the object code or machine code understandable by the computer. Assembler is basically the 1st interface that is able to communicate humans with the machine. We need an assembler to fill the gap between human and machine so that they can communicate with each other. code written in assembly language is some sort of mnemonics(instructions) like ADD, MUL, MUX, SUB, DIV, MOV and so on. and the assembler is basically able to convert these mnemonics in binary code. Here, these mnemonics also depend upon the architecture of the machine.
  • 12. 3. Interpreter The translation of a single statement of the source program into machine code is done by a language processor and executes immediately before moving on to the next line is called an interpreter. If there is an error in the statement, the interpreter terminates its translating process at that statement and displays an error message. The interpreter moves on to the next line for execution only after the removal of the error. An Interpreter directly executes instructions written in a programming or scripting language without previously converting them to an object code or machine code. An interpreter translates one line at a time and then executes it.
  • 13. Compiler Interpreter A compiler is a program that converts the entire source code of a programming language into executable machine code for a CPU. An interpreter takes a source program and runs it line by line, translating each line as it comes to it. The compiler takes a large amount of time to analyze the entire source code but the overall execution time of the program is comparatively faster. An interpreter takes less amount of time to analyze the source code but the overall execution time of the program is slower. The compiler generates the error message only after scanning the whole program, so debugging is comparatively hard as the error can be present anywhere in the program. Its Debugging is easier as it continues translating the program until the error is met. The compiler requires a lot of memory for generating object codes. It requires less memory than a compiler because no object code is generated. Generates intermediate object code. For Security purpose compiler is more useful. No intermediate object code is generated.The interpreter is a little vulnerable in case of security. Examples: C, C++, C# Examples: Python, Perl, JavaScript, Ruby.
  • 14. 1.7 Number Systems A number system is a way or a system of writing that we use to express numbers. It is a mathematical notation used for the representation of numbers of a given set by using digits or other symbols in a logical manner. The number system allows us to represent every number in a unique way. It represents the arithmetic and algebraic structure of the figures. Not only that but it also lets us perform arithmetic operations like addition, subtraction, and division. The value of a digit in a number is usually determined by: ● The digit ● The position of it in the number ● The base of the number system
  • 15. Types of Number System In mathematics, we can represent numbers in various types but the four most basic number systems are 1. The decimal number system (Base- 10) 2. The binary number system (Base- 2) 3. The octal number system (Base-8) 4. The hexadecimal number system (Base- 16)
  • 16. Octal Number System This is a system that has a base of eight and uses the number from 0 to 7. It is one of the classifications of number systems apart from Binary Numbers, Decimal Numbers, and Hexadecimal Numbers. The symbol of the octal is used to represent the numbers that have a base of 8. There are various applications and importance of octal numbers. One of the most common uses of it is in computer basics.
  • 17. Decimal Number System A number system with a base value of 10 is termed a Decimal Number system. It uses 10 digits i.e. 0-9 for the creation of numbers. Here, each digit in the number is at a specific place with a place value of a product of different powers of 10. Here, the place value is termed from right to left as the first place value called units, second to the left as Tens, so on Hundreds, Thousands, etc. Here, units have a place value of 100, tens have a place value of 101, hundreds as 102, thousands as 103, and so on. For example, 12265 has place values as, (1 × 104 ) +(2 × 103 ) +(2 × 102 ) +(6 × 101 ) +(5 × 100 ) = (1 × 10000) + (2 × 1000) + (2 × 100) + (6 × 10) + (5 × 1) = 10000 + 2000 + 200 + 60 + 5 = 12265
  • 18. Binary Number System Number System with base value 2 is termed as Binary number system. It uses 2 digits i.e. 0 and 1 for the creation of numbers. The numbers formed using these two digits are termed as Binary Numbers. Binary number system is very useful in electronic devices and computer systems because it can be easily performed using just two states ON and OFF i.e. 0 and 1. Decimal Numbers 0-9 are represented in binary as: 0, 1, 10, 11, 100, 101, 110, 111, 1000, and 1001
  • 19. Example Write (14)10 as a binary number. Solution: (14)10 = 11102
  • 20. Octal Number System Octal Number System is one in which the base value is 8. It uses 8 digits i.e. 0-7 for creation of Octal Numbers. Octal Numbers can be converted to Decimal value by multiplying each digit with the place value and then adding the result. In the octal number system, the base is 8 and it uses numbers from 0 to 7 to represent numbers. Octal numbers are commonly used in computer applications.. Example: Convert 2158 into decimal. Solution: 2158= 2 × 82 + 1 × 81 + 5 × 80 = 2 × 64 + 1 × 8 + 5 × 1 = 128 + 8 + 5 = 14110
  • 21. HEXADECIMAL NUMBER SYSTEM Number System with base value 16 is termed as Hexadecimal Number System. It uses 16 digits for the creation of its numbers. Digits from 0-9 are taken like the digits in the decimal number system but the digits from 10-15 are represented as A-F i.e. 10 is represented as A, 11 as B, 12 as C, 13 as D, 14 as E, and 15 as F. Hexadecimal Numbers are useful for handling memory address locations.
  • 22. 1. Conversion from Decimal to Other Number Systems Decimal numbers are represented in base 10, but the binary numbers are of base 2. Hence, to convert a decimal number to binary number, the base of that number is to be changed. Follow the steps given below: ● Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the conversion is to binary, hence the divisor will be 2. ● Step 2: The remainder obtained from the division will become the least significant digit of the new number. ● Step 3: The quotient obtained from the division will become the next dividend and will be divided by base i.e. 2. ● Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the left of the previously obtained digit.
  • 23. 2. Decimal to Octal Conversion Octal Numbers are represented in base 8. Hence, to convert a decimal number to octal number, the base of that number is to be changed. Follow the steps given below: ● Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the conversion is to octal, hence the divisor will be 8. ● Step 2: The remainder obtained from the division will become the least significant digit of the new number. ● Step 3: The quotient obtained from the division will become the next dividend and will be divided by base i.e. 8. ● Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the left of the previously obtained digit.
  • 24. 3.Decimal to Hexadecimal Conversion Hexadecimal Numbers are represented in base 16. Hence, to convert a decimal number to hexadecimal number, the base of that number is to be changed. Follow the steps given below: ● Step 1: Divide the Decimal Number with the base of the number system to be converted to. Here the conversion is to Hex hence the divisor will be 16. ● Step 2: The remainder obtained from the division will become the least significant digit of the new number. ● Step 3: The quotient obtained from the division will become the next dividend and will be divided by base i.e. 16. ● Step 4: The remainder obtained will become the second least significant digit i.e. it will be added in the left of the previously obtained digit.
  • 25. 1.7.3 Simple Addition, Subtraction, Multiplication, Division These representation techniques hold basic laws for various arithmetic operations: (i) Unique Existence Law: The sum and product of any two numbers exist uniquely. Where 0 is the identity element for additions and 1 is the identity element for multiplication. (ii) Associative Law:Addition and multiplication of binary numbers are associative. (iii) Commutative Law:Addition and multiplication of binary numbers are commutative. (iv) Distributive Law:Multiplication of binary numbers is distributive over two or more terms in addition.
  • 26. Arithmetic Operations of Binary Numbers: 1. Addition:Binary arithmetic is essential part of various digital systems. You can add, subtract, multiply, and divide binary numbers using various methods. These operations are much easier than decimal number arithmetic operations because binary system has only two digits: 0 and 1. Binary additions and subtractions are performed as same in decimal additions and subtractions. When we perform binary additions, there will have two outputs: Sum (S) and Carry (C) . There are four rules for binary addition. These are given as following below,
  • 27. Subtraction Operations of Hexadecimal Numbers:
  • 28. Binary Multiplication Binary Multiplication is a mathematical operation that involves multiplying two binary numbers, which are numbers composed of only 0s and 1s. Binary multiplication is similar to decimal multiplication, except that the base of the number system is 2 instead of 10. Binary multiplication is a mathematical operation performed on binary numbers, which are composed of only the digits 0 and 1. We use 0 to 9 in the case of decimal division, whereas 0’s (zeros) and 1’s (ones) are used in binary multiplication.
  • 29. How to do Binary Multiplication? There are five key steps involved in Binary Multiplication that are, Step 1: Write the multiplicand and the multiplier one below the other, aligning the rightmost digits. Step 2: Multiply the multiplicand by each digit of the multiplier, starting from the rightmost digit. Step 3: Move to the next digit of the multiplier and multiply it by the multiplicand. Write the result below the multiplier after shifting it to the left by one position. Step 4: Repeat this process for each digit of the multiplier, shifting the result to the left by one more position each time. Step 5: Add all the results using binary addition rules. The final sum is the product of the two binary numbers.
  • 30. Binary Multiplication Binary Multiplication is a mathematical operation that involves multiplying two binary numbers, which are numbers composed of only 0s and 1s. Binary multiplication is similar to decimal multiplication, except that the base of the number system is 2 instead of 10. Binary multiplication is a mathematical operation performed on binary numbers, which are composed of only the digits 0 and 1. We use 0 to 9 in the case of decimal division, whereas 0’s (zeros) and 1’s (ones) are used in binary multiplication.
  • 31. Binary Division Binary division is a mathematical operation that involves dividing two binary numbers, which are numbers composed of only 0’s and 1’s. Binary division is similar to decimal division, except that the base of the number system is 2 instead of 10.