AICT Lecture Notes (Before Mid)
AICT Lecture Notes (Before Mid)
Introduction
Benefits of computer
Text Book & Resources: Introduction to Computers 6th International Edition, Peter, N. McGraw-
Hill
Computer
A computer is a collection of parts.
These parts are called components or devices.
Each part does a different job.
Computers have been called “Mind Tools” because they enhance our ability to
perform tasks that require mental activity. Computers are adept to performing
fast calculations, sorting large lists and searching through vast information
libraries. All these activities humans can do but a computer can often
accomplish them much faster and accurately. Our ability to direct a computer’s
activity augments or complements our mental capabilities makes us more
productive. The key to making effective use of the computer as a tool is to
know what a computer is and how to use it.
1
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
remains in wide use even today and is still considered a powerful tool for
performing mathematical computations.
1. Hardware
2. Software
3. Data/information
4. Procedures
5. People
2
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Software is the term used to describe the instructions that tell the hardware
how to perform a task. Without software instructions, the hardware doesn't
know what to do.
Benefits of computer
3
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
books, documents, movies, pictures, and songs digitally, you can quickly find
what you need with a search and share information between devices. It
eliminates the need for paper and plastics used to make non-digital versions
of the media.
Another great thing about communication on the Internet is that it's fast
compared to other forms of communication. For example, you could send
someone an e-mail on the other side of the planet, and have it arrive in less
than a few minute. Snail mail (postal mail) could take days or even weeks to
arrive.
4
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
The computer connected to the Internet is a great learning tool and something
that helps answer almost any question, teaching you anything that interests
you. You can also access news around the world to keep up-to-date with all
of the latest news, weather, and stories around the world. You could learn a
new profession by reading websites or watching videos. You could even sign
up for online courses that teach you about any subject you'd learn in school.
Improves abilities
Are you not the best speller, have poor grammar, not great at math, don't
have a great memory, or need help with something else? Using a computer
improves all your abilities, or if you have a hard time learning, you can rely
on the computer as an assistant.
5
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
A computer can automate most imaginable tasks and can also be programmed
to wait for something to occur. For example, computers connected to a camera
can be programmed to watch for movement and, when detected, send an alert
and begin recording.
Save time
Today, there are many services that help save you time. Several examples
are listed below.
Using a site like Amazon, you can find many of the same products you would
find at a store for the same price or cheaper. You can also have those items
shipped to your door without having to leave your home.
You could use an online banking site to view your bank balance and pay bills.
If your favorite restaurant has a website, you can order take out without
having to wait in line.
You can view online traffic cameras and maps with traffic information to find
the quickest route.
Finally, for those who have a hard time leaving the house, shopping, or
socializing, a computer can help with all of these tasks.
With a computer, you could store and listen to millions of songs and watch a
DVD or Blu-ray movie if you have a disc drive. When connected to the
Internet, you could watch an endless amount of streaming and online videos
from popular sites, like Amazon, Netflix, and YouTube.
6
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Rather than drifting away with the huge list of wonders that computers are
doing every day, you should think about the aspect for what the question is
expecting. This is a question from Computer Fundamentals chapter and
specifically, it is about Computer System.
Now after you identify the area that this question is targeting, it will be easier
to hit the answer. It's asking about the basic operations of a computer system.
7
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Inputting:
Inputting is a basic operation of a computer system. This is the act of feeding
in the data and instruction to the computer (by computer here it means the
processing unit).
A computer system consists of different functional units and Input Unit does
the operation of Inputting. By inputting you should understand that it is to
send data and/or instruction to the computer in the required format.
Information and programs are entered into the computer through Input
devices such as the keyboard, disks, or through other computers via network
connections or modems connected to the Internet.
The input device also retrieves information off disks. Because Computers work
with bits, there should be some mechanism to make data understandable by
CPU (the process is called encoding) and also the information produced by
CPU must be converted to the human readable form (called decoding). Input
Unit devices take care of encoding.
The devices that help you to input data and instructions are known as Input
Devices. Keyboard, Mouse, Light Pen, Joystick, Scanners, Microphone etc. are
some examples of input unit devices. The devices that can send data directly
to the CPU or which does not need to encode it before sending to CPU are
considered Direct Entry Input Devices such as scanners. Devices such as a
keyboard which require encoding data so that it is in the form a CPU can
understand are Indirect Entry Input Devices.
Outputting:
This unit takes care of receiving processed information from processing unit
and present it to the user in the suitable form.
A computer produces results in binary form and output unit does decoding to
make it usable to the users. The devices that can output information from a
computer are known as output unit devices. Monitors, Speakers, Projectors
are soft output devices whereas printers, plotters produce hard copy output.
Soft copy output is something that is temporary or is available only as long as
the output device is turned on. Contrary to these are hard copy output which
8
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
is permanent. The printout in a paper is not lost because the printer is turned
off!
Processing:
The process of performing arithmetic operations (addition, subtraction,
multiplication and division etc.) or logical operations (comparisons like equal-
to, less-than or greater-than etc.) on data to convert them into a useful
information.
Storing:
Saving data and instruction to make them readily available for processing
whenever required.
Before actual processing start, data & instructions entered to the computer
must be stored somewhere inside the computer. Similarly, results produced
by the computer are required to be stored before it is passed to the output
unit. The intermediate result produced by the computer must also be stored
for further processing. Thus the importance of storage Unit in a computer
system is vital.
Based on whether the storage device is inside the main machine or not, it can
be internal or external storage. Similarly, looking at whether the storage
device works close with CPU or works as backup media, they can be primary
storage or secondary storage. Primary storage is also called primary memory.
Secondary storage is known by other names such as backup storage or
secondary memory. For the storage purpose, a computer system may have
9
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
ALU dose does not know what should be done with the data likewise, output
unit does not know when the result should be displayed. By selecting,
interning and seeing to the execution of the program the CU is able to maintain
order and direct the operations of the entire system. CU doesn't perform any
actual processing on data yet it is known as a central nervous system for the
comforts of the computer. It manages and coordinates the entire system.
10
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Computer Organization
Every Computer has four basic units: Input Unit, Output Unit, Storage Unit,
and Central Processing Unit Organization of these units are shown below.
Input Unit:
It accepts (or read) instruction and data from outside world.
It converts these instructions and data in computer acceptable form.
It supplies the converted instructions and data to the computer system
for further processing.
Output Unit:
It accepts the results produced by the computer.
It converts these coded results to human acceptable form.
It supplies the converted result to outside world.
11
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
ALU + CU = CPU
Storage Unit:
The storage unit of a computer system holds or stores the following:
Data and instruction required for processing (received from input
unit)
Intermediate results of processing
Final results of processing before they are released to an output
device
Types of Storage:
Primary Storage Secondary Storage
Use to hold running program instruction Used to hold stored program
instructions
Used to hold data intermediate results, Used to hold data and
and results of ongoing processing of information of stored jobs on
job(s) which Computer system is not
currently working but need to
hold them for processing later
12
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Note:
When entire CPU (both ALU and CU) is contained on a single tiny silicon chip,
it is called a microprocessor.
Instruction Set:
CPU has built-in ability to execute a particular set of machine
instructions, called its instruction set.
Most CPUs have 200 or more instructions (such as add, subtract,
compare etc.) in their instruction set.
CPUs made by different manufacturers have different instruction sets.
Manufacturers tend to group their CPUs into “families” having similar
instruction sets.
13
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Registers:
Special memory units, called registers, are used to hold information on
a temporary basis as the instructions are interpreted and executes by
the CPU.
Registers are part of the CPU (not main memory) of a computer.
The length of a register, sometimes called its word size, equals the
number of bits it can store.
With all other parameters being the same, a CPU with 32-bit registers
can process data twice larger than one with 16-bit registers.
14
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Operating System
Computer Software
Text Book & Resources: Introduction to Computers 6th International Edition, Peter, N. McGraw-
Hill
OPERATING SYSTEM
Operating system is system software that controls the resources (CPU,
memory, I/O devices etc.) of computer systems among different processes
(running programs). Moreover, it provides users with an interface to utilize
system resources.
Time-sharing operating systems schedule tasks for efficient use of the system
and may also include accounting software for cost allocation of processor time,
mass storage, printing, and other resources.
For hardware functions such as input and output and memory allocation, the
operating system acts as an intermediary between programs and the
computer hardware, although the application code is usually executed directly
by the hardware and frequently makes system calls to an OS function or is
interrupted by it. Operating systems are found on many devices that contain
a computer – from cellular phones and video game consoles to web servers
and supercomputers.
15
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Objectives:
To make the computer system convenient to use in an efficient
manner.
16
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Granting of resources
17
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Main Functions:
Process Management:
A process is running program and it utilizes system resources such as
memory, processor time and I/O devices. In a computer system, there may
be several processes running at the same time. Process management basically
manages system resources among different processes using appropriates
scheduling.
Memory Management:
A process need to be loaded into main memory for execution. To improve
system performance several processes are load in to main memory at a time.
Operating System is also responsible for allocation and de-allocation of
memory to processes.
File Management:
Information is stored in files. File management is related to file organization,
storage, retrieval, naming, sharing and protection.
Device Management:
Involves device sharing among processes.
Security:
Responsible for protection of information and resources from unauthorized
access.
18
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Computer Software
We often use the terms “Hardware” and “Software” in connection with
computers.
By contrast, software is the set of instructions that can be stored and run by
hardware. Hardware is so-termed because it is "hard" or rigid with respect to
changes, whereas software is "soft" because it is easy to change.
Hardware:
Hardware refers to the physical devices of a computer system e.g.
Input Devices
Output Device
Storage Unit
Processing Unit
Control Unit etc.
Software:
A computer cannot do anything on its own. We need to give a sequence of
instruction to make it do a desire task. Such a sequence of instruction written
in a language understood by a computer is known as a computer program.
Software refers to a collection of programs, associated document (flowcharts
or manual etc.) describing the programs and how they are to be used.
Program:
Program is an algorithm written in grammar of programming
language. It is a set of rules for forming our program.
19
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Language:
Every language has a well-defined vocabulary (grammar).
Each program has to be written following rigid grammatical rules.
Types of Software:
System Software:
20
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Application Software:
21
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Hardware:
Physical devices/ Components of computer system. Interacts with system
software.
System Software:
Software that constitute the operating and programming environment of the
computer system. Interacts with hardware and also it interacts with
application software.
Application Software:
Software that do a specific task or solve a specific problem. Interact with
system software and also it interacts with users.
Users:
Normally interacts with the system via the user interface provided by the
application software.
22
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Examples:
i. Manufacturing robots
ii. Self-driving cars
iii. Smart assistants
iv. Social-media monitoring
Intelligence:
Intelligence means the ability to learn or understand or to deal with new or
trying situation. Intelligence has been defined in many ways: the capacity for
abstraction, logic understanding, self-awareness, learning, knowledge,
planning, problem-solving. Intelligence is a natural property, which distinguish
humans from other creatures.
23
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
These symptoms of intelligence and many more appears in the human beings
only because they “think”. Thinking means some sort of processing/calculation
in mind.
2. Explaining Artificial Intelligence:
Artificial Intelligence is a branch of Science which deals with helping
machines finds solutions to complex problems in a more human-like
fashion. This generally involves borrowing characteristics from human
intelligence, and applying them as algorithms in a computer friendly way.
Artificial Intelligence has grown to be very popular in today’s world. It is
the simulation of natural intelligence in machines that are programmed
to learn and mimic the actions of humans. These machines are able to
learn with experience and perform human-like tasks.
Turing Test:
The basis of the Turing Test is that the Artificial Intelligence entity should
be able to hold a conversation with a human agent. The human agent ideally
should not able to conclude that they are talking to an Artificial Intelligence.
To achieve these ends, the AI needs to possess these qualities.
24
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
25
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Machine Learning:
Machine learning or ML teaches a machine how to make inferences and
decisions based on past experience. It identifies patterns, analyses past
data to infer the meaning of these data points to reach a possible
conclusion without having to involve human experience. ML focuses on
the development of algorithms that can analyze data and make predictions.
Neutral Network:
Neural Networks work on the similar principles as of Human Neural cells.
They are a series of algorithms that captures the relationship between
various underlying variables and processes the data as a human brain
does. This process analyzes data many times to find associations and give
meaning to previously undefined data. Through different learning models,
like positive reinforcement, the machine is taught it has successfully
identified the object.
Deep learning:
Deep learning is a subset of machine learning that employs artificial neural
networks that learn by processing data. Artificial neural networks mimic
the biological neural networks in the human brain. It teaches a machine
to process inputs through layers in order to classify, infer and predict the
outcome.
Cognitive Computing:
Cognitive computing is another essential component of AI. Its purpose is
to imitate and improve interaction between humans and machines.
Cognitive computing algorithms try to mimic a human brain by analyzing
text/speech/images/objects in a manner that a human does and tries to
give the desired output.
26
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Computer Vision:
Computer vision algorithms tries to understand an image by breaking
down an image and studying different parts of the objects. Computer
vision is an integral field of AI, enabling computers to identify, process and
interpret visual data.
27
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
7. Application OF AI :
Applications of AI in Medicine:
A medical clinic can use AI systems to organize bed schedules, make
a staff rotation and provide medical information.
AI has also application in fields of cardiology (CRG), neurology (MRI),
complex operations of internal organs, etc.
It also has an application in image guided surgery and image analysis
and enhancement
Finding indicators of diabetic retinopathy in eye images
Applications of AI in Music:
Scientists are trying to make the computer emulate the activities of
the skillful musician
It can be used to recommend customers songs and also create the
music itself
Composition, performance, music theory, sound processing are some
of the major areas on which research in music and AI are focusing
on chucks, smart music, etc.
Applications of AI in Telecommunication:
It use advance algorithms to look for patterns within the data
Enabling telcos to both detect and predict network anomalies
Many telecommunications companies make use of heuristic search in
the management of their workforces
28
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Applications of AI in Gaming:
AI is used to generate responsive, adaptive or intelligent behaviors
primarily in non-player characters (NPC’s) similar to human-like
intelligence
The billion-dollar game company Epic Games created a believable
virtual human in an collaborate effort with Cubic Motion, Tencent, and
Vicon.
AI in gaming also helps to increase the player’s interest and
satisfaction over a long period of time.
Applications of AI in Banking:
In august 2001, robots beat humans in a simulated financial trading
competition
Organize operations, invest in stocks and manage properties
Some other applications include loan investigation. ATM design, safe
and fast banking, etc.
29
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
1. What is database?
Database is an “organized collection of logically related data”
1) Data:
Stored representation of objects and events that have meaning and
importance in user’s environment.
Example:
Assume you are going to build database of university, then you must
have to store the data about students, registration, examination,
faculty, etc.
3) Organized collection:
It means data should be arranged/structured in such a way that one can
effectively process it when necessary.
Example:
Unorganized data:
RawalpindiKhubaib19
Organized data:
Name: Khubaib
City: Rawalpindi
Age: 19
30
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Example of data:
Khubaib Ahmed
19
Ali Akbar
Islam
20
1234
Rawalpindi
Islam
Islamabad
2995
From above data we can obtain some knowledge on the base of guess. This
data can be converted into information by doing some process as follow.
Example of information:
Name City Roll number Age Religion
Khubaib Rawalpindi 2995 19 Islam
Ahmed
Ali Akbar Islamabad 1234 20 Islam
Here, the process to convert data into information was adding a few additional
data items and providing some structure. After that we recognize that it’s a
data of some class; name, city, roll no, age and religion.
3. Metadata:
Data about data is called metadata; just like in above example name, age, roll
no, and age is a data that is used to describe actual data. So, this additional
data is called metadata.
31
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Metadata is a data that describe the properties and characteristics of end user
data, and the context of that data.
4. Why database?
Database is an essential need of current age due to following reasons.
Shift from computation to information
Data is everywhere.
Each and every field of life is incomplete without data.
5. Advantages of database:
Related data is collected at one place.
Data will be well organized.
User’s operations can be performed on data. o
Retrieving/accessing
Updating/modifying
Removing/deleting
Entering new relevant data
Processing can be made to convert the data into information
Converted information can be used to support decision making.
Reports
Graphs
Views
Data can be shared
32
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
• Renting a video
• Using the Internet
• Studying at university
Example:
Assume the Property business; in this business different type of business can
be stored. E.g. Sales, Contracts, etc.
In the above example the data is stored in two files. Each file has different
structure; therefore, it is difficult to write a single application to perform the
user’s operation on created database. Hence, there is a need to write an
application for each file with different storage structure. As given below:
33
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
34
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
35
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
36
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Computer Languages
Assembly & High-level Languages
Compiler, Linker & Interpreter
Text Book & Resources: Introduction to Computers 6th International Edition, Peter, N. McGraw-
Hill
Computer Languages
Machine Language:
Only language of a computer understood by it without using a
translation program.
Normally written as string of binary 1s and 0s.
Written using decimal digits if the circuitry of the computer being used
permits this.
Typical Machine Language Instruction format is
OPCODE: Tells the computer which operation to perform from the instruction
set of the computer.
37
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Characteristics:
Can be executed very fast (because no need for further translation).
Machine Dependent (as internal design of every computer is different
so, machine language also vary computer to computer)
Difficult to Program (Programmer need to remember OPCODE and
storage location of OPERAND)
Error Prone (Lack of indication for error)
Difficult to Modify
Assembly Language:
A language that allows use of letters and symbols instead of numbers for
representing instruction and storage location is called as assembly language.
Unlike machine language, uses ADD instead of binary 1110 or decimal 14.
Advantages:
Easier to understand and use (as it uses symbols and letters to
represents OPCODE and addresses).
Easier to locate and correct error (with the help of assembler).
Easier to Modify.
No worry about sequence number of addresses.
Efficiency of machine language (As there is one-to-one correspondence
between assembly language and machine language, so it enjoys the
efficiency of its corresponding machine language).
38
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Limitation:
Machine dependent (Different Assemblers for different Computers)
As Machine dependent so required knowledge of Hardware
Machine level coding (A there is one-to-one correspondence between
machine and assembly language, so there will be as many instructions
in assembly as we will have in machine language)
Advantages:
Machine independent
Easier to learn
Fewer errors
Better Documentation
Limitations:
Lower efficiency
Less flexibility
39
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Video Link:
https://www.youtube.com/playlist?list=PLeby327DX1cj2K1JNdj18XGwACKF4MwYm
40
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Compiler:
A compiler is a special program that processes statements written in a particular
programming language and turns them into machine language or "code" that a
computer's processor uses.
Interpreter:
As the name suggests, an interpreter transforms or interprets a high-level
programming code into code that can be understood by the machine (machine code)
or into an intermediate language that can be easily executed as well.
The interpreter reads each statement of code and then converts or executes it
directly.
Compiler VS Interpreter:
Humans can only understand high-level languages, which are called source code.
Computers, on the other hand, can only understand programs written in binary
languages, so either an interpreter or compiler is required.
The interpreter reads each statement of code and then converts or executes it
directly. In contrast, an assembler or a compiler converts a high-level source code
into native (compiled) code that can be executed directly by the operating system
(e.g. by creating a .exe program).
Compilers must generate intermediate object code that requires more memory to be
linked, contrarily to interpreters which tend to use memory more efficiently.
Programming languages that use interpreters include Python, Ruby, and JavaScript,
while programming languages that use compilers include Java, C++, and C.
41
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Linker:
In computer science, a linker is a computer program that takes one or more object
files generated by a compiler and combines them into one, executable program.
Computer programs are usually made up of multiple modules that span separate
object files, each being a compiled computer program. The program as a whole refers
to these separately compiled object files using symbols. The linker combines these
separate files into a single, unified program, resolving the symbolic references as it
goes along.
42
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Network Basics
Network Topologies
Architecture
Data Transmission Characteristics
Internet & Its Services
Text Book & Resources: Introduction to Computers 6th International Edition, Peter, N. McGraw-
Hill
Computer Networks
Computer networks are defined as interconnected computer systems.
Computer networks help the user to share resources and help in
communication. The following are the most important benefits of the computer
network:
Data sharing:
Computer network helps in sharing of user data such as data files
User communication:
Users can communicate via computer networks by using emails, news groups,
teleconferencing etc.
Network gaming:
Many games are available with remote multiple
players support with the help of networks.
43
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Internet:
Internet is a Network of networks which links many different types of
computers all over the world, using a common mechanism of identifying
computers and common set communication protocols (rules).
44
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Electronic Mail:
Electronic mail (e-mail) service enable user to send a mail (message) to
another internet in any part of the world in seconds. An e-mail can contain
not only text documents but also image, audio and video data.
Telnet:
Telnet service enables users to get login to another computer on the internet
from his/her local computer. This login process is referred as “remote login”.
The user type’s telnet command after that remote computer asks user login
information (ID and password). When user provide name and password
remote computer authenticate login information. If login information is true
it allow user to get login and avail services provided by remote computer.
Usage of this service is follows:
45
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Usenet News:
Usenet service enables a group of users to exchange their
views/ideas/information on some common topic to all members belonging to
the group. Several Usenet groups are exists over the internet.
The WWW uses client-server model. Server computer provide services while
client computer access these information from server using Hypertext Transfer
Protocol (HTTP). HTTP is a rule of communication among different types of
computer over the internet in Client-Server model.
46
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Network Topologies
Geometric representation of how the computers are connected to each other
is known as topology. There are five types of topology.
1. Mesh Topology
2. Star Topology
3. Bus Topology
4. Ring Topology
5. Hybrid Topology
Mesh Topology:
Advantages:
1. No data traffic issues as there is a dedicated link between two devices which
means the link is only available for those two devices.
2. Mesh topology is reliable and robust as failure of one link doesn’t affect
other links and the communication between other devices on the network.
3. Mesh topology is secure because there is a point to point link thus
unauthorized access is not possible.
47
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Disadvantages:
1. Amount of wires required to connected each system is tedious and
headache.
2. Since each device needs to be connected with other devices, number of I/O
ports required must be huge.
3. Scalability issues because a device cannot be connected with large number
of devices with a dedicated point to point link.
Star Topology:
Advantages:
1. Less expensive because each device only need one I/O port and needs to
be connected with hub with one link.
2. Easier to install
3. Less amount of cables required because each device needs to be connected
with the hub only.
4. Robust, if one link fails, other links will work just fine.
48
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Disadvantages:
1. If hub goes down everything goes down, none of the devices can work
without hub.
2. Hub requires more resources and regular maintenance because it is the
central system of star topology.
Bus Topology:
In bus topology there is a main cable and all the devices are connected to this
main cable through drop lines. There is a device called tap that connects the
drop line to the main cable. Since all the data is transmitted over the main
cable, there is a limit of drop lines and the distance a main cable can have.
Advantages:
1. Easy installation, each cable needs to be connected with backbone cable.
2. Less cables required than Mesh and star topology
Disadvantages:
1. Difficultly in fault detection.
2. Not scalable as there is a limit of how many nodes you can connect with
backbone cable.
49
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Ring Topology:
In ring topology each device is connected with the two devices on either side
of it. There are two dedicated point to point links a device has with the devices
on the either side of it. This structure forms a ring thus it is known as ring
topology. If a device wants to send data to another device, then it sends the
data in one direction, each device in ring topology has a repeater, if the
received data is intended for other device then repeater forwards this data
until the intended device receives it.
Advantages:
1. Easy to install.
2. Managing is easier as to add or remove a device from the topology only two
links are required to be changed.
Disadvantages:
1. A link failure can fail the entire network as the signal will not travel forward
due to failure.
2. Data traffic issues, since all the data is circulating in a ring.
50
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Hybrid topology:
Advantages:
1. We can choose the topology based on the requirement for example,
scalability is our concern then we can use star topology instead of bus
topology.
2. Scalable as we can further connect other computer networks with the
existing networks with different topologies.
Disadvantages:
1. Fault detection is difficult.
2. Installation is difficult.
3. Design is complex so maintenance is high thus expensive.
Video Link:
https://www.youtube.com/playlist?list=PLeby327DX1cj2K1JNdj18XGwACKF4MwYm
51
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Architecture
Computer Network Architecture is defined as the physical and logical design
of the software, hardware, protocols, and media of the transmission of data.
Simply we can say that how computers are organized and how tasks are
allocated to the computer.
Peer-To-Peer network:
A peer-to-peer (P2P) network is created when two or more PCs are connected
and share resources without going through a separate server computer.
A P2P network can be an ad hoc connection—a couple of computers connected
via a Universal Serial Bus to transfer files.
A P2P network also can be a permanent infrastructure that links a half-dozen
computers in a small office over copper wires.
A P2P network can be a network on a much grander scale in which special
protocols and applications set up direct relationships among users over the
Internet.
52
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Advantages:
It is less costly as it does not contain any dedicated server.
Installation of peer to peer architecture is quite easy as each
computer manages itself.
If one computer stops working but, other computers will not stop
working.
Disadvantages:
Each computer has to take the backup rather than a central computer
and the security measures are to be taken by all the computers
separately.
Scalability is a issue in a peer to Peer Architecture as connecting each
computer to every computer is a headache on a very large network.
53
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Client/Server network
A type of network in which server computer is connected to client
computers.
Client:
The client is a computer that requests service from the server. The type
of services that client request is taking the print, making a phone call, fetching
data from Google.com or any other website.
server:
A server is a computer that provides services to the client computer. A
server might be a web server of Google, print server, database server, file
server and fax server.
The server is also named the host computer. Host computer manages
hardware and software on the network. The server computer behaves as a
centralized storage area and it stores data, information and programs. Server
computer provides resources to the client computers. The server has more
processing power and thus contains more RAM. It is also expensive than the
client computer.
54
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Advantages:
New features can be added to the server without affecting the network
All clients, server and network work together in LAN and WAN
Data security is well managed by the server
New computers are added to the network without affecting network
performance
Disadvantages:
o In case of server failure entire network is down.
o It requires a dedicated network administrator to manage all the
resources.
o Server maintenance cost is high as the server is the main component in
this Architecture
Delivery:
The primary task of a data communication system is to deliver or transfer data
from sender to receiver. The system must deliver data to the correct
destination. Data must be received by the intended device or user and only
by that device or user.
Accuracy:
The system must deliver the data accurately. Data that have been altered in
transmission and left uncorrected are unusable. The receiver should receive
the exact same data which was sent by the sender. The protocol might require
to alter the sent data to protect and optimize the process. However, the
protocol should also reverse and restore the data back to its original form
before representing it to the receiver. The accuracy must be maintained.
55
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Timeliness:
Data must be delivered as they are produced, in the order they are produced
and without any significant delay. In the case of video and audio, late delivery
is useless. Communication system must deliver data in a timely manner.
Timely means delivering data without any delay (real-time transmission).
Jitter:
Jitter refers to the variation of packet arrival time. Data is sent as packets,
that is, a chunk of the whole data is sent in each turn. These packets get re-
joined back in the target device to represent the complete data as it is. Each
packet is sent with a predefined delay or acceptable amount of delay. If
packets are sent without maintaining the predefined delay then an uneven
quality in the data might result.
Band width
Network bandwidth is a measurement indicating the maximum capacity of a
wired or wireless communications link to transmit data over a network
connection in a given amount of time. bandwidth is expressed as a bitrate and
measured in bits per second (bps).
Analog vs digital
Analog Signal:
An analog signal is time-varying and generally bound to a range , but there is
an infinite number of values within that continuous range. An analog signal
uses a given property of the medium to convey the signal’s information, such
as electricity moving through a wire.
When plotted on a voltage vs. time graph, an analog signal should produce a
smooth and continuous curve. There should not be any discrete value changes
56
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Digital Signal:
A digital signal is a signal that represents data as a sequence of discrete
values. A digital signal can only take on one value from a finite set of possible
values at a given time. With digital signals, the physical quantity representing
the information can be many things:
Variable electric current or voltage
Phase or polarization of an electromagnetic field
Acoustic pressure
The magnetization of a magnetic storage media
Human voice, natural sound, analog Computers, optical drives, and other
electronic devices are a few examples electronic devices
57
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Internet:
Internet is a Network of networks which links many different types of
computers all over the world, using a common mechanism of identifying
computers and common set communication protocols (rules).
Electronic Mail:
58
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Telnet:
Telnet service enables users to get login to another computer on the internet
from his/her local computer. This login process is referred as “remote login”.
The user type’s telnet command after that remote computer asks user login
information (ID and password). When user provide name and password
remote computer authenticate login information. If login information is true it
allow user to get login and avail services provided by remote computer. Usage
of this service is follows:
Using the computing power of remote computer.
For using some software on a remote computer, which not available on
user’s local computer.
For accessing information from a database on a remote computer.
Usenet News:
Usenet service enables a group of users to exchange their
views/ideas/information on some common topic to all members belonging to
the group. Several Usenet groups are exists over the internet.
Hypertext document on the internet are known as Web Pages. These web
pages are created using a special language known as, Hypertext Markup
Language (HTML).
The WWW uses client-server model. Server computer provide services while
client computer access these information from server using Hypertext Transfer
Protocol (HTTP). HTTP is a rule of communication among different types of
computer over the internet in Client-Server model.
59
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Digital Marketing
Text Book & Resources: Introduction to Computers 6th International Edition, Peter, N. McGraw-
Hill
60
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
makes SEO challenging is that the answer to this question always depends on
Google and its most current algorithm. By using keywords and phrases, you
can use SEO to massively increase visibility and begin a lasting customer
relationship. SEO is defined as increasing a website’s rank in online search
results, and thus its organic site traffic, by using popular keywords and
phrases.
Pay-per-Click (PPC):
Pay-per-click (PPC) or Paid search, typically refers to the sponsored result on
the top or side of a search engine results page (SERP). When you set up a
pay-per-click campaign, you will also be able to choose whether you want your
ad or promoted results to be shown to users all over the world, or only within
a specific geographic area. An algorithm prioritizes each available ad based on
a number of factors, including:
Ad quality
Keyword relevance
Landing page quality
Bid amount
61
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Google is the largest provider of PPC services. Its platform, Google Ads,
is often the first stop for people beginning PPC marketing. These ads
charge you for every click and they can be tailored to appear when certain
search terms are entered, so your ads are being targeted to audiences seeking
something in particular. These ads can be extremely effective, as they rely on
data gleaned from individuals’ online behavior and are used to boost website
traffic by delivering relevant ads to the right people at the right time.
Content Marketing:
Effective content marketing is not outwardly promotional in nature, but rather
serves to educate and inspire consumers who are seeking information.
Content marketing works in symbiosis with other types of digital marketing:
It is a way to incorporate SEO search terms into fresh website content, and
the content created can be shared as social media posts and in email
marketing publications. Content marketing is a long-term strategy that
focuses on building a strong relationship with your target audience by
giving them high-quality content that is very relevant to them on a
consistent basis. Eventually, when customers make a purchase
decision, their loyalty already lies with you. They will purchase your
product and prefer it over competitors’ options. With content marketing,
the goal is to help your audience along their buyer's journey. First, identify
common FAQs and concerns your buyers have before they are ready to make
a purchase.
Then, create an editorial calendar to help you create and manage your
content. It also helps to have a content management system (CMS) to make
publishing easy.
Content marketing matters and there are plenty of stats to prove it:
62
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Affiliate Marketing:
Affiliate marketing is the process by which an affiliate earns a commission for
marketing another person's or company's products. The affiliate simply
searches for a product they enjoy, then promotes that product and earns a
piece of the profit from each sale they make. Whether you want to be an
affiliate or find one, the first step is to make a connection with the other party.
You can use a platform designed to connect affiliates with retailers, or you can
start or join a single-retailer program. Affiliate marketers are sometimes
also known as the publisher. Affiliates can also range from single
individuals to entire companies. An affiliate marketing business can
produce a few hundred dollars in commissions each month or tens of
millions of dollars.
E.g.: Sometimes marketers promote their affiliate programs by offering
bonuses to anyone who purchases the offer. For example, you could give a
free eBook you wrote to any follower who makes a purchase. Promotions like
this encourage customers to buy by sweetening the deal.
Marketing automation:
Marketing automation is the process of leveraging software to automate
repetitive marketing tasks. Marketers use this software in order to help
nurture leads, often through integrations with customer relationship
management (CRM) and customer data platform (CDP) software. Sending out
surveys to gain feedback on products, services, and updates is another
excellent marketing automation example. Marketing automation uses
software to power digital marketing campaigns, improving the efficiency and
relevance of advertising.
According to statistics:
Marketing automation can help you gain valuable insight into which programs
are working and which aren’t, and it will provide metrics to allow you to speak
to digital marketing’s efforts on your company’s bottom line.
63
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Email Marketing:
Email marketing is the highly effective digital marketing strategy of sending
emails to prospects and customers. Effective marketing emails convert
prospects into customers, and turn one-time buyers into loyal, raving fans. To
succeed, your marketing emails should satisfy five core attributes. They must
be trustworthy, relevant, conversational, coordinated across channels, and
strategic. Email campaigns can be used to increase brand awareness,
generate traffic to other channels, promote products or services, or nurture
leads toward a purchase. Individualizes the content, both in the body and in
the subject line. States clearly what kind of emails the subscriber will get.
Offers a clear unsubscribe option. Integrates both transactional and
promotional emails. Email marketing is a proven, effective technique all on its
own: 89% of surveyed professionals named it as their most effective lead
generator.
64
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
costs. You can also target your audience with content and offers based on
what stage they’re at within the buying journey. For example, email marketing
can be used to nurture a lead until they’re ready to make a purchase. Social
media platforms usually possess a very smart algorithm that studies and
collates user preferences. Such that specific ad campaigns are shown only to
users with a specific inkling.
Brand development:
Brand development is a strategic process of creating and distinguishing your
company's image, products and services from your competitors. A well-
developed website, a blog featuring quality and useful articles, a social media
channel that is highly interactive are some of the ways by which a business
can build its brand. A great example of branding strategies is their “Think
Different” campaign. Apple's “Think Different” campaign is a great example of
a business developing their brand image from the inside out. By doing so they
have guaranteed customer loyalty and brand awareness in a way that not
many have.
Goal-Driven Marketing:
Marketing goal is the specific action you want your clients to take after seeing
your ads or social media posts. Additionally, goal-oriented marketing should
have a specific niche or target in mind and it should appeal directly to a very
specific target audience. Every online marketing campaign requires a goal and
set of sub goals to achieve and to allow benchmarking results. An essential
part of goal-driven marketing is the opportunity to learn, adjust, and keep
testing for new ways to improve results. It’s also necessary to keep in mind
that priory set goals can be wrong, and it’s crucial to keep updating goals
when it’s become clear the chosen targets are not providing the business what
it needs.
65
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Lack of trust:
Problem of security and privacy is the issue of lack of trust on the part of
customers which has been recognized a great challenge on the way of online
marketing growth. Today despite the rapid growth of online transactions several
people still mistrust electronic methods of paying and still have doubt whether
the purchased items will be delivered or not.
High competition:
Digital marketing has a lot of competition. However, since this field is quite
creative in nature, the competition increases even further. As a digital marketer,
one of your chief goals will be to rank your page or website on Google and make
it come up on the first page.
66
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Numbers System
The ways through which we express numerical information and their
different operations are called Number systems.
Base value:
Total number of digits in a system is called its base.
The positional number system has the following types:
67
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
68
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Binary Table
8 4 2 1
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 10-A
1 0 1 1 11-B
1 1 0 0 12-C
1 1 0 1 13-D
1 1 1 0 14-E
1 1 1 1 15-F
69
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Binary to Octal:
The following steps are used in this method:
Step 1: Divide the binary digits into groups of three (starting from the right)
Step 2: Convert each group of three binary digits to one octal digit. Since
there are 8 digits (0 to 7) in octal number system. 3 bits (2 3 = 8) are sufficient
to represent any octal number in binary.
Example:
(101110)2= (?)8
Step 1: Divide the binary digits into groups of 3.
101 110.
Step 2: Convert each group into one digit of octal.
101= 58
110 = 68
Binary to Decimal:
Converting (10101)2 to decimal number system.
Step 1:
Assign numbers to each digit starting from zero (0). From left to right.
(1403120110).
Step 2:
(1*24)+(0*23)+(1*22)+(0*21)+(1*20)
16+0+4+0+1
(21)10
70
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Binary to Hexadecimal:
The following steps are used in this method:
Step 1: Divide binary digits into groups of four (starting from the right)
Step 2: Convert each group of four digits to one hexadecimal digit.
Example:
(11010011)2 = (?)16
Step 1: Divide the binary digits into group of 4.
1101 0011
Step 2: Convert each group of 4 binary digits to 1 hexadecimal digit.
11012 = 1316 = D16
00112 = 316 = 316
Hence, (11010011)2 = (D3)16
71
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Octal To Decimal:
Converting (134)8 to decimal number system.
Replace 2 by 8 and rest of the process is same as above.
(1*82)+(3*81)+(4*80)
64+24+4
(92)10
Octal To Hexadecimal:
There are two ways to convert:
Convert octal to decimal and then decimal to hexadecimal.
Convert octal to binary and then binary to hexadecimal.
72
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Decimal to Binary:
When converting from decimal to binary the mathematical way is simplest.
Start with the decimal number you want to convert and start dividing that
number by two, keeping track of the remainder after each complete division
very time you divide by two, you will divide evenly (0) or get a remainder of
one (1). Following the pattern to the end, you will get a binary number. Write
the remainders in the order they were generated from right to left and the
result is equivalent binary value.
Example: Convert decimal 44 to binary
1. Divide
44 / 2 = 22 remainder = 0
22 / 2 = 11 remainder = 0
11 / 2 = 5 remainder = 1
5/2=2 remainder = 1
2/2=1 remainder = 0
1/2=0 remainder = 1
The bits, in the order they were generated is 001101. Reversing the order
of bits we get 101101 which is our required answer.
(44)10 = (101100)2
Decimal to Octal:
Start with the decimal number you want to convert and start dividing that
number by 8, keeping track of the remainder after each complete division.
Rest of process is same like decimal to binary.
73
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Decimal to Hexadecimal:
Start with the decimal number you want to convert and start dividing that
number by 16, keeping track of the remainder after each complete division.
Rest of process is same like decimal to binary conversion.
Example: Convert 47 to Hexadecimal
47 / 16 = 2 remainder = 15(F)
02 / 16 = 0 remainder = 2
Now reversing the order we have (47)10 = (2F)16
74
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Hexadecimal to Binary:
Opposite of binary to hexadecimal conversion.
Example:
(D3)16 = (?)2
D16 = 1316 = 11012
316 = 03 16 = 00112
Hence, (D3)16 = (11010011)2
Hexadecimal To Octal:
There are two ways to convert:
Convert hexadecimal to decimal and then decimal to octal.
Convert hexadecimal to binary and then binary to octal.
Hexadecimal to Decimal:
Converting (A2F) 16 to decimal number system.
Replace 2 by 16 and rest of the process is same as in binary to
decimal conversion.
As we know A = 10, F = 15.
= (A * 162) + (2 * 161) + (F * 160)
= (10 * 256) + (2 * 16) + (15 * 1)
= 2560 + 32 + 15
(2607)10
75
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
First step is to identify the base of target number system i.e. number
system to which we have to convert the decimal number system.
Second step is to divide the given decimal number system with that
base we got in the first step and note down the remainders in each
division.
Third step is to reverse the remainder we got such that first value is LSB
and last value is MSB.
76
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
77
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
1. Identify the base of the given number system, which you have to
convert.
2. Now assign a position to all the digits in the number starting from the
right. i.e. Position of “8” in 5548 will be 0 and 4 will be 1 and so on…
3. Now multiply each digit of a given number with the Base power Position.
Let us see some examples to understand this more clearly.
78
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
79
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
80
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Video Link:
https://www.youtube.com/playlist?list=PLeby327DX1ciASlYqtY9jW9jDOyA5nko4
81
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Computer Arithmetic
Compliment of Binary Number:
1's complement:
The 1's complement of a number is found by changing all 1's to 0's and all 0's
to 1's. This is called as taking complement or 1's complement. Example of 1's
Complement is as follows:
2's complement:
The 2's complement of binary number is obtained by adding 1 to the Least
Significant Bit (LSB) of 1's complement of the number.
2's complement = 1's complement + 1
82
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
For understanding, the other number system addition first considers the
addition of two decimal numbers as shown below.
When we added the one’s column of the binary digit (i.e., 7+4) we get the
number which is greater than the base of the decimal number (the base of the
number is 10 and the sum of the digit is 11). Now add the tens column of the
binary digit whose sum is equal to 9, and hence less than the base. So there
is no carry in the ten’s column of the binary digit.
For understanding, the other number system Subtraction first considers the
subtraction of two decimal numbers as shown below.
83
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Binary:
Whenever we would like to sum two binary numbers, only we will have a carry
if the product is bigger than 1 because, in binary numbers, 1 is the highest
number. The binary addition rules are given in the following truth table of
subtraction.
In the above tabular form, the initial three equations are the same for the
binary digit number. The addition of binary numbers step by step is explained
in detail. For binary addition take an example of 11011 & 10101.
84
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Examples
In subtraction, this is the primary technique. In this method, ensure that the
subtracting number must be from a larger number to smaller, or else this
technique won’t work appropriately.
If the minuend is smaller than the subtrahend, then this method is used by
just switch their positions and memorize that the effect will be a -ve number.
The binary subtraction rules are given in the following truth table of
subtraction.
1101101
– 11011
To get the same number of digits in subtrahend, add zero’s where it requires.
85
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
In the above binary subtraction example, the subtraction was achieved from
the right side to the left side with the help of tabular form which is shown in
the above. Here the step-by-step binary subtraction rules is explained below.
If the input 1 0 = 0 & borrow is. So 1 1 = 0 then borrow to the next step
is 0.
86
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Octal:
Following octal addition table will help you to handle octal addition.
To use this table, simply follow the directions used in this example: Add 6 8 and
58. Locate 6 in the A column then locate the 5 in the B column. The point in
'sum' area where these two columns intersect is the 'sum' of two numbers.
87
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Subtraction:
The subtraction of octal numbers follows the same rules as the subtraction of
numbers in any other number system. The only variation is in borrowed
number. In the decimal system, you borrow a group of 10 10. In the binary
system, you borrow a group of 210. In the octal system you borrow a group of
810.
88
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Hexadecimal:
Following are the characteristics of a hexadecimal number system.
Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
Letters represents numbers starting from 10. A = 10, B = 11, C = 12,
D = 13, E = 14, F = 15.
Also called base 16 number system.
To use this table, simply follow the directions used in this example − Add
A16 and 516. Locate A in the X column then locate the 5 in the Y column. The
point in 'sum' area where these two columns intersect is the sum of two
numbers.
A16 + 516 = F16.
89
Application of Information and Communication Technologies (CSC-100)
Mr. Muhammad Azeem email id: azeem@biit.edu.pk, WhatsApp# 0345-5106587
Subtraction:
The subtraction of hexadecimal numbers follow the same rules as the
subtraction of numbers in any other number system. The only variation is in
borrowed number. In the decimal system, you borrow a group of 10 10. In the
binary system, you borrow a group of 210. In the hexadecimal system you
borrow a group of 1610.
Video Link:
https://www.youtube.com/playlist?list=PLeby327DX1cgYDReXIxJ9RBKmDiitONUT
90