0% found this document useful (0 votes)
23 views285 pages

Dr. Wael M. Alenazy

This document outlines the basics of Information and Communication Technology (ICT) and its applications, focusing on computer systems, peripheral devices, and software concepts. It aims to provide students with theoretical and practical skills in text processing and spreadsheet programs, while also discussing the historical development and classification of computers. Additionally, it highlights the significance of ICT in cultural development as part of Saudi Vision 2030, emphasizing its role in various sectors and advancements in technology.

Uploaded by

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

Dr. Wael M. Alenazy

This document outlines the basics of Information and Communication Technology (ICT) and its applications, focusing on computer systems, peripheral devices, and software concepts. It aims to provide students with theoretical and practical skills in text processing and spreadsheet programs, while also discussing the historical development and classification of computers. Additionally, it highlights the significance of ICT in cultural development as part of Saudi Vision 2030, emphasizing its role in various sectors and advancements in technology.

Uploaded by

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

Dr. Wael M.

Alenazy

22
Aim
This chapter focuses on the basics concepts of ICT and its applications. It emphasis about the
peripheral devices and software concepts of the computer systems. The chapter delivers
theoretical and practical skills, introduces the best ICT practices in computer applications.
Furthermore, it provides practical exposure on text processing tools and spreadsheets program.

Learning outcomes
Upon successful completion of this chapter, the student will be able to understand:

The computing concepts and ICT development.

Computer applications and Introduction to open source software.

Text processing tools with hands-on experience.

Spreadsheet programs with hands-on experience.

Contents

Introduction to the computing and computer hardware

Computer Applications

Word Processing

Spreadsheets

23
Session Introduction to Computing

Session

Introduction to Computing

24
Goal

In this Session, you will learn


about the general and basic concepts of computers and computer peripheral devices.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Understand the general concepts Know about the classification


about computers. of computers.

1 2 3 4

Know working of computers Distinguish the applications of


and peripheral devices. computing.

Be prepared

To understand computer as a machine, we must know the working process and various
components within since it involves hardware and software. This session focuses on the basic
concepts as well as on hardware that shows the tangible working process of computer.

List of Acronyms
Computer Electronic device

Hardware Physical Equipment’s

ICT Information & Communication Technology

Applications Different types Software Programs

25
Session Introduction to Computing

Learn

Introduction
Throughout history, technology has been the driving force of change. In present time
of the 21st century, which is known as a digital era, Information & Communication
Technology (ICT) plays a vital role and been embraced and incorporated into our daily
lives. This is the time where Computers are the primary means of communication in
the world. Computers are ubiquitously available at office, homes etc. It becomes an
easy and useful tool for communication that can provide various kind of information.
The computing technologies have altered conceptions of time and distance. It has
created a wealth of information that is available at the stroke of a key. Moreover,
these computing technologies are being widely adopted and used in education
sectors, such as universities and schools.

“MY FIRST OBJECTIVE IS FOR OUR COUNTRY


IS TO BE A PIONEERING AND SUCCESSFUL
GLOBAL LEADER OF EXCELLENCE, ON ALL
WORK WITH YOU TO ACHIEVE THAT”

Custodian of the Two Holy Mosques


King Salman Bin Abdul-Aziz Al-Saud

ICT for Cultural Development – The Saudi Vision 2030.


Due to ICT revolution, technology enhances aspects of development worldwide.
ICT is having a direct impact on culture and it plays an increasingly pertinent role
in the protection and transmission of cultural heritage. The aim of Saudi Vision
2030 is to use ICT advancements of Human-computer interaction and automation
with artificial intelligence. We can find out these steps of advancements of using
ICT, in recent announcements.

26
To build modern and highly automated city named “NEOM” in accordance with Saudi Vision 2030.

As a part of the same vision, the country hopes to build a Hyperloop, a massive, high-speed
pneumatic transit system that would travel between several cities in Saudi Arabia and UAE.

They are also projecting to build the world’s largest entertainment city as a part of an economic
diversification strategy.

Kingdom plans a huge Red Sea Beach tourism project. Each of such steps of development will help
in ICT interventions in it.

What is the Computer?


Word ‘Computer’ basically derived from the word ‘compute’ which means to calculate.
Typically, Computer means a device, which accepts the data from the input devices. It
processes the input data to produce the required output and stores as required.

History of Computer
We are from the generation where we have grown from infancy from desktop to laptop within the last three decades. The
history of the computer goes back several decades, however, there are five definable generations of computers. Started
from basic calculators to the Babbage's engine initial computer machine can be classified in many generations. Each genera-
tion is defined by a significant technological development that changes fundamentally how computers operate – leading to
more compact, less expensive, but more powerful, efficient and robust machines.

First Generation (1940 to 1956) Third Generation (1964 to 1971) Fifth Generation (2010 Onwards)
Using Vacuum Tubes Using Integrated Circuits Using Artificial Intelligence

Second Generation (1956 to 1963) Fourth Generation (1971 to 2010)


Using Transistors Using Microprocessors

27
Session Introduction to Computing

Features of Computer
The features of computers such as the high speed of calculation, attentiveness, precision, consistency and a huge capacity
to store the data, which has made it an integrated part of our life.

High Processor Speed Huge Storage

Precision & Diligence Versatility & Reliability

How Computer Works


The computer is integration of hardware and software with different types of peripherals.
Computer works with the support of hardware devices and software’s programs. Detailed
study of the same is covered in approaching sessions and chapters. Hardware devices consist
of input and output devices referred as the physical components of a computer. Software
applications referred as the background process consists of programs coded with different
programming languages to interact graphically with the computer machine.

The process of a computer involves the processors with the data or information from
the input devices and provides the output.

CPU is the “brain” of the computer.

INPUT PROCESS OUTPUT

CPU SCREEN
DATA

28
Applications of Computers
In day to day life, it is very easy to understand the application of computers as everyone using computers of various sizes
like desktop, laptop, palmtop, PDAs, tablets etc. Computers have made our life so easy. With greater precision and accuracy
and less time taking computers can do a lot in a short time while that task can take a lot of time doing manually. Computers
have taken many sectors to a completely new level. The process of information with different applications will be discussed
in approaching chapters.

Here are some examples of applications of computers:


Software Development Networking and Communication
Visualisation and Multimedia concepts Information Security

Software Development:
The developments of various system software or applications designed with the different programming
languages for different types of applications such as operating systems like MAC, Windows as
background software’s and end-user productivity tools like office tools and different applications for
gaming, communication. Detailed with practical skills discussed in the Algorithm and Programming
chapter.

Visualization and Multimedia concepts:


There are various visualization tools such as Photoshop for editing pictures and data representations,
such as Presentation tools, Prezi an online tool and Illustration tool etc. Using advanced techniques of
computers, data can be presented in the combination of various forms such as audio, text, animations,
pictures, video and scribed content to make the presentation very interactive way. To develop animated
and interactive games multimedia is very useful. Moreover, by the use of augmented and virtual reality
became the reality using AR and VR glasses which uses 3D and 7D technologies. The details of Visualisation
concepts will be studied in the Data visualization chapters.

Networking and Communication


Computer became an easy and best tool of communication using the networks of network concepts
termed as the ‘Modern Internet’. The network can be defined as connection and interaction between two
or more computers using different sources such as Wireless or Wired. These days the advancements of
technology are touching the sky with different techniques such as the internet of things (IoT) and cloud
computing concepts. So, using this emerging technology the communication between machine to
machine became possible. Using machine learning, machines can communicate with humans and will be
able to take decision in the near future. The details of data communication and computer networking will
be studied in the Networking and Communication chapters.

Information Security
In this trending technology era, the information stored in digital devices such as computers and smart
devices, using the internet the data is stored online in the cloud. Many organizations provide cloud
storages such as One Drive, SkyDrive to name few. The question is the data which stored offline or online
is it safe and private? To ensure the data is safe, protected with confidentiality, authenticity various
information security measures should be taken, you will learn in detail about the information security
chapter with different techniques.

29
Session Introduction to Computing

Classification of Computers
Computer can be classified based on its size and performance. The computers broadly categorized into four types.

1 - Supercomputer. 2 - Mainframe Computers. 3 - Mini Computers. 4 - Micro Computers.


Supercomputer
A supercomputer is a computer that performs at or near the currently highest
operational rate for computers. They are very expensive and have been used for
scientific and engineering applications that must handle very large databases or do a
great amount of computation. They are employed for specialized applications that
require immense amounts of mathematical calculations. For example, weather
forecasting, animated graphics, fluid dynamic calculations, nuclear energy research,
and petroleum exploration etc.

- Shaheen II system has a total of 197,568 processor cores and 790TB of aggregate memory.
- Shaheen II was the seventh fastest supercomputer in the world.

Mainframe Computers
Mainframes are a type of computer that generally is known for their large size, amount of
storage, processing power and high level of reliability. They are primarily used by large
organizations for special applications requiring high volumes of data processing. In some
ways, mainframes are more powerful than supercomputers because they support more
simultaneous programs. However, supercomputers can execute a single program faster
than a mainframe.

Mainframe Computer (Ministry of Interior NIC) Riyadh

The main difference between a supercomputer and a mainframe is that a supercomputer channels all its power into
executing a few programs as fast as possible, whereas a mainframe uses its power to execute many programs
concurrently.

Mini Computers
A minicomputer is a type of computer that possesses most of the features and capabilities of a
large computer but is smaller in physical size. It fills the space between the mainframe and
microcomputer. They are mainly used as small or mid-range servers operating business and
scientific applications. However, the use of the term minicomputer has diminished and has
merged with servers which are capable of supporting from 4 to about 200 users simultaneously.

Desktop Computer: A personal or microcomputer sufficient to fit on a desk.

Laptop Computer: A portable computer with an integrated screen and keyboard.


Micro Computers It is generally smaller in size than a desktop computer and larger than a notebook
computer.

Palmtop Computer/Digital Diary/Notebook/PDAs: A hand-sized computer.


Palmtops have no keyboard but the screen serves both as an input and output
device.

30
Computer Peripherals Devices
As a machine computer requires hardware devices which supports the entire process of computing. Computer hardware
comprises of some electromechanical components. These required components are classified into three parts:

1The- end
Input/ Output Devices
user interacts with input and output devices. The computer recognises its input such
as a keyboard, mouse, scanner, from these devices, it accepts the data or information. Further
processed by the system unit and provides the required information using output devices such
as monitor screen, printer, speaker etc.

2 - System Unit
Typically, the system unit known as motherboard which consists integrated circuits. Basically,
motherboard is well known as the heart of the computer. Motherboard consists of the main
component called the Central Processing Unit (CPU). CPU controls the instructions from the
input and output devices and process it accordingly. CPU has registries for the temporary
storage of the instructions. CPU is named as the brain of the computer.

It consists of the Arithmetic Logic Unit (ALU) and Control Unit (CU).

- ALU executes all the arithmetic and logical operations such as basic additions,
subtractions and comparisons (+, -, *, /, <, >, =).

- CU is like an execution unit which controls the rest of the computer instructions
and coordinates with other devices in the queues.

3 - Memory Devices
Memory devices basically stores the data or information. After the process of the instructions
carried out from the input devices to the system unit. The data must be stored temporarily to
provide the instant output of the output devices. This memory named as main memory. Main
memory is also known as primary memory. The essential commands for the processing of data
and any transitional results are also stored in the same. The process of CPU will be working with
the main memory device. To store the processed data for long-term, memory devices have
another type of memory called secondary storage devices. The data stored permanently in this
storage device of the computer, such as Hard Disks, DVD, Flash drives etc.

31
Session Introduction to Computing

Apply

Fill in the blanks:


Software, Machine Learning, Computer, Hardware, Software , Minicomputer
Activity
1 1 - _____________ is a device which accepts the data from the input devices. It processes the input data to
produce the required output and stores as required.

2 - The computer is the integration of ____________ and ____________ with different types of peripherals.

3 - ____________applications referred as the background process consists of programs coded with different
programming languages to interact graphically with the computer machine.

4 - Using _______________ machines can communicate with humans and able to take a decision in the near
future.

5 - A _________________is a type of computer that possesses most of the features and capabilities of a large
computer but is smaller in physical size.

Choose the correct option for the following statement:


a) CPU
Activity
2
b) Motherboard
1 - Basically __________ is well known as the heart of the computer.
c) Screen
d) Mouse
a) CPU
b) Motherboard
2 - The ___________ has registries for the temporary storage of the instructions.
c) Keyboard
d) Printer

a) CPU
3 - ___________executes all the arithmetic and logical operations such as basic additions, b) CU
subtractions and comparisons (>=, <=). c) ALU
d) DVD

a) ALU
4 - ______________is like an execution unit which controls the rest of the computer b) DVD
instructions and coordinates with other devices in the queues. c) CPU
d) CU
a) Primary
5 - To store the processed data for long-term, memory devices have another type b.) Secondary
of memory called as _____________ storage devices. c) Input
d) Output

32
Discussion Board:
Activity
3 A - Explain how computer works?
B - Which type of computer is suitable to use while studying in university? And why?

Case study:
Activity 1 - Briefly discuss the trending ICT developments in Saudi Arabia?
4 2 - Organize students into the groups:
a - Discuss about the performance of RAM with other groups such as RAM 4GB or 8GB which is suitable for
different types of applications.
b - Discuss the features of different processors such as speed.

Closing

Dear student, You have learnt from this session:

Introduction to Computing

What is the Computer? Classification of Computer Peripherals


Introduction
Computers Devices

History of Computer Supercomputer Input/Output Devices


Features of Computer Mainframe Computers System Unit
How Computer Works Mini Computers Memory Devices
Applications of Computers Micro Computers

33
Session Computer Applications

Session

Computer Applications

34
Goal

In this Session, you will learn


the description of computer applications and the concepts of open source software.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Know the Significance of


Define the Software and Programs.
Open Source Software.

1 2 3

Understand the Classification


of Software.

Be prepared

The Computer is the combination of hardware and software. You have already learned about the basic concepts and
hardware of the computer. The working process of the computer hardware must be supported by the software. Thus, from
this session, you will know about the software and how it is essential for the computers to run efficiently and effectively.

List of Acronyms
Software Set of programs

Open Source Software It is a freeware software can be used without licenses

BIOS Basic Input and Output System

OS Operating System
GUI Graphical User Interface
CLI Command Line Interface

35
Session Computer Applications

Learn

Introduction
It is well-known that computer is the combination of hardware and software. In the
previous session, you have learned about the basic concepts and working process of
the computer. Computer is a machine which requires both hardware and software.
The necessity of software is to convert the data into user understandable information
so that the end user can interact easily with the computer.

Software
A software is a set of programs. A program is nothing but set of instructions with step by step procedure. Such instructions
are nothing but the commands given by humans to run any program. These programs allocate in the computer hardware
which used to convert the data into understandable information. The Basic Input and Output System (BIOS) is controlled by
the software.

Classification of oft are


Generally, the software can be classified into two types :

System Software (Background Software) Application Software (End User Software)

System Software
System software is designed to provide interface, which comprises operating systems. It
controls and manages the hardware devices and other end user applications. It manages
to perform all the utility functions, such as booting up the computer and it is programmed
to complete the loading, executing, retrieval of files from the computer and storing the
data in the secondary storage devices. It mainly works in the background and requires
little or no user interference.

Another example of System Software is a Device Driver software, which controls the
operations of a particular device, such as Printer Driver software.

Operating System
Operating System is the most common System Software. An Operating System is a
backbone of a computer system. It controls and manages the entire operations of a
computer. All computers, tablets and smartphones need an Operating System to
function properly.

36
Types of Operating Systems:
Typically, Operating Systems are classified as User based and Interface based which are named below;

User-based Operating Systems:


1 - Single-User Operating Systems:
This type of OS is designed to manage the computer so that one user can effectively do one thing at a time.

Example: MS-DOS (Single User Single Task)

You will also find a single user multitasking system on a personal computer. It is designed to deal with many applications
running at the same time by single user.

Example: WIN95, IOS and Android.

2 - Multi-User Operating Systems:


This type of OS allows multiple users to work at the same time on a computer. UNIX is an example of multi-user operating
systems.

Example: Linux, UNIX, macOS and Windows Server

User Interface Operating Systems:


1 - Command Line Interface:
This types of operating systems are based on the command requires written typing of commands to the computer, also
called as character-based operating systems.
Typically, the command line interface
Example MS-DOS (Disk Operating Systems)
features a black box with white text.

2 - Graphical User Interface:


Provides the easy user interface with pointing devices or touch screens to select the icons from the screen. GUI makes it
easier to work on a computer, even for a novice user.

Example Windows, MAC, Linux

Real-Time Systems:
Such systems are those used for direct control over electromechanical equipment such as industrial robots, factory
processes, power stations, airplanes, trains and cars. They monitor external events and react instantaneously that is why
they are known as real-time systems.

Example LynxOS

Batch Systems:
Such systems are used for running batch operations such as calculating and printing of customers’ bills, although they are
not as common nowadays as they once were. They often run a single task for hours or even days at a time.
Example banks process millions of cheques each month. These are processed together in a long run, usually overnight.

37
Session Computer Applications

Functions of Operating Systems:


There are many functions performed by the OS but the main goal is to provide the interface between the user and the
hardware, means provides the interface for working on the system by the user.

Storage Management:
Controlling all the storage operations like how the data or files will be stored in the computer and how the
files will be accessed by the users. All the operations which are responsible for storing and accessing the files
are determined by OS.

Process Management:
Executing all the processes given by the user or the process which are system’s own and prioritizing for the
user. Starting or stopping the execution of the process and dividing the large processes into the small
processes.

Resources Management:
Managing and facilitating the operations of the resources connected to the computer such as Memory
devices, printer, scanner etc.

Providing User Interface:


To work on the computer easily a novice user operating systems provides a graphical interface. Mostly you
interact with the Operating System that provides a way to control computers. The way you interact with
computers is termed as the User Interface.

Run Applications:
OS loads and runs applications (or apps), such as Microsoft Edge or MS Word. Most OS supports multitasking
which allows to run multiple apps simultaneously and switching between them.

Present Days Operating Systems


Apple Macintosh (MAC)
Apple Macintosh, commonly known as MAC OS, is actually the first OS to provide the GUI. It is designed
to run with Apple computers. It is not as widely used as the Windows OS; thus fewer applications have
been developed to run on MAC OS. It is a powerful, easy-to-use operating system and it is popular with
professional graphic designers, desktop publishers, and many domestic users.

Microsoft Windows
Microsoft’s Windows is by far the most popular operating system for PCs. Most of the desktop applications
are developed to run under windows as compared to any other OS. Windows comes in different versions
and was initially designed to run with Intel or Intel-compatible processors. Windows 10 is the latest release
from Microsoft, which has a modern user interface and supports tablet computing as well.

Linux
Another famous name in the operating systems category is Linux. The specialty of Linux is that it is an Open
Source OS, which means it is freely distributable. It can be customized and used with different types of
computers, tablets or smartphones. We will learn about it in details at the end of this unit.

38
Android
Android is one of the Linux based operating systems developed by Google and the Open Handset Alliance
(OHA), a coalition of more than 30 hardware, software and telecom companies. It is designed primarily
for mobile and touchscreen devices such as Smartphones and Tablets. Android’s User Interface is mainly
based on touch gestures that correspond to real-world actions, such as swiping, tapping and pinching
along with a virtual keyboard for text input.

Android is now the most popular mobile OS providing lots of exciting features. Its open nature has
encouraged a large community of developers to develop Android based applications (or apps). Thus,
Google Play Store has over a billions of android apps.

Overview of Different Operating Systems


Windows 10
Windows 10 is the latest version of Microsoft’s Windows operating system. It is a
major shift from the previous versions of Windows. It has been essentially
modernized to support the touch devices and pen input. Lots of enhancements
and useful new features have been added to it. The following parts will take you
through the Windows 10 Operating System.

New Features of Windows 10


Once you Sign in, you are in the all-new Windows 10 environment. You should first go through the new features Microsoft
has come up with. Some of the interesting and exciting new features of Windows 10 are as follows:
New Start Menu
Windows 10 has a new Start Menu. Microsoft has changed the start menu based on the experiences and feedback from the
users. It is now more comprehensive, efficient and modern. It has a tile-based start screen along with the classic features
of a start menu. The tiles on the start menu can display live contents making it an intuitive start. You can customize it right
on its place, such as resizing tiles or start menu itself and pin or unpin applications etc.

Keyboard shortcut to open start menu is “Ctrl+Esc” or simply click “Windows key” on keyboard.

Windows Ink
As the world is moving towards the mobile and touch based computing, Windows 10 has
introduced the Windows Ink feature. It allows you to use pen input in different apps or
annotate on snapshot of your current screen. If you have a touch screen device, the
Windows Ink icon appears in the Notification Area of the Taskbar by default. Otherwise,
to activate it, you need to Right-Click on the Taskbar and choose “Show Windows Ink
workspace button.” When you click on Windows Ink icon, a sidebar of the Windows Ink
workspace appears, which usually has the following options:

Sticky Notes: Allows you to create brief sticky notes by using pen tools such as adding a
schedule reminder. Windows uses character recognition (or handwriting recognition) to
read your sticky notes.
Sketchpad: Enables you to create freehand drawings with pen tools and save it as an
image file.
Screen Sketch: Allows you to draw or annotate on a snapshot of the current screen.
Get More Pen Apps: You can click on “Get more pen apps” link to open the windows store
and download desired pen apps.

39
Session Computer Applications

Virtual Desktops
Virtual Desktop is the very useful feature Microsoft has provided with
Windows 10. This gives you the experience of working with multiple screens;
although having just one. So while you work on multiple apps, you can better
organize them with multiple Virtual Desktops. You can group your personal
apps together in one desktop and work apps in another. You can Add New
Desktops as you want and switch between them easily. The Task View button
on the taskbar helps you manage it.
You can easily move running apps from one desktop to another with just the
Right Click of the mouse. Interestingly, if you close a Virtual Desktop, the apps
that were running on it won’t be closed, rather they will be shifted to previously
available desktop.

Cortana or Search
Cortana is another enhancement in Windows 10. Cortana is a voice-activated
personal digital assistant, which provides relevant suggestions and alerts. The
more you use Cortana, the more personalized your experience will be. For
example, you can use Cortana to find files/apps on computers, search the
internet, send emails, help out with navigation, setting reminders, and more.
Cortana is available only in certain countries or regions. It is accessible from the
search box at the taskbar right next to the start button. You can command
Cortana by either typing in the search box or by clicking on the mic button to
talk to her.
You can also say “Hey, Cortana” to activate via Mic through audio input.
When Cortana is not available, it is replaced with the Windows Search, helping you to search for apps, files, folders, and
settings on your computer.

Apple Macintosh (macOS)


MacOS is the graphical operating system powered by Apple MAC. Compared to
other OS, it is simple to work using high-end graphics. Designed specifically to
its hardware and software which drives the Mac devices. MacOS provides a
complete suite smart apps on its app store. Also offers cloud storage with the
iCloud to stores your personal information and to sync with all other devices. It
makes to work with your iPhone also. It designed to provide your data to
protect and secure with enabled security.
The latest version of Apple’s operating system is called macOS High Sierra. Upgraded with different software
enhancements, it also lays the foundation for future innovations in the worlds of VR (Virtual Reality) and AR
(Augmented Reality).

Apple File System.

Virtual reality for Mac.


Features of MacOS High Sierra
Siri
iCloud Drive and Optimized Storage

40
Comparison of Popular Micro-Computers’ Operating Systems

Operating Systems

Factors

Window CE-7
OS Family Linux Darwin Window NT-8

Open Handset Alliance(OHA), Apple Microsoft


Vendor Google

C, C++, Java C#, VB.NET, F#, C++,


Language C, C++, Objective C, Swift
JScript

CPU Architecture ARM, x86 ARM, ARM 64 ARM

Application Store Google Play App Store Windows Phone Store

Free and Open Source Proprietary except for Proprietary


License EULP open source

Introductions to Open Source Software


Open source software is nothing but a free to use software for your individual use. A
Developer of such software freely share their knowledge and make the source available
to the public. Generally, such software is distributed with a license which allows other
developers to modify it and/or add to it. Some examples of open source software are
Linux, Android, Ubuntu, Firefox etc.
Generally, the major difference between open source software and commercially
available programs is the huge amount of money which you pay as a license fee. Some
developers make free products for all users while other developers create commercially
available products. The other kind of developers come with a different idea and create a
free and paid version of their products.

The free program is a version with the limited features whereas the full version avails complete features. We commonly find
such programs in Google Play Stores. Generally, it is distributed under General Public Licenses. (GPL) which to give the
freedom to the users to change and prevent software being changed into proprietary software.

To compete with the marketing strategies of the rivals, many commercial programs offer a one-month free trial. Such
versions are also limited and eventually pushes the user to buy a full version. In contrast, many open source programs are
free, so you can take all the time you need to learn how they work.
It is important to understand that when you pay a license fee to buy commercial software, you don’t actually buy it but, in
fact, are granted a license.

41
Session Computer Applications

Following are some advantages of open source software:

Open source software is under constant development which reduces its vulnerabilities significantly. Some
software like WordPress gives you the option of automatic updates, which helps to keep the software current and
bug-free.

Open source software allows you to make choices for a commercial application rather than being locked into static
design and development. You can modify the software as necessary for your own purposes as well.

Open source software is potentially more secure than commercial programs because the code is constantly being
scrutinized by many programmers, not just a selected few.

A number of open source programs have a core application which can be enhanced by the use of plug-ins and
themes. Like WordPress and Joomla.

Open source software offers a tremendous amount of flexibility.

There are some disadvantages to the same system as well:

Using open source software certainly requires a good technical background. If you don’t know how to write code,
then you will be completely dependent on others and you have to spare some budget for minor modifications and
maintenance.

It is often found that the product is no longer supported by the company or the individual anymore unless the
development is picked up by other programmers. Though this is not the case in big names like Linux.

Open source is sometimes referred to as ‘open wallet’ in the sense that it may cost you more to have open source
code modified than it would cost you to buy a commercial program by itself.

Unless there is a structure in place to ensure the quality of the code it might wind up with many changes, bug fixes,
and patches, all of which can make the code more complex and/or degrade the quality, which in turn leads to more
maintenance.

The software might not be well-documented, which could make it difficult to learn.

Vulnerabilities in the software can be easily exploited by hackers.

Before you rush to download the latest open source software it is important to find out if this is the right approach
and appropriate option for you or not. Take some time to read comparative reviews of different programs and, if
you have the time, test both open source and commercial programs to see which one gives you the desired results.

Overview of Open Source Software: Linux


In 1983, Richard Stallman started the project on developing a free operating system called the GNU
(Linux) project. The concept was developed with the new idea of open source code to the users
without any copyrights. The operating system and most of its software is created by volunteers and
employees of companies, governments, and organizations from all over the world. It emphases on the
right to use the software code and motivates the users to develop with new enhanced features.
Generally, it is distributed under General Public Licenses. (GPL) which to give the freedom to the
users to change and prevent software being changed into proprietary software.

42
The developer has the freedom to contribute to the operating system and it is free to use. This co-operative development
model is meant for the benefits of everyone. That is why it is better known as Socially Responsible Software. Tech world
abbreviated it as FOSS - Free and Open Source Software.

Linux has many other benefits, including speed, security, and stability. It comes from the well-established UNIX family of OS
and so has been built to keep security in mind. Hence, viruses, worms, spyware, and adware are basically a non-issue on Linux.

Application Software
The Application software is a group of programs facilitates the end-user with different
features in the computer to perform certain tasks. Applications are designed specifically in
the view of the end-user’s requirements. Moreover, practicality of this software’s can be
learned in detailed in the coming sessions.

Examples MS Office, Microsoft Edge, Safari, etc.

Applications Software can be categorized into two types.


General Purpose Application Software:
Applications used commonly everywhere called as a general purpose application. Such as word processors, spreadsheets,
databases, desktop publishing packages, graphics packages etc.

Specific Purpose Application Software:


Applications which are designed for the specific task or to the specific organization to perform certain task according to
the requirement of the user is called as Specific Purpose Application Software. Such as Air Traffic Control System,
Learning Management System for Universities etc.
By now, you have got a basic understanding of an OS and basic information about the different OS available in the market.
In the following section, you will study and work with Windows 10 Operating System.

43
Session Computer Applications

Apply

Choose the correct option for the following statement.


A) Software
Activity
1
B) Program
1 - A ___________ is called as set of instructions with step by step procedure.
C) Information
D) Command
A) Two
B) Three
2 - Generally, the software can be classified into ____ types
C) Four
D) Five

A) Software
3 - _____________ controls and manages the hardware devices and other B) Program
end-user applications. C) Operating system
D) System software
A) Storage Management
4 - Functions of Operating System are _______ B) Process Management
C) Resources Management
D) All of the above
A) New Start Menu
5 - Some of the interesting and exciting new features of B) Windows Ink
Windows 10 are _______ C) Virtual desktop
D) All of the above

Fill in the blanks


Multi-user operating system, Specific-purpose application software, MacOS, Operating system, CLI,
Activity
Android, Windows 10
2 1 - An ______________ is a backbone of a computer system. It controls and manages the entire operations of
a computer.
2 - __________ type of OS allows multiple users to work at the same time on the single computer.
3 - ______________ This types of operating systems are based on the command requires written typing of
commands to the computer.
4 - ______________ is the first OS to provide the GUI.
5 - ________ is now the most popular mobile OS providing lots of exciting features.
6 - Applications which are designed for the specific task or to the specific organization to perform certain
task according to the requirement of the user is called as _________.
7 - ______________ is the latest version of Microsoft’s Windows operating system.

44
Discussion Board:
Activity
3
1 - What are the advantages and disadvantages of Open Source Software?

2 - Is computer being capable of doing any task without software?

3 - Compare the user interfaces GUI and CLI?

Activity Case Study:


4 1 - List out the types of software applications with their functions.

2 - Differentiate between IOS and ANDROID.

Closing

Dear student, You have learnt from this session:


Computer Applications

Classification Introductions to Open


Introduction
of Software Source Software

Software System Software Overview of Open Source


Application Software Software: LInux

45
Session Text Processing

Session

Text Processing

46
Goal

In this Session, you will learn


the use and significance of Text Processing in their daily life, such as an academic-corporate
environment. Here students will learn how to use the different formatting options in their
assignments using specific text Processing application.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

The hands-on session, students can know how to


What is text Introduction to the Mail
apply formatting styles using specific text
Processing tool? Merge with practical.
Processing application (MS Word 2016).

1 2 3 4 5

The referencing tools and EndNote as an


Different text Processing
add-on to the specific text Processing
tools.
application (MS Word 2016).

Be prepared

Imagine that you want to complete a project report using a typical word document! Then you have to think about the text
Processing tools. Decades ago typewriters were used to create the documents. Later on it was done with the help of
‘Notepad’ in computers for specific and limited tasks. With the recent advancements in computer technology, platforms like
MAC and Windows developed many enhanced text Processing tools with much more facilities. This session overviews and
delivers a hands-on experience with different tools which you can use to write your project reports with enhanced styles.

List of Acronyms
Text Processing Productive tool to create text document
Reference Used for referencing
EndNote Example of Referencing tool
Mail Merge Tool to send one document to multiple recipients

47
Session Text Processing

Learn

Introduction
In the previous session, you have learned the concepts of software and
types of software. This session emphasis and delivers the practical way
how to use the applications. An Application software is simply known as an
application. These applications are grouped into software suite. Microsoft
Office is a best example which is the collection of multiple programs such
as MS Word (Text Processing) a tool for creating documents and reports,
MS Excel (Spreadsheet), and MS Outlook. MS Office 2016 is widely used
productivity tools both by corporate and domestic users. Other examples
include Adobe Graphics suite etc.
Specifically, in this session, you will understand the overview of text Processing and other similar applications such as
Pages for Mac, MS Word for Windows.

Overview of Text Processing


The application used for text Processing is commonly known as a Word Processor. A word processor enables you to create
a document, store it electronically on a disk, display it on a screen, modify it by entering commands and characters from the
keyboard, and print it on a printer. These documents can be closed and opened again to continue working on them. The
major advantage of text Processing is that you can make changes without retyping the entire document.

A text processor provides variant common useful features, such as:

Font and Formatting Options.


Referencing and Citations.
Spelling checker.
Design and Layout.
Smart tools such as ‘Tell me box’, Lookup, etc.

Popular Text Processors


There is a variety of Text Processors available in the market from different companies to support variant operating
systems. Some of the popular examples are as follows:

Apple Pages
‘Pages’ is a text processor and a part of a productivity suite called iWork along with both
Keynote and Numbers, and is recognized for its user-friendly, intuitive interface. It is a
product of Apple which supports and runs in the Apple products such as Mac Book and
iPhone, with macOS and iOS operating systems. Pages have distinct features to create and
collaborate the documents. Its powerful word processor helps you create documents by
touch devices to illustrate with hands and allows you to collaborate your documents with any
devices and anywhere to work with your group in the real-time. It is compatible with mobile
devices such as iPhone.

48
Microsoft Word 2016
Microsoft Word is the text processor, which is one of the programs of MS Office 2016 suite. It is
developed by Microsoft Corporation. MS word supports the different operating systems such as
Windows and macOS. It can be installed and run in the microcomputers such as smartphones,
tablets. MS Word let you create attractive documents with a different type of templates such
as Letters, Flyers, Brochures, Manuals, CVs and more. It also allows you to collaborate your
work with anyone. Word 2016 has various features such as inserting online pictures which can
be helpful to create the documents.

Starting Word 2016


To Start with Microsoft Word 2016, primarily you have to install MS Office Package tools.

How to Download and Install


Since you are the students of King Saud University, you have the privilege to download and install it with your University ID
easily and free of cost, from the following website of e-Transactions & Communications department:
https://etc.ksu.edu.sa/en/swtools.

You can download any version of Microsoft Office to your laptop or Personal Computer then install as per instructions. To
activate Office 2016: the user must connect to the KSU network.

To activate Microsoft Office, follow the below steps

Download the file Activate.

Unzip the file Activate.

Right click on Activate.cmd file and


choose run as administrator.

User Interface of Word 2016


To create a document in Word 2016, you need to start the application.

To start MS Word 2016 in Windows 10,

1 - Click on Start Button to open Start menu.

2 - Click on Word 2016 from the All Apps list.

The Start Screen of Word 2016 appears with different options to open a
file. You can either choose an existing file or start with a new one.

The Microsoft Office 2016 user interface is quite uniform across its
components. Word 2016 offers a more refined user interface along with
many interesting tools. The user interface of Word 2016 consists of the
following:

49
Session Text Processing

User Interface of Word 2016


It provides the easy access to the commands which you use frequently. By default, it has the Save,
A Quick Access Toolbar Undo & Repeat commands. You can add or remove commands to Quick Access Toolbar by simply
clicking on the Customize arrow button on its right.
Almost all the commands in Word 2016 are compiled together in the form of a Ribbon, in order to help
B Ribbon
you work efficiently.

C Tabs At the top of the Ribbon is a set of tabs. Clicking a tab displays an associated set of commands.

D Groups Related commands of a Ribbon Tab are organized in Groups.

E Dialog Box Launcher Clicking the Dialog box launcher displays the associated dialog box or pane.

F Ribbon Display Options It allows you to Show or hide the Ribbon. Click on it to choose from the menu options Auto-hide
ribbon, Show Tabs, or Show Tabs and Commands.
The white area in the middle of the Word 2016 user interface is the Work Area or Workspace. This
G Work Area
represents the actual page where you type text, edit or format a document.

H The Insertion Point (Cursor) The Insertion Point or Cursor is the blinking vertical line in the Work Area. It indicates the current active
place in the document where you can insert text, images, apply editing or formatting commands.

I Rulers It helps you to view and adjust the position of the contents of the document.

It displays the information about the current document such as the total number of pages, the current
J The Status Bar
page number, total number of words in the document, current proofing language and proofing status.
Three view buttons Read Mode, Print Layout, and Web layout on the right side of the Status bar
K View Buttons
allows you to easily switch between the document views.

L Zoom Slider and Buttons These allow you to easily adjust the zoom level of the document contents as per your convenience.

50
Tool Tip
A tooltip is a graphical user interface (GUI) element used in conjunction with the
cursor or mouse pointer to display information about an item without needing
to click on it. ... A tooltip is also known as a hint, info tip or screen tip.

New Features of Word 2016


Word 2016 is equipped with several new features to help you work more efficiently. Out of these, the following are the two useful features.

Tell Me Box
In Word 2016 user interface screen, you might have noticed a text box on the
right of the ribbon tabs with a bulb sign that says “Tell me what you want to
do…” It allows you to do the things quickly and efficiently, keeping you free from
remembering and locating the commands in various tabs & ribbons. All you have
to do is to simply enter a word or a phrase in the Tell Me box about the
command you want. It provides you a list of the related commands to get help
with a particular command.

Smart Lookup
Another interesting feature of Word 2016 is ‘Smart Lookup’. It allows you to get the definitions, Wikipedia articles, and other top
related searches from the web about any word or phrase in your document. Thus, bringing the research directly into Word 2016.

- By default, a document in Word 2016 is saved with the file extension .docx.
- The Save As option is the way to save the document to a different file format.

The File Tab


The first tab in Word 2016 is the File Tab. When you click the File tab, the document window becomes invisible and a menu is displayed on the left with
the options such as Save, Close, and Print a document. It also displays the information about the current document on the right side. The view of File
tab is also called the Backstage View. Following are the options to manage the documents under File Tab.

Keyboard Shortcuts

- Create a new document. CTRL N Create a New Blank Document

- Saving a document. CTRL S Save a Document

- Using save as option. CTRL O Open a Document

- Closing a document. CTRL W Close a Document

- Opening an existing document. F12 Save As a Document

- Pinning a recent document.


CTRL P Print a Document
- Printing a document.

One Drive
When you save a document in OneDrive, your document is stored
in a central location that you can access from anywhere. Even if
you're away from your PC, you can work on your document
whenever you have a connection to the Web.

51
Session Text Processing

Overview of formatting Options:

The Home Tab


The next tab after the File tab in Word 2016 is the Home Tab. Home tab is generally used to format the documents. You can
use effects like Bold, Italic, Underline, Size of Text, Alignment of Text, Quick Styles and Formatting of the whole paragraph,
etc. You can also use it to find and replace words or phrases in the document.

The Home Tab commands are divided into five groups.

Clipboard This group contains the main editing commands such as Cut, Copy and Paste.

Font This group commands enable you to modify and enhance the appearance of your text.

Paragraph This group commands enable you to format complete paragraphs.

Styles This group commands enable you to apply pre-defined formatting styles.

Editing This group commands help you to find and replace text as well as select text or objects.

Overview of Illustrations and Design of Documents

The Insert Tab


The Insert Tab has a lot of useful features that enable you to insert different items in your document. You can insert a cover
page, table, pictures, shapes, chart, hyperlink, header footer, equation, symbols, etc. in your document. The commands in the
Insert Tab are divided into several groups.

You will learn about some of these groups in the following section.

Pages Links
Add-ins Text
Tables Comments
Media Symbols
Illustrations Header & Footer

52
The Design Tab
The next tab after the Insert tab is the Design tab. This tab consists of commands that enable you to quickly apply different
formatting styles to your document. You can even set colors and insert pictures in the background of a document.

It also helps you to add page background where you can apply a watermark, give a color to the page and insert page
borders as well.

The Page Layout Tab


The Layout tab allows you to customize the way your document’s page is set up. It helps you to change the document
orientation, page size, margins, indentation, line spacing, and paragraph settings. It is better to adjust the Page settings
before you start creating a document. It has the following options within the tab.

- Margins
- Orientation
- Size
- Columns
- Line Numbers
- Hyphenation

The Reference Tab or The Referencing tool


The References Tab commands help researchers & professionals in creating references in the document. In this section, you
will learn about the following groups of the References tab.

- Table of Content
- Footnotes
- Citations and Bibliography

53
Session Text Processing

Introduction to Endnote
Endnote is a commercial reference management software used to create and manage bibliographies and references when
writing research articles. The citations and bibliography group in MS Word is useful when your citations are limited. If you
need to add more citations, then it would be a hard task to add manually. MS Word supports third-party software’s as a
plug-in to be added and it can be used online from their databases. Various programs support MS Word as a referencing
tool such as EndNote, Mendeley, etc. With EndNote, citations can export straight from online databases, catalogs, and
different journals. The reference information from various websites taken automatically without entering it manually. To

EndNote Features
- Create your references with a personalized library.
- Insert references automatically matching your requirements in Word with selected styles.
- In the library, you can attach PDFs, sound files, videos, or any other format of files to your references.
- From the attached files, it can be read and marked.
- EndNote library can be categorized in groups by specific subject or any project or as per individual requirement.
- EndNote references and groups can be Synchronize and used in multiple devices, sharing, tracking the citations from
anywhere by logging into EndNote account at my.endnote.com.
- EndNote supports online database; citations can be added.

How to use EndNote


In a few steps, you can insert citations and references using Endnote.

1 - Create a library from a file and name the library.

54
2 - Import the PDFs files from local computer and
automatically groups can be created.

3 - Import references from online databases to


export references to your EndNote library. The
EndNote file with the extension “RIS.”

4 - Create a group with files and folders options to


organize your references.

5 - To access from anywhere or any devices to share


synchronize automatically and sign up to EndNote.

55
Session Text Processing

6 - EndNote online can be used from EndNote Desktop,


EndNote Online.

Insert references manually in EndNote:


EndNote provides the options to insert new references
automatically and manually. For adding references click on
New References then fill the required information as shown
in a figure such as Name of the author, Year, Publication,
Name of Journal, Pages etc.

Inserting references automatically in EndNote:


In EndNote, references can be added or copied from the
different online databases. EndNote has another option to
fetch the full-text pdf files online to the added references to
the libraries. More Online databases libraries can be added
from more option. From the given online references, it can be
copied to your local library.

Using EndNote from any browser to cite any research paper

56
Citing references in MS Word 2016
EndNote is the plugin in MS word provides you options to insert your citations from the library which is created
from the EndNote desktop application. You can start to cite the references from the library directly into your
documents. This EndNote tab provides different groups such as citations which allows you to insert citations,
insert note, insert figure and edit it using desktop application. Bibliography groups allow to update citations and
convert to different formats with different styles. Using tools group citations can be exported to word citations
as well.

MS word shows the EndNote plugin in the ribbon. References can be added using the options shown as Insert
Citations from there.

To insert the reference please follow the steps below:

1 Click on insert citations or insert selected citations from the library.

2 If required it can edit and manage citations.

3 References Styles can be changed as needed in the document such as IEEE, APA etc.

4 At the end click on update citations and bibliography, so that references shown by using the selected style.

Mail Merge
Mail Merge is a tool which is used in the organizations to send the official letter to multiple people without
changing the content. The process to link the main document to the data source. You can create Letters, E-mail
messages, Envelops, Labels, etc. It can be sent to a bulk mailing list with specific fields of the letter vary and are
personalized.

The process of mail merge comprises with three types of files.

• Main Document:
The document which consists body of the letter with the text and images such as organizations logo with identi-
cal to be merged with each version.

• The Data source or Mailing List:


The data source list with personal contact list with names, addresses etc. to be addressed with the main
document.

• Final Merged document:


The final document is a combination of the main document such as a letter with the mailing list. This merged
document finally results into a personalized letter for each contact, which is fetched from the mailing list.

57
Session Text Processing

It involves step by step process to send your documents or letters using mail merge.

Step 1: Select the type of document or Prepare your own document such as Letters, Envelops, etc.
From Mailing tab Click on Start Mail Merge Select the Letters or any other type of document.

Step 2: Start selecting the document by clicking on step-by-step mail merge wizard and select any of the following option :
a) use the current document
b) select from the template
c) an existing document.

58
Step 3: Choose the recipients from the mailing list from the data source
The Data source can be an existing source in excel sheet, outlook contact. If you have the mailing list, select from the existing
the list. If you don’t have it first create the contact list

Step 4: Write your personalized content


On the Mailings tab, in the Write & Insert Fields group, choose Address Block. You can also insert the fields using insert
merge field manually as required

Step 5: Preview and print the letters, find the recipient and check for any errors.

Step 6: Save your personalized letter by finish and merge.

59
Session Text Processing

Apply

Assignments
1 - Learn from the video and apply the skills in the teaching aid.
2 - Using teaching aid include references in the given article with the help of EndNote Application.

Fill in the blanks


Ribbon, Quick Access Toolbar, Work Area, Insertion Point, Smart Lookup, Status Bar
Activity 1 - ______________ provides the easy access to the commands which you use frequently.
1 2 - Almost all the commands in Word 2016 are compiled together in the form of a __________ in order to help
you work efficiently.
3 - The white area in the middle of the Word 2016 user interface is the _______
4 - The ________________ is the blinking vertical line in the Work Area.
5 - ________ displays the information about the current document such as the total number of pages, the
current page number, total number of words in the document, current proofing language and proofing
status.
6 - _____________ allows you to get the definitions, Wikipedia articles, and other top related searches from

Match the following


A - Create a New Blank Document CTRL + O
Activity
2
B - Save a Document F12 KEY
C - Open a Document CTRL + N
D - Close a Document CTRL + P
E - Save As a Document CTRL + S
F - Print a Document CTRL + W

Choose the correct option for the following statement.


A) Home
Activity
3
B) File
1 - ________ tab is generally used to format the documents
C) Insert
D) Design
A) Font
B) Styles
2 - ________ group contains the main editing commands such as Cut, Copy and Paste. C) Clipboard
D) Editing

60
A) Font
B) Styles
3 - ________ group commands enable you to apply pre-defined formatting styles C) Clipboard
D) Editing
A) File
4 - The _________Tab has a lot of useful features that enable you to insert different B) Home
items in your document. C) Insert
D) Design
A) File
5 - _____ tab consists of commands that enable you to quickly apply different B) Home
formatting styles to your document. C) Design
D) Insert
A) Page Layout
6 - ________ tab helps you to change the document orientation, page size, margins, B) References
indentation, line spacing, and paragraph settings. C) Mailing
D) Review
A) Page Layout
7 - The ____________ Tab commands help researchers & professionals in creating B) References
references in the document. C) Mailing
D) Review

A) Table of Contents
8 - The _______________ group in MS Word is useful when your citations are limited. B) Footnotes
C) Citation & Bibliography
D) Captions

Closing

Dear student, You have learnt from this session:

Text Processing

Starting Overview of Overview of Illustrations The Reference Tab or Mail


Introduction
Word 2016 formatting Options and Design of Documents The Referencing tool Merge

Overview of User Interface The Home Tab The Insert Tab Introduction to Endnote
Text Processing of Word 2016
The Design Tab EndNote Features
New Featuers
Popular text The Page Layout Tab How to use EndNote
of Word 2016
Processors
The File Tab
One Drive

61
Session Spreadsheets

Session

Spreadsheets

62
Goal

In this Session, you will learn


the uses and significance of Spreadsheets. To learn the use of the formula using MS
Excel. Students can apply the skills practically in their assignments.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Introduce with spreadsheets Learn how to insert formula


and its importance and user Learn how to insert
and auto calculate using simple
interface of MS Excel. charts.
approaches?

1 2 3 4 5 6

Learn how to insert cells and Know print setup options Know about the view tab and
sheets and its formatting. in the spreadsheets. security options for spreadsheets.

Be prepared

What if you have to analyze certain task related to the business? On a very basic level, you may think about a simple calculator!
But it will certainly restrict you to deal with the data. Therefore, you may need something separate and something powerful.
In this session, you will learn how to simplify your work with easy approaches for auto calculate and analyze the data in a
fraction of a second! Here you will be helped to learn practical skills using different approaches in MS Excel!

List of Acronyms
Formula An expression to perform calculations by using mathematics equation.
Function A predesigned formula which performs calculations automatically.
Charts A graphical representation of the data
Worksheet Work area in the excel workbook

63
Session Spreadsheets

Learn

Introduction
In the earlier session, you have learned about different Text Processing tools which help to
design the documents specifically using Word 2016. In this session, you will learn about the
various tools used for analyzing information. In this session, you will have an overview of
various spreadsheets programs such as Numbers from Apple iWork, Microsoft Excel from
Microsoft Office. A Spreadsheet is an interactive computer application for organization,
analysis and storage of data in tabular form. Practically you will apply the skills to the most
widely used tool i.e., Microsoft Excel.

Various Spreadsheet Programs Apple iWork Numbers.


A number of spreadsheet programs are out there with lots of capabilities and
functionalities. Given below are some of the popular spreadsheet programs.
Microsoft Excel.

Apple iWork – Numbers


The “Number” is a kind of spreadsheet applications product of Apple. One of the programs of
iWork software package is Pages. Numbers have similar features to Microsoft Excel. It is
available for Apple products which work through iOS such as iPhones and iPads. Numbers also
supports touch pen input.
It has various features listed below.

Supports Touch devices with Apple Pencil. It can be shared with any device.

It can collaborate with anyone. Friendly with Microsoft Excel.

Microsoft Excel
MS Excel is the product of Microsoft. It is the productive tool from Microsoft Office suite family,
with a member like MS Word. Microsoft Excel is the spreadsheet program comprises of
worksheets used to analyze data and an easy way for all types of computations. It can be used
with all types of microcomputer devices like Laptops, Desktop, Smartphones etc. It can be used
on various platforms like Android, iOS etc. It supports Windows and Mac OS.
Excel 2016 gives you a handy place to work with both textual and numerical data. You can
create formulas, summarize information, show information in charts and do a lot more. The
common scenarios to use Excel 2016 is for creating Schedules, Inventory, Reports, Budgeting,
Accounting, Planning and much more.

64
Features of Excel 2016
Quick Access tool
Functions
Forecasting
Date Grouping
Histograms and Pareto charts
Automatic Preview Options
Tell me Box
Sunburst charts
3D Data Map
Effective automatic calculations

Starting Excel 2016


To start the excel 2016 in Windows 10, follow the steps give n below:
1 - Click on the start button to open the start menu.

2 - Locate and click on the Excel 2016 from All Apps list.
The Start Screen of Excel 2016 appears with a list of recently used files
and available templates. You can either open an existing file, choose a
template, or start with a new blank workbook. You can also press the
ESC key to start with a new blank workbook.

The User interface of Excel 2016


Excel 2016 is a very interactive program which is very easy for the novice user. It is organized in many tabs consisting of
groups and functions. Same is mentioned below in the screenshot.

65
Session Spreadsheets

User Interface of Excel 2016


Ribbon includes a set of commands located below different tabs. Every tab is split into
A Ribbon groups, having logically related instructions.

This field, positioned to the right of the ribbon tabs, lets fast access to Excel commands
B Tell Me Box and functions you need to use.

C Ribbon Display Options You can show or hide a ribbon to maximize or minimize your workspace. You could select from
the options: Auto-hide the ribbon, show Tabs simplest or show Tabs and instructions.

D A Worksheet is a workspace, which is organized into rows and columns. Used to keep
Worksheet and manage information in the form of a table.

E The intersection of a row and a column in a worksheet is called a cell. An active cell is the
Cell and Active cell
one which is selected in the sheet with a green outline.

Columns are the vertical separations in the sheet. The Column has sequential letters at
F Columns
the top as A, B, C etc.

G Rows are the horizontal separations in the sheet. This rows named in the left side of the
Rows
worksheets as 1, 2, 3, etc.

Name box is just beside the formula bar which recognize the selected cells any other
H objects on the worksheets. Every cell has its own address recognizes by the column and
Name Box
the row number (Example A1, B16, Z28 – where alphabet represents the Column and
number represents the Rows).

I Formula Bar Formula bar represents to enter a formula in a cell which used to calculate.

At the bottom of the worksheet where the name of the sheets is displayed. Sheet tabs
J Sheet Tab
help manage different worksheets.

At the bottom of the worksheet, a bar represents called the status bar to show count,
K Status Bar
sum, and an average of selected cells of data. It contains view buttons, zoom slider, and a
zoom button.

Creating a New Workbook


To create a new workbook, click on File Tab and follow the steps given below:

1 Click on New option from backstage view. 2 Click on a Blank workbook to create a new workbook.

66
Choose a template if you want to use a template

Note

Excel workbook is saved with the extension “.xlsx”. Excel template is saved with the extension “.xltx”.

Entering the data


The text, numbers, dates, and formula you can enter in the worksheet into any cells. Select the type of data and the cell.
Use “Enter key and Tab Key” to navigate between the cells.

Tips to Navigation a Worksheet


used to move one cell left, right, up or down directions.

TAB Key used to move the active cell one column to the right in the worksheet.

used to move the active cell to cell A1 in the worksheet.


CTRL Home

CTRL End to move the active cell to the last cell in the worksheet that contains data

CTRL used to move the active cell to the last row in excel sheet that contains data.

CTRL used to move the active cell to the last column in excel sheet that contains data.

CTRL is used to select non-sequential cells.

shift is used to select cells sequentially.

67
Session Spreadsheets

Selecting the cells


In a worksheet, you may frequently need to select multiple cells to edit data, apply some formatting options, perform mathe-
matical operations, etc. Using Mouse and Name Box

To select sequential and non-sequential cells; Name Box or Mouse can be used. As shown in the above screenshot.

1 Click on a cell and drag the mouse over a group of cells you want to select.
A Excel highlights the selected cells in grey color.
B Use the Select All Button if you want to select all the cells in the worksheet.

2 Enter the cell addresses of the first and last cells separated by a colon (:) in the Name Box and press Enter
key e.g. A2:F6.

68
3 To select non- sequential cells using name box, Enter
the cell addresses separated by commas in the
Name Box and press Enter key e.g. C3, D5, E8, F4.

Managing Worksheets and Cell Formatting


Excel 2016 allows you to work with multiple worksheets in a workbook. You need to
manage multiple worksheets since each worksheet can contain a different set of data.
Example of Multiple sheets such as one worksheet may contain marks of IT subject
another sheet may contain marks of English subject and so on.

Change Tab Color


A tab color applied to worksheet tabs, help you to identify different worksheets in a workbook.
To apply a tab color, follow the steps given below:

1 Right click on the sheet tab and point to Tab Color option from a popup menu.

2 Choose a color from the displayed color palette

Inserting a Worksheet, Sheet Rows, Columns and Cells


In Excel 2016, a workbook contains only one worksheet by default. You can
insert more worksheets to your workbook as shown in below screenshot.

To insert an additional worksheet, follow the steps given below:

1 Right click on the sheet tab.

2 Click Insert option from the popup menu.

3 It will open Insert dialog box.

4 Click on the Worksheet option.

5 Click on OK button to insert worksheet.

6 You can also click on New Sheet button to insert a new worksheet.

69
Session Spreadsheets

Deleting a Worksheet, Sheet Rows, Columns and Cells


You can delete a worksheet that you no longer need in your workbook. A
worksheet can only be deleted if the workbook contains more than one
worksheet

To delete a worksheet, follow the steps given below:

1 Right click on the sheet tab you want to delete.

2 Click Delete option from the popup menu.

3 Excel prompts you with a box to confirm the


deletion if the excel sheet contains data.

4 Click on Delete button to delete the worksheet.

Renaming a Worksheet
Excel 2016 assigns a default name to each worksheet in a workbook like Sheet1, Sheet2. You can give specific names to
worksheets to help you identify their content

TIPS Press Shift+F11 to insert a new Worksheet.

Double click on the worksheet tab to rename it.

Drag options also can be used to Move or Copy


To rename a worksheet, follow the steps given below:

1 Right click on the sheet tab you want to rename.

2 Click Rename option from the popup menu and type a new name for the worksheet.

Move or Copy a Worksheet


Moving a worksheet within the same workbook or to a different workbook is helpful to keep worksheets in order. Copying
a worksheet helps you to use the same worksheet in the same or different workbook.

To Move or copy a worksheet, follow the steps given below:

1 Right click on the sheet tab you want to Move or Copy.

2 Select Move or Copy option from popup menu. It opens


Move or Copy dialog box.
You can move selected sheet to another workbook.
You can move selected sheet in the same workbook.

3 Select Create copy checkbox to copy the worksheet.

4 Click on OK button.

5 A worksheet is copied.
You can also Insert, Delete, Rename, Move or copy sheet and change Tab color from cells group of the Home Tab.

70
Other Sheet Options
Select All Sheets Selects all worksheets so that a formatting option can be applied at once, like Tab color.

Hide Makes a worksheet invisible from sheet tabs.

The Home Tab


The Home Tab provides a collection of commonly used commands for easy access.

Following are different groups in the home tab.


Clipboard This group contains main editing commands such as cut, copy and paste.

Font This group contains commands used to apply a range of formatting options.

Alignment This group contains commands used to position cell data and merge cells.

Number This group contains commands used to apply different number formats to data.

Styles
This group contains commands used to apply various styles.

Cells This group contains commands used to add, delete and format cells, rows, columns, and worksheets.

Editing This group contains commands used to sort, filter and calculate data.

The Insert Tab


The Insert Tab emphasis to learn about Charts, Pictures, 3D Maps, Links, etc. Here specifically you will learn to insert charts
and format Charts in Excel 2016 which helps you to visualize your worksheets in a very attractive way. About the visualiza-
tion topics, you will learn in detail in the coming chapters.

Chart and Elements of a Chart


A Chart is a graphical illustration of information, Charts are especially helpful to illustrate
the workbook data graphically and in an attractive manner, which makes it easy to
visualize comparisons.

Chart Buttons: To format the chart easily you have chart buttons which enables you to
change different options such as chart elements.

71
Session Spreadsheets

Elements of a Chart in details described in the picture.

A Chart Area It contains all the chart elements which cover the entire area of the chart.
B Plot Area The representation data in the graphically in this area called plot area.
C Chart Title Shows the title of the chart.

D Data Points From the plotted area actual points represented with data points.

E Primary VerticalAxis Title It’s a section to show the vertical title as Y-Axis Title

F Primary HorizontalAxis Title It shows as X-Axis Title as a horizontal title.


G Legend It shows data represents in a different color.
H Data Labels It shows the labels of the data on the chart.

Inserting Chart
Excel 2016 provides a number of chart types which are available
to create. It also recommends charts as suggestions to create to
the provided data. Based on the data in the rows and columns
you can create the chart by selecting the best chart type.
To insert a column chart, follow the steps given below

1 Select the columns or rows containing data that you


want to plot in the chart.

2 Click on the Insert Column or Bar Chart command in


the Charts group.

3 Select a suitable column chart from the displayed list


of charts.

4 Selected Chart type is inserted.

72
Design and Format Tab’s – Contextual Tabs

Move Chart The chart insert in any sheet can be moved to another worksheet by using this options.

Chart Styles It provides you the customized styles with different colors to apply on the charts.

Change Chart Type You can change charts with different types such as bar, area, line etc.

From File Tab Menu Print option provides… provides you with options to print only the
Print a Chart
chart from the worksheet.

The Page Layout Tab


The Page Layout tab lets you modify the way your worksheets are set up into different pages. It helps you to modify the
Theme, Page Size, Margins, Print Area, and more. Here you will learn about the printing options.

73
Session Spreadsheets

Print Area
The print area allows you to print on the selected range of cells to avoid printing in the entire sheet. It allows you to select
the titles to print from the worksheet. You can clear the printing area which is selected for print from the print area
command.

To set Print Area, follow the steps given below:

1 Select the area that you want to set as a print


area.

2 Click on the Print Area command in the Page Setup


group.

3 Select the Set Print Area option.

4 To Clear Print Area, Select the Clear Print Area


option of the Print Area command.

Print Titles
You can use Print Titles command to specify the rows to be printed at the top or columns to be printed at the left of each
page. For example, you can print the header row on all pages when you have a large worksheet to print, so the readers don’t
have to go back to the first printed page to see the headers.

To set Print Titles, follow the steps given below:

1 Click on the Print Titles command in the Page Setup group.

2 A Page Setup dialog box appears.

3 Click in the Rows to repeat at the top box under Sheet tab
of the dialog box.

4 Select the Row that you want to print on every page.

5 Similarly, click in the Column to repeat at the left box and


select the column that you want to print on every page.

6 Click on the OK button.

74
The Formulas Tab
The Formulas Tab enables you to calculate data using a variety of functions available in Excel 2016 to make easy calculations.
Excel 2016 provides several built-in functions to perform mathematical, statistical and logical operations. Function Library
group in the formulas tab contains a number of functions grouped in different categories such as Financial, Logical, Text,
Date & Time and Math & Trig.

Logical Functions are used to test for a condition to evaluate it as true or false. It includes
Logical functions such as AND, FALSE, IF, NOT, OR, TRUE, etc.

Text functions are used to manipulate text strings. It includes functions such as CHAR,
Text
LEN, LOWER, PROPER, TEXT, UPPER, etc.

These functions perform arithmetic operations, conditional sum, exponents & logarithms,
Math and Trig and the trigonometric calculations.
It includes the functions such as SUM, SUMIF, LOG, COS, SIN, etc.

It includes Statistical and Engineering functions such as AVERAGE, COUNT, MAX, MIN,
More Functions
CONVERT, DELTA, etc.

Functions
A Function in Excel 2016 is a pre-set or inbuilt formula that performs calculations automatically. Each
function has a specific syntax, i.e. a set of rules associated with it.

Creating a Formula
A formula is an expression that executes all the calculations in the cell’s data. A formula with arithmetic operators like +, -,
*, /, %, to perform addition, subtraction, multiplication, division, and percentage respectively. In Excel 2016, a formula begins
with an equal to (=) sign. You can manually enter the function and formulas. The general syntax of a function is as follows:

=Function Name (Cell Range)


Example: = SUM (number1, [number2],

75
Session Spreadsheets

The Basic Functions and their Syntax


Sum The SUM function calculates the sum of values contained in a range of cells.
Syntax: =SUM (number1, [number2],....)

The AVERAGE function is used to calculate the average of the values contained in a range of cells.
Average
Syntax: =AVERAGE (number1, [number2], ...)

The COUNT function counts the number of cells in a range that contain numbers only.
Count Syntax: =COUNT (Value1, [Value2], ……)

Max and Min The MAX and MIN function is used to calculate the maximum and minimum value in the selected
range of cells.
Syntax: =MAX (number1, [number2], ...)

The LOWER and UPPER function is used to convert the text to lowercase and uppercase i.e.
Lower and Upper small letters and capital letters.
Syntax: =LOWER(Text): =UPPER(Text)

The LEN function is used to calculate the number of characters in a text string including spaces.
Len
Syntax: =LEN(Text)

The PROPER function capitalizes the first letter of each word of a text string and changes all other
Proper letters to lowercase.
Syntax: =PROPER(Text)

Error Checking
The Formulas and Functions can sometimes result in error values. The Error Checking command helps you to check for
common errors that occur when using formulas or functions. This command shows you the cells containing the error, the
type of error and other error information. Then you have the access to a number of options to check and correct these
errors.
The table shows some type of errors with their description with examples.

Error/ Solution Description Example

When a number is divided either by zero (0) or by a cell that contains


#DIV/0! zero (0) value or no value. =A5/0

Solution Change the cell reference or value of denominator. =A5/3


#NULL! When you incorrectly specify cell ranges. The areas C2:C3 and E4:E6 do =SUM(C2:C3E4:E6)
not intersect.

Solution Make sure cell ranges are correctly separated. Adding a comma between
the C and E ranges will correct it. =SUM(C2:C3,E4:E6)

#NUM! When a formula or function contains invalid numeric values. =SQRT(-4)

Solution Check and update the formula with valid numbers. =SQRT (4)
#NAME? The Formula is unrecognized i.e. a syntax error. =SSUM(E10:E15)
Solution Use the Function Wizard or type the correct formula. =SUM(E10:E15)

#REF! Cell reference is not valid. Cells may have been deleted like C2 that was =SUM(B2,#REF!,D2)
referred to by formula.

76
Adjust the formula so that it uses a reference that exists. Either use Undo
Solution (Ctrl+Z) to undo the deletion, rebuild the formula, or use a continuous range =SUM(B2,C2,D2)
reference like: = SUM(B2:D2)

Formula or operator is wrong. Also, one or more cells that are included in an
#VALUE! arithmetic formula contain text. =D10, D34

Solution Type the correct operand and make sure the appropriate data is referenced. =D10+ D34

The View Tab


The view consists of several groups such as workbook views, show, zoom, and Windows. You will learn about the freeze
panes from windows group.

Freeze Panes
The Freeze panes used to lock the selected rows and columns in
place to keep them locked while the rest of the sheets moving.
You can use this options to freeze just top row, first column or
any selected multiple rows and columns.

To Freeze both row(s) & column(s), follow the steps given below:
1) Select the cell to freeze all the rows above it and all the columns
to the left of it.
2) Click on the Freeze Panes command.
3) Choose the Freeze Panes option.
4) To freeze the top row, use the Freeze Top Row option from the
Freeze Panes command.
5) To freeze the first column, use the Freeze First Column option
from the Freeze Panes command.

Workbook Security
Excel 2016 enables you to secure your work and prevent unauthorized access to your workbook. Workbooks may contain
sensitive information like Credit Card Numbers, National ID Numbers, Employee Information etc. The following section will
guide you through Excel's password protection feature.

Encrypt with Password


A workbook can be protected with the password
used as encryption to open the workbook. It is
recommended to remember the password by
listing out. Noted forgotten passwords can’t be
recovered.

77
Session Spreadsheets

To create a Workbook Password, click on the File Tab and follow the steps given below:
1) In the Backstage view, from the Info option, click on the Protect Workbook command.
2) Click on the Encrypt with Password option from the displayed list.
3) Type the password in the Encrypt Document dialog box and click on the OK button.
4) Re-enter the password in the Confirm Password dialog box.
5) Click on the OK button and save the workbook to apply the password. When you open
the workbook, Excel 2016 prompts you to enter the password for the workbook.

Removing a Password
You can also remove the password from the protected workbook. To Remove the Password, click on the File Tab and follow
the steps given below:

1) In the Backstage view, from the Info option click on the Protect Workbook Command.
2) Click on the Encrypt with Password option from the displayed list.
3) In the Encrypt Document dialog box, select the password and press the Delete key.
4) Click on the OK button and save the workbook.

78
Apply

Self-Learn activity
See the video by scanning the QR Code.
Apply the skills using teaching aid from LMS and submit it.

Fill in the blanks


Activity Formula bar, Ribbon, Microsoft Excel, Password, Freeze Panes
1 1 - _______________________ is the spreadsheet program comprises of worksheets used to analyze data, an
easy way for all types of computations.

2 - You can show or hide a ____________ to maximize or minimize your workspace.

3 - ______________ represents to enter a formula in a cell which used to calculate.

4 - The _________________ used to lock the selected rows and columns in place to keep them locked while the
rest of the sheets moving.

5 - You can protect your Excel workbook with a _____________ to prevent the unauthorized users from

II.CHOOSE THE CORRECT OPTION FOR THE FOLLOWING STATEMENT.


A) Logical
Activity
2
B) Text
1 - ____________ Functions are used to test for a condition to evaluate it as true or false.
C) Math & Trig
D) All of the above.
A) Logical
2 - ________ functions are used to manipulate text strings. It includes functions such B) Math & Trig
as CHAR, LEN, LOWER, PROPER, TEXT, UPPER, etc. C) Text
D) All of the above

79
Session Spreadsheets

A) Logical
3 - These functions perform arithmetic operations, conditional sum, exponents & B) Math & Trig
logarithms, and the trigonometric calculations. C) Text
D) All of the above

A) MAX
4 - The ______________ function capitalizes the first letter of each word of a text B) LOWER
string and changes all other letters to lowercase. C) COUNT
D) PROPER
A) LEN
5 - The ____________ function is used to calculate the number of characters in a text B) LOWER
string including spaces. C) COUNT
D) COUNTA

80
Closing

Dear student, You have learnt from this session:

Spreadsheets

The Home Overview of The Page The Formula The View


Introduction The Insert Tab
Tab formatting Options Layout Tab Tab Tab

Various Spreadsheet The Home Tab Chart and Elements Print Area Freeze
of a chart Functions Panes
Programs Print Titles
Inserting chart Workbook
Starting Excel 2016 Error
Checking Security
Design and Format
Tab's-Contextual Tabs

81
Dr. Slah A. Alsaleh

82
Aim
This chapter emphasizes generic programming concepts and related problem-solving
strategies. The theoretical knowledge and practical skills that students learn in this chapter
will be applicable to a wide variety of programming domains and languages, which will advance
students’ skills regardless of their major field of study.

Learning outcomes
Upon successful completion of this chapter, the student will be able to:

Design algorithmic solutions to a range of computational problems from various areas.

Demonstrate theoretical knowledge of programming principles.

Read, understand, and modify program code.

Use an integrated development environment to build simple software systems.

Work independently as well as with a group to deliver effective and well-documented


software solutions to small problems.

Contents

Introduction to Algorithms

Conditional Logic

Introduction to Programming

Loops and Functions

Building your First Program

File Input/Output (File I/O)

Variables, Statements, and Operators

83
Session Introduction to Algorithms

Session

Introduction to Algorithms

84
Goal

In this session, you will learn


about the significance and development of Algorithms and Flowcharts.

Learning objectives

Dear Student
By the end of this session, you should be able to:

Describe the concept and Design algorithmic solutions List the advantages and usage
importance of computer to a range of computational of flowcharts in developing
algorithms. problems from various areas. computer programs.

1 2 3 4 5 6

List the advantages of Describe how computers use Transform algorithms into
using algorithms in algorithms to perform the flowcharts to understand
computer programming. tasks we expect them to do. the flow of information.

Be prepared

You know that Computer is a dumb machine. It works only based on your instructions
and cannot do anything on its own. Although it is an accurate machine, if you give it a
wrong instruction, it will generate a wrong result. So you need to give it correct and
step wise instructions to make it work properly and accurately.

However, with advancement of software engineering and business intelligence


application we are able to solve complicated problems using computers.

There are big companies worth billions of dollars, like Uber for example, are based on
computer application that can be accessed via website and mobile application.

85
Session Introduction to Algorithms

Learn

ALGORITHMS Modern computers can carry out complex tasks. Each task consists of well-defined
procedures known as algorithms. An algorithm is a well-defined procedure that allows a
computer to solve a problem.

Another way to describe an algorithm is a sequence of unambiguous instructions. The use


of the term 'unambiguous' indicates that there is no room for subjective interpretation.
Every time you ask your computer to carry out the same algorithm, it will do it in exactly
the same manner with exact same result.

You need to write programs in a computer language to solve a problem by a computer.


Programs are a set of instructions. Algorithms are written in a step by step procedure
before writing the actual computer program. So Algorithms are an important part of
program development. In fact, it is difficult to think of a task performed by your computer
that does not use algorithms.

Advantages of Algorithms

Algorithms are very useful in solving problems. You can


use them to understand the nature of problems in your
daily life. Algorithms helps to design the best solutions
to your problems

Following are some of the advantages of using Algorithms.

They are easy They are easy They are easy They are not dependent on any
to understand. to implement. to modify. particular programming language.

86
Rules for writing Algorithms
There are some guidelines for writing an algorithm. These guidelines or rules make algorithms self-explanatory. You should
follow the given rules while writing an algorithm.

Give statement numbers Always begin Write the Write Stop at the Write each statement
as Step 1, Step 2, etc. with Start. statements clearly. end of the algorithm. in a separate line.

How Algorithms Work?


Let's take a closer look at an example. A very simple example of an algorithm would be to find
the largest number in an unsorted list of numbers. If you were given a list of five different
numbers, you could easily figure it out in no time. However, if the list consists of five million
different numbers, you definitely need a computer to do this, and a computer needs an
algorithm.

Below is what the algorithm could look like. Let's say the input consists of a list of numbers, and
this list is called L. The number L1 would be the first number in the list, L2 the second number,
etc. The list is not sorted. So, the input to the algorithm is a list of numbers, and the output
should be the largest number in the list.

The algorithm would look something like this:

STEP
Start
1
STEP Let Largest = L1
2 This means you start by assuming that the first number is the largest number.

STEP
For each item in the list:
3 This means you will go through the list of numbers one by one.

STEP If the item Largest:


4 If you find a new largest number, move to step five. If not, go back to step three, which means you move on to
the next number in the list.
STEP Then Largest = the item
5 This replaces the old largest number with the new largest number you just found. Once this is completed,
return to step three until there are no more numbers left in the list.
STEP
6 Print Largest
This produces the desired result.
STEP
7 Stop

Notice
that the algorithm is described as a series of logical steps in an English-like language that is
easily understood. For a computer to actually use these instructions, they need to be
written in a language that a computer can understand, known as a programming language.

Go through the following example to have a better understanding of algorithms.

87
Session Introduction to Algorithms

Algorithm to calculate the area of a rectangle


Below is an example of an algorithm written to calculate the area of a rectangle.
STEP
Start
1
STEP Input Length, Width
2
STEP
Area = Length * Width
3
STEP Print Area
4
STEP
5 Stop

FLOWCHARTS
You know how to write the steps of an algorithm to solve a problem. If you put all these
step-wise instructions into some boxes, you will get a Flowchart. A Flowchart is a graphical
representation of an algorithm. It is a step-by-step process to solve a problem in graphical
form. The purpose of making a flowchart is to assist in writing a program. The flowchart lists
all the steps to be considered in a program. The steps must be in the correct logical order.

Advantages of Flowcharts
Since the flowchart is the graphical representation of an algorithm, it gives a better understanding of the solution
to a problem than words alone. Following are the benefits of using flowcharts in program development.

1 A flowchart is independent of the programming language.


2 It establishes better communication with the person who is new to computer terminology.
It is always better to find errors from flowcharts rather than from the programs. Fixing errors at
3
the flowchart stage is much easier and saves your time and effort.
4 It is easier to understand the object and logic of the program with the help of the flowcharts.

Standard Symbols of Flowcharts


To design a flowchart, you need several boxes of different shapes. Each box has its own purpose. To connect these boxes,
we use lines known as the flow lines.

88
Let us learn about some symbols used to draw a flowchart.
Start / Stop Box
For example,
The Start / Stop box is oval in shape and is also called the Terminal box.
The box used in the beginning of the flowchart is called the Start box,
Start Stop
and the box used at the end of the flowchart is called the Stop box.

Start and Stop are written inside the boxes.

Input / Output Box


A parallelogram is used to represent the Input or Read step, where the data is brought in,
and the Output or Print step, where the results of a problem are shown.

For example, INPUT A,B PRINT AREA

Process Box For example,


A rectangle is used to represent the Process box. The steps of processing are written inside
the box. Whenever you do any calculation or assignment operation, this symbol is used SUM = A+B

Decision Box
A diamond-shaped symbol is used to represent the Decision box. It represents a decision as
well as a comparison operation.
Yes No
A>B
For example, this chart represents
IF A>B THEN PRINT A
ELSE PRINT B PRINT A PRINT B

Flow Lines

Lines with arrowheads are used to connect various symbols.


These arrows connect the boxes in a flowchart to represent the direction of the flow of data and information.

Start

For example

INPUT A,B

89
Session Introduction to Algorithms

Connectors
At times, the flow of the main process in the flowchart has to be redirected to a previous point in order to repeat a process.
This requires connecting two different points of the flowchart, which is done by the use of connectors. A circle is used to
connect two different parts of a flowchart which are at different places.

START
A

INPUT A,B

For example PRINT SUM A

SUM = A+B

STOP

GUIDELINES FOR DRAWING FLOWCHARTS


Following are some of the guidelines to draw standard flowcharts.

(a) In drawing a proper flowchart, all necessary requirements should be listed out in logical order.

(b) The flowchart should be clear, neat, and easy to follow. There should not be any room for ambiguity in understanding the
flowchart.

(c) The usual direction of the flow of a procedure or system is from left to right or top to bottom.

(d) Only one flow line should come out from a process symbol.

or

(e) Only one flow line should enter a decision symbol, but two or three flow lines, one for
each possible answer, may leave the decision symbol.

yes <0 <0

No =0

90
(f) Only one flow line is used in conjunction with a terminal symbol.

(g) Write briefly within standard symbols. As necessary, you can use the annotation
symbol to describe data or computational steps more clearly.

This is to calculate the parameter

(h) If the flowchart becomes complex, it is better to use connector symbols to reduce the number of flow lines. Avoid the
intersection of flow lines if you want to make it a more effective method of communication.

(i) Ensure that the flowchart has a START and a STOP.

(j) It is useful to test the validity of the flowchart by passing through it with simple test data.

Let's look at a few examples.

Draw a flowchart to find the largest of three numbers A, B, and C.

91
Session Introduction to Algorithms

Draw a flowchart to find the sum of the first 50 natural numbers.

92
Apply

Fill in the blanks.


Flowchart, Algorithms, Diamond, Programming Language

Activity (a) ____________________ are written in a step-by-step procedure before writing the actual computer program.
1 (b) A ________________ is a graphical representation of an algorithm. It is a step-by-step process to solve a problem
in graphical or pictorial form.
(c) A flowchart is independent of the ___________________.
(d) A ____________ shaped symbol is used to represent the decision box.

Match the following.


Activity (a) A flowchart is used for input and output steps.

2
(b) An oval is used to connect two different parts of a flowchart.
(c) A parallelogram is a graphical representation of steps for solution of a problem.
(d) A diamond is used to represent the start step.
(c) A circle is used for a decision-making step.

Arrange the steps of the algorithm to multiply two numbers A and B.


Activity (a) Stop Step 1. .....................................

3
(b) Print Result Step 2. .....................................
(c) Start Step 3. .....................................
(d) Read A, B Step 4. .....................................
(e) Result = A + B Step 5. .....................................

Practice the following tasks in your notebook.


1. Write an algorithm to calculate the average of three numbers.
Activity
2. Write an algorithm to find the smallest one among five numbers.
4 3. Prepare a chart of the algorithms to subtract, multiply, and divide two numbers.
4. Draw a flowchart to find the sum of N given numbers.
5. Draw a flowchart to find the sum of the grades of Science and Mathematics for a class of 20 students.

Closing

Dear student, you have just learned the logic of solving problems using algorithms. Although the examples we covered in
this session are basic, the concept is the same even for much more complicated scenarios. If you would like to build your own
computer application, then you have to practice solving problems using algorithms, then use your flowchart as a guide in the
programming phase and write your code with the programming language that you like.

93
Session Introduction to Programming

Session

Introduction to Programming

94
Goal

In this session, you will learn


The basic concepts of computer programming using the Python programming language. You
will be also familiar with the two main windows that Python uses: the Shell window and the
Code window.

Learning objectives

Dear Student
By the end of this session, you should be able to:

Describe what computer programs Differentiate between compilers List the features that Shell window
and programming are. and interpreters. and the Code window provide.

1 2 3 4 5 6

List the different types of List Python’s windows Write your first programs
programming languages. and their purposes. in Python.

Be prepared

Every time we use smart devices, there are programs running in the
background. Moving a mouse pointer from one part of your computer screen to
another may seem like a simple task, but in reality, a computer program just ran.
Another simple task like typing letters into Google Docs leads to computer
programs being executed in the background. It is all programming everywhere.

95
Session Introduction to Programming

Learn

PROGRAMMING
Programming is the process of creating a set of instructions
that tell a computer how to perform a task. It is often referred
to as coding. Programming can be done using a variety of
programming languages, such as SQL, Java, Python, and C++.

What is a program?

A computer program is a sequence of instructions executed by a computer. Every task of a


computer is done using a computer program. We write a program using a programming
language. Computer programs are also referred to as code.

Below are some examples of computer programs.

- Operating systems like Windows and Android.

- Web browsers like Mozilla Firefox and Apple Safari.

- Office suites like Microsoft Office.

- Video games.

A computer program is stored as a file on the computer's hard drive. When a user runs the program, the
file is read by the computer, and the processor reads the data in the file as a list of instructions. Then
the computer does what the program tells it to do.

What is a Programming Language?


Machines have their own natural languages, just as humans do. Computers do not
understand the human languages. The natural language of computers is the binary
code: 1 and 0.

These represent two states: on (1) and off (0). That is the natural language of
electronic devices. It would be complicated for us as humans to communicate with
the computers in binary.

To communicate with machines that understand binary, programming languages


were invented. We are now able to communicate with machines using programming
languages that are close to our own natural languages, such as Arabic or English, but
they are more structured and have their own rules and notations.

96
Types of Programming Languages
Computer programming languages are basically classified into two types

High-Level Programming Languages Low-level programming languages

High-level programming languages provide strong Low-level programming languages provide little or no
abstraction and have a simple and easy syntax. abstraction and have a very complex syntax. These
Examples include Python, Java, C, C++, Ruby, Perl, languages mainly consist of numeric terms, while
Basic, JavaScript, and many more. high-level programming languages provide syntax
consisting of a complete alphanumeric syntax.

High Level
There are two main low-level programming languages:
Programming FORTRAN C Pascal
assembly language machine language
High-Level Language

Assembly Language
Low
Level Machine Language
Programming

Hardware

Translators
You know that computers understand only binary, the language of 0’s and 1’s. On the other hand, the high-level program-
ming languages are closer to our natural languages. Hence, to communicate with computers by using these programming
languages, we need special translators.
Translators have the responsibility of converting your source
code to binary machine language. We may refer to the binaries
as object code, the program, or a common word today: app.

Translators can be classified into:

Interpreters Compilers
Some languages are interpreted. The translator processes the Compilers function differently. They convert the entire source code
source code line by line and runs every line in the program or into the object code via a compilation process. The object code is
app. This means that interpreted source code starts running then executed. If there were errors in the source code, they are
until it encounters an error. Then the interpreter stops to detected during the compilation stage and flagged. This interrupts
report such errors. the compilation process, and no object code is generated.
Python is a good example of an interpreted programming language. Visual Basic and C++ are good examples of compiled
programming languages.

Interpreters translate line by line and execute each line before going on to the next line.
To summarize
Compilers translate the entire program to a file (binary) and execute the whole file.

97
Session Introduction to Programming

Getting Started with Python

There are several powerful languages that are easy to set up and learn, and Python is one of
them. Python is an interpreted, interactive, object-oriented programming language.
Object-oriented programming language is a programming language model organized
around objects rather than "actions" and data rather than logic. Pythons’ flexibility allows it
to do many things, both big and small. Python can be used to write simple programs, but it
also possesses the full power required to create complex, large-scale enterprise solutions.

ome e amples in which Python is used are

Desktop graphical application Mathematical and scientific Web and internet


development, including games. analysis of data. development.

Python s applications in the world of computer programming are obvious.


For example, Python is used in some of the largest internet sites on earth — like Reddit, Dropbox, and YouTube.
The popular Python web framework Django powers both Instagram and Pinterest. However, that
doesn’t mean it is complicated or hard to learn.

Source Code
Source code is basically a file, just like a Microsoft Word (.docx) file, but slightly
different. It is a raw text file, written on very simple editors, like the Windows
Notepad. You will recall from the previous section that you need either interpreters
or compilers to convert your source code to binary. The source code must be saved
in a file, which is passed as an input to the translator.

Depending on the language you are writing in, there are designated extensions for saving your source code file.

Python’s extension is .py Java’s extension is .java Php’s extension is .php

ow to install Python on your computer


1 - Type “Python” in your browser and search the internet.

2 - Scroll down and click on Download Python from the official Python
website (www.python.org).

3 - Select the right operating system that you have (e.g. Windows or Mac).

98
4 - Now you should select the version of Python you are interested
in or choose the latest version. In this book, we used version 3.6.5.

5 - Once the file is downloaded, double click on it and follow the


wizard to install python.

6 - Now your python has been installed in your computer and you
can start using it.

tarting the Python hell


As you know, we use the Python interpreter shell to run the
programs. To start the Python shell, follow the steps given below:

1- Click on the Start button to open the Start menu.


2- Click on IDLE (Python 3.6 32-bit) from the All Apps list.
IDLE stands for Integrated Development and Learning Environment
which is a bundled set of software tools for program development.

The interpreter shell of Python 3.6 appears.

The Python shell provides the very useful ability to execute in interactive mode where you execute a single Python
command and get the result. Interacting with the shell is much like using a calculator, except that, instead of being limited
to the operations built into a calculator (addition, subtraction, etc.), it allows the entry and creation of any Python code.
For example, in the following screen, we entered 2+3 and got the result as 5 in the next line.

Here, the expression 2 + 3 is entered at the shell prompt (>>>), and the program immediately responds with the result 5.

99
Session Introduction to Programming

Let us try another e ample.


Type the code print ("Python is fun!") in the shell. You should see the result as:
Python is fun!

And that’s it. You’ve just made your first programs in Python. Each time you
entered a line, Python immediately executed the statement.
Once done, you can use exit () or Ctrl D to leave the Python shell.

A dialog box appears.


Click OK to close the Python shell.

hell Window
The Shell window opens automatically when you open IDLE (Python’s Integrated Development and
Learning Environment) or when you run a program from the Code window. The main purpose of it
is to run codes. You may use it to write and test small pieces of code. However, you cannot save the
code through the Shell window. Below is a screenshot of the main Shell window.

The first bar of the Shell window illustrates the name and version of Python. It is also printed in the first line of the
Shell window, with more information about the version (inside the orange box).

100
The three arrows, known as the command prompt, appear when the computer is ready for you to type your code. Once
you write your code, press enter to run the code. The code runs immediately and the output appears in the next line
unless there is an error (bug).

As you can see in the screenshot above, we wrote the first command with a missing left bracket and pressed enter. The
output was a SyntaxError, and we have been advised how to fix it. In the second command, we debugged the code and
ran it again. The output was printed on the next line. You may have noticed that there are different colors of the code.
What do these different colors mean? Purple means a built-in function. Green means a string. Red means there is an
error. Blue means a function definition or output from the program in the Shell window. Orange means a keyword. The
rest is usually in black.

ode Window
The code window is used to write your code, especially when you are writing a long program. It
allows you to save and edit your code in a more practical way.

To start a new code window, click on the File menu from the Shell window, then click on “New file”.

101
Session Introduction to Programming

A new untitled window will appear. This window is ready for you to write your code in it. However, it is good practice to
save the file before using it. Click on File then Save to save the file.

The following window will appear. Select the location and folder that you would like to save your file in, then type the file
name and save it as “Python Files”.

102
Now your file is saved and you may notice that the file name on the title bar changed from Untitled to the new name
along with the new location that you entered. You can type your code now and save it frequently by clicking File then
Save or (Ctrl + S) as a shortcut.

Once you are finished writing your code, you can execute it by saving the file and then clicking on the Run menu,
then on Run Module. Alternatively, you may press F5 on your keyboard and that will execute your code.

As you can see in the previous screenshot, the code was executed and the output was displayed in the
Shell window. The first line is the file name and its location, followed by the program output.

103
Session Introduction to Programming

raphical ser nterface in Python


Graphical user interfaces (GUIs) are becoming an important part of every application.
They allow users to interact with the application through graphical icons and visual
indicators instead of text-based user interfaces. You may have noticed that the
programs that you built in the previous sessions were not attractive enough, as they
were text-based applications. GUIs were introduced to make applications more
attractive and easier to use.

Python has a huge number of GUI frameworks that can be used to create a GUI for its applications. TkInter
(traditionally bundled with Python, using Tk) is one example of the technologies that can be used to build a GUI.

Before we finish with this session, let us create one more interactive program.
We will write a program that asks you a few questions, then prints out an introduction about yourself.
From the same interpreter shell of Python 3.6 that you used in the last examples, click on File and then New file, then write
the following code:

Then save the file as a Python files and double click on it to run the program.

104
Apply

Fill in the blanks. Coding, Binary Code, Integrated Development and Learning Environment, Computer Program
(a) Programming is also referred to as _______________.
(b) A __________ is a sequence of instructions executed by computer process to solve a problem in graphical or
Activity pictorial form.
1 (c) ________________ is the natural language of electronic devices.
(d) An __________________ is a bundled set of software tools for program development.

Match the following.


(a) Programming is the natural language of electronic devices
Activity (b) Binary code is the extension of Python.

2 (c) .py
(d) Source code
translate the entire program to a file and execute the whole file
is often referred to as coding.
(e) Compilers is a raw text file, written on very simple editors.

Practice the following tasks in your notebook.


Activity a. Write a program in Python to print the message “I Love Python.”

3
b. Write a program in Python to display your name, address, and profession.
c. Write a program in Python to subtract, multiply, and divide two numbers.

What do the green and red text mean in the following window? How can you remove this red text?
Activity
4

Closing

Dear student, you have just learned that anything a computer does must be through a program. A program is a sequence of
instructions that is written in a programming language. A programming language is a language that allows us, as humans,
to communicate with machines and pass our commands through a code. The code is then translated, either interpreted or
compiled (based on the programming language that you used), to be a binary code. The machine then understands the
program and executes the commands. You also became familiar with a powerful interpreted object-oriented programming
language, Python. You learned the functionality of two main windows that Python uses: the Shell and Code windows.
Although you only executed a few simple queries, Python is used for more complicated applications, including business
intelligence and machine learning.

105
Session Building your First Program

Session

Building your First Program

106
Goal

In this session, you will learn


to build and run a complete program that reads, processes, and delivers a solution.

Learning objective

Dear Student
By the end of this session, you should be able to:

Define the problem that Write the code of your program


Execute your program.
your program will solve. and debug the errors.

1 2 3 4 5

Plan your program through Save your program as a


algorithms and flowcharts. Python file.

Be prepared

Any computer program that you have come across was built to solve a problem or
provide a service. If you have a problem and you would like to utilize the power of a
computer to solve it, then you should know what to do by now.

To build a computer program, we usually start by understanding the problem,


planning the solution, and then start coding. If we don’t truly understand the problem,
the solution might be defective, giving wrong output or operating inefficiently.

107
Session Building your First Program

Learn

uilding your first program


In this session, you will transform a physical game into a computer-based game.

The game is about a person in a jail. There are three doors Which door
you guess is the escape door?

in front of him. One door will let him go free from the jail, while
the other two will take him to the jailors. Now he needs to
guess which door is the escape door. If he finds it, then he
wins the game. Otherwise, he loses the game and it is over. 1 2 3

Planning the Program


As you understood in session one of this chapter, an algorithm is a useful tool that can be used
to plan your program before you start the actual coding. It helps you to write a step-by-step
procedure that covers the big picture of your program. Writing an algorithm about your
program saves your time, helps you optimize your solution, and makes the implementation
process much easier. In this section, we will write the algorithm that solves the Escape Door
game’s problem, followed by the flowchart.

Algorithm

STEP 1 Start

Print message “Welcome to the Escape Door game. Which door do you guess is the escape door?
STEP 2 Choose from 1, 2, or 3.”
This means you start by allowing the participant to enter a door number.

STEP 3 If the number entered < 1 or > 3:

STEP 4 Then print the message “Sorry!! The number you entered is incorrect! Try again.”
This means you start This means the player entered a door number that doesn’t exist.
STEP 5 Go back to step 2

STEP 6 If the number entered = 1:

STEP Then Print message “Sorry!! The jailor caught you and took you back to the jail. GAME OVER”
7
This means the player entered the wrong door number and lost the game.

STEP 8 If the number entered = 2:

STEP 9 Then Print message “Well done, you are free now. GAME OVER”
This means the player entered the right door number and won the game.

108
STEP 10 If the number entered = 3:

Then Print message “Sorry!! The jailor caught you and took you back to the jail. GAME OVER”
STEP 11
This means the player entered a wrong door number and lost the game.

STEP 12 Stop

Now you have written an algorithm that explains the solution in a clear and simple way. To make your
program even more understandable, we are going to draw a flowchart together. The flowchart, as we
learned in session one, will make it easy for anyone to understand the object and logic of your program.

Flowchart
START
Draw a flowchart of the Escape Door game.

Output
“Enter door number”

Input
Door number

Output No
Wrong number, Number = 1, 2,
try again!! or 3?

Yes

Output
“Sorry!! The jailor caught No
you and took you back to Number = 2?
the jail. GAME OVER”

Yes

Output
“Well done, you are
free now. GAME OVER”

END

109
Session Building your First Program

Coding the Program


Now it is time to make the game real. You need to open IDLE, as you learned in
session three. Once you open it, click the File menu, then choose New file. Save the
file with a name that represents the game. Carefully type in the code shown below.

Program code
Your program should now look like the following

Save your file, then click on the Run menu, and click on Run Module. Alternatively, you could press F5 on your keyboard
and it would directly run your program. You should get the following window.

- Spelling errors
f you get an error message nown as a bug , then you have to debug - Missing quote marks or brackets
- Missing indents
your code by carefully chec ing the code again. uch errors might be
- Using = instead of == in an if statement
- Not using : after if, elif, and else

110
Apply

Let us go back to the Escape Door game.


Activity
If we have four doors instead of three and only one of them is the escape door, what changes need to
1 be made to the algorithm, flowchart, and code? Can you rewrite them to accommodate the new
requirement?

Activity Find errors in the given code


2 and correct them.

Activity Find errors in the given


3 code and correct them.

Activity
Create an algorithm and flowchart to add two different numbers (using three variables)
4

losing

ear student, you have just learned how to solve a problem or provide a service through a computer application.
Although the program that you built is a simple and small one, the concepts and procedures remain the same even with
more complicated ones. It is always a good practice to split a big program into small subsets of functions, then work on each
one individually. Once the small subsets are completed and tested, then it is much easier to combine them and run the whole
program. There are many techniques and practices in how to code your program, and you need to define your own way and
be precise and consistent.

111
Session Variables, Statements, and Operators

Session

Variables, Statements, and Operators

112
Goal

In this session, you will learn


why and how to use variables, operators, and statements to write your Python code.

Learning objectives

Dear Student
By the end of this session, you should be able to:

Describe how to use variables Use different operators for


in a programming language. computational functions.

1 2 3

Describe how to create


statements.

Be prepared

One of the most powerful features of programming is the ability to use


variables. A variable is a name that is assigned with a value. This value can be
manipulated based on the program requirements. The process of assigning a
value to a variable is an example of a “statement.”

A statement is a unit of code that the Python interpreter can execute. In this
session, you will learn how to use variables and create executable statements.

113
Session Variables, Statements, and Operators

Learn

Variables
Before explaining the variables in Python, let us review the values and their types. A value is a basic
element that a program works with, such as a number or a letter. In the previous sessions, we dealt with
different values including 1, 2, 3 and “Python is fun!”. These values belong to different types. Here, 1, 2, 3 are
integers and “Python is fun!” is a “string,” as it contains a string of letters. The string is always enclosed in
quotation marks. If you are not sure what type of variable it is, then you can use the command “type” and
the interpreter will tell you the type, as shown in the following example.

Python displays the variable type based on the value assigned to it. This means Python will change the variable type if we assign
a value of a different type. For example: if you assign ' Python is fun!' to a variable var, then the type will be string. If you reassign
another value, 5, to var, then it will be integer.

114
The following table explains some basic variable types in Python.
Type Examples Description
123
Any positive, negative, or
0
integer zero value; no limit on size
-1234
3.15
Real numbers expressed in decimal or scientific
float 6.02E2 notation; limits on scale and precision
3
True Logical true/false quantities
boolean False

string ¨Tuesday¨ Textual snippets comprising any number of


¨¨ characters; delimited by single or double quotes
¨Luigi's¨

Programmers choose names for their variables that are meaningful and describe what the variable is used for. In Python, variable
names can contain both letters and numbers, but they cannot start with a number. It is legal to use uppercase letters, but it is a
good idea to begin variable names with a lowercase letter. The underscore character ( _ ) can appear in a name. It is often used in
names with multiple words, such as student_id. If you give a variable an illegal name, you get a syntax error:

In the above examples, it is clear that the first and second examples are wrong, as we explained in the previous
paragraph. However, what is wrong with the third example? You may have noticed that the variable name in the
third example is class, which is one of Python’s keywords. Keywords cannot be used as variable names.

Python has 33 keywords reserved that cannot be used as a variable name. They are:

and del from None True as elif global nonlocal


try assert else if not while break except import continue

or with class False in pass yield finally return

is raise def for lambda

115
Session Variables, Statements, and Operators

Statements
The code for an application is usually contained in a sequence of statements. A statement is a unit of
code that the Python interpreter can execute. So far, we have seen two kinds of statements: print
statement and assignment. When you type a statement, the interpreter executes it and displays the
result, if there is one.

If there is more than one statement, the results appear one at a time as the statements are executed,
as explained in the following example:
print(“King Saud University”)
x = 2019
print(x)

The output will be

Operators
Python has special symbols called operators that represent computations like addition and division.
The values the operator is applied to are called operands. The operators can be summarized in the
following table.

Math symbol Python operator Operation Example Result

÷ / Division 4/2 2.0

+ + Addition 4+2 6

– – Subtraction 4-2 2

× * Multiplication 4*2 8

42 ** Exponent 4 ** 2 16
or power
() () Parentheses (4 + 2) * 3 18
(grouping)

116
Now you can write some expressions that are built by the combination of values, variables, and operators. If you
type an expression in interactive mode, the interpreter evaluates it and displays the result:

You can start by creating variables and assign values to them, then do some calculations, as in the following
example:

When more than one operator appears in an expression, the order of evaluation depends on the rules of precedence. For
mathematical operators, Python follows mathematical convention as follows:

1 2 3 4

Exponentiation has Multiplication and Division have the


Parentheses have the Operators with the same
the next highest same precedence, which is higher
highest precedence. precedence are evaluated
precedence. than Addition and Subtraction, which
from left to right.
also have the same precedence.

Let us take 5*(4+1)+3**2 as an example and calculate the result.


We will start with the parentheses: 5*5+3**2
Second is the exponentiation: 5*5+9
Followed by multiplication: 25+9
And finally addition: 34
To try that in Python, you can write the following statement and execute it:
>>> 5*(4+1)+3**2
34

117
Session Variables, Statements, and Operators

Now let us build a more meaningful application that reads two values, which are your car speed and the distance to your
destination; then the application tells you how many minutes you need to arrive.

We will start in a new Code window as you have learned in session 4. Let us save the file as Traveling_Time
print("Welcome to the traveling time application")
speed = input("enter your speed in km/hour")
speed = int(speed)
distance = input("enter the distance to your destination")
distance = int(distance)
time_h = distance/speed
time_m = distance/speed*60
print("you will need",time_m, "minutes to arrive")
print("you will need",time_h, "hours to arrive")

And when you run the program you will get an output similar to the following.

118
Apply

Activity
1 Create two integer-type variables and calculate the addition of them in a third variable.

Activity
2 Print “I am studying at King Saud University” using an appropriate variable.

Activity
What will be the result for the following statement? >>> 6*5*(9+2)+3**2+(5+1)?
3

Closing

Dear student, you have just learned how to use variables, operators, and statements to enhance your programming
and produce solutions for more complicated problems. We mentioned in this session four famous types of variables, and
there are many more you may need to learn in your feature studies. We also explained the basic operators that allow you
to do computations. However, Python has many built-in functions that you can use, and you can also create your own
functions. You can now refer to the Python website and explore more advanced variable types and functions to improve
your previous programs.

119
Session Conditional Logic

Session

Conditional Logic

120
Goal

In this session, you will learn


why and how to use conditional statements in your Python code.

Learning objectives

Dear Student
By the end of this session, you should be able to:

Identify the condition that the Build a multiple-decision


decisions are based on. conditional statement.

1 2 3

Build a single-decision
conditional statement.

Be prepared

One of the most powerful features of programming is the ability to use conditional logic. In programming, there are some
situations where you need to make decisions, and based on these decisions, the program will execute the next block of code.
In other words, conditional logic here means we are given different paths from which we have to choose one. Python
supports the usual logical conditions from mathematics. In this session, you will learn how to use different conditional
statements.

121
Session Conditional Logic

Learn

Decision Making
As a programmer, you will definitely need to distinguish between many decisions and
perform different instructions based on the conditions output. To do so, Python provides
you with two main features: Boolean expression (an expression that is either true or
false) and conditional statements. The following are examples of Boolean expressions
that use the operator == to compare two values and produce True if they are equal and
False otherwise:

Conditional statements are used when we have two or more outputs for a condition, with a specific action for each
condition output. The following flowchart from session 1 is an example of a decision-making structure. Here, we have three
conditions, and each condition has two outputs.

START

START
INPUT A, B, C

YES NO YES YES


B>C A>B A>C
NO NO

PRINT B PRINT C PRINT C PRINT A

END

Decision structures evaluate multiple expressions and produce TRUE or FALSE as the outcome. You need to determine
which actions to take and which statements to execute if the outcome is TRUE or FALSE.

122
If Statement
An “if statement” allows your program to run a group of instructions, based on a condition
or set of conditions. With an if statement, your program can make a choice. The syntax of
writing an if statement in Pythons is as follows:
if condition:
indented statement(s)
As we mentioned, the condition we are testing is usually a Boolean expression with
a true/false output.
If the expression is true, the program will run the indented statement(s),
but if it’s false, the program will skip them and continue with the rest of the program at the
next unindented line.
Let us now practice using if statements in the following scenario. You were asked to build a program that asks students to
enter the pass mark for the IT140 course, asks them to enter their accumulated marks until now, and tells them if they have
already passed or how many marks they need to pass the course.
As you learned, you should start by drawing a flowchart before you start coding your program. Make that
flowchart now, then proceed to the commands below.

Else Statement In many scenarios, we want our program to execute a set of instructions if a condition output
is true and a different set of instructions if the condition output is false. Python provides you
with a shortcut for that: the else statement. It allows you to test if the condition is true
without having to perform another test to see if it is false. The else statement can only be used
after an if statement, so we sometimes refer to the two together as an if-else statement. The
syntax of writing an if-else statement in Pythons is as follows:
if condition:
indented statement(s)
else:
other indented statement(s)

If the condition in an if statement is true, the indented statements under the if are executed, and the else and all its statements are
skipped.
If the condition in the if statement is false, the program skips directly to the else’s other indented statements and runs those.

Let us now rewrite the previous example (the if statement example) with an if-else statement instead.

An if-else statement makes the code shorter and easier to read since the condition must be either true or false. It also helps prevent
coding errors in the two conditions as you may forget some outputs, such as if your mark is equal to the pass mark.

123
Session Conditional Logic

Elif Statement
In other scenarios, we have more than two possibilities for a condition, and we need more than two
groups of instructions. One way to express a condition like that is to use an elif statement:

if condition:
indented statement(s)
elif condition:
indented statement(s)
else:
indented statement(s)

Elif is an abbreviation of “else if.” Again, exactly one branch will be executed. There is no limit on the number of elif
statements. If there is an else clause, it has to be at the end, but there does not have to be one.

To practice the elif statement, let us assume that you are going to write a program that reads a student’s mark and display
the grade. If the mark is 95 – 100 then the grade is A+, 90 - <95 then the grade is A, 85 - <90 then the grade is B+, 80 - <85
then the grade is B, 75 - <80 then the grade is C+, 70 - <75 then the grade is C, 65 - <70 then the grade is D+, 60 - <65 then
the grade D. Otherwise, the grade is F, unless the entered mark was above 100 or less than 0; then the error message
“Sorry, you entered", your_mark, "This is an invalid mark !!” should be displayed.

It is obvious that the decision is based on the student’s mark. Therefore, all conditions will be directly related to the marks.
You may also have noticed that we have multiple conditions, where each condition has an output, and as a result we will use
an elif statement to execute this conditional logic.

124
Apply

Activity Write a program to compare two variables (a and b) and print the value that is larger along
1 with the variable name.

Activity
2 Write a program to check whether a number is even or odd.

Activity
Write a program that reads three numbers, then finds and prints the largest one.
3

Closing

Dear student, you have just learned how to use different decision-making statements to enhance your programming
and produce solutions for more complicated problems. We mentioned in this session three famous types of conditional logic.
You can now refer to the Python website and explore more details and more examples where you can use different
decision-making statements and improve your previous programs.

125
Session Loops and Functions

Session

Loops and Functions

126
Goal

In this session, you will learn


why and how to use different loops and functions in your Python code.

Learning objectives

Dear Student
By the end of this session, you should be able to:

Use loop statements in a


Create your own functions.
programming language.

1 2 3

Use Python functions to


enhance programming.

Be prepared

Programming is a useful tool that allows us to perform complicated tasks in an


easy and accurate way.

In this session, you will become familiar with two programming features that can
execute complicated tasks more efficiently: loop and function. Loop allows you to
repeat a statement or group of statements hundreds or thousands of times without
typing them again and again. Yes, you only need to write a loop statement with a
counter or a condition, and the program will take care of all the repetition.

On the other hand, a function is a block of organized, reusable code that is used to
perform a single, related action. There are built-in functions like print(), and you can
also create your own functions.

127
Session Loops and Functions

Learn

Loop When we need to do something over and over again in a program, loops allow us to repeat those steps
without having to type each one separately. To build a loop,

- we first need to identify the repeated steps.


- Second, we need to figure out how many times to repeat those steps. Now that we know the repeated
instructions and how many times, it’s time to build our loop. There are two famous loop statements in
Python, which we will discuss in this session: the for statement and the while statement.

For statement
A for loop statement in Python iterates over a list of items and repeats one step or a group of steps for each item in a list,
like the numbers 1 through 20, or names =[‘ahmad’, ‘saad’, ‘sarah’].

Start

for items

Loops until items completed

repeated
statements

end

As you can see in the previous figure, the program started, and when we wanted to repeat some statements, we used for.
Along with for, we specified the number of loops using a list of items. After that, we wrote one or a group of indented
statements which will be repeated until the list is completed.

128
Have a look at the following examples and predict their outputs.
Example 1 Example 2

Let us now practice using the for statement in a more detailed example.

While statement
A while loop statement repeats a step or group of steps while a given condition is true. It
checks the condition before executing the loop body and then executes the steps, which makes
it different from the for statement.

The following example shows you how to count down from 10 and then say “I like Python”:

n = 10
while n > 0:
print(n)
n = n - 1 Start
print('I like Python')

While Condition

Loops while condition true

repeated
statements

end

As you may notice, we started by having a counter n and assigned it a value of 10. Then we started a while statement with
a condition n > 0. While the condition is true, the while statement body (the intended steps) will be executed.

In this example, we have two steps: print n and update n with n-1. The body will be repeated 10 times. Each time we execute
the body of the loop, that is called an “iteration”. When n=0, the condition becomes false. At this stage, the while loop
statement is completed and the interpreter exits the while statement and continues the program. We have one more
statement remaining in the program, which is printing “I like Python”; then the program is completed.

129
Session Loops and Functions

Have a look at the following example and predict the outputs.

Example 1

Let us now practice while and for statements using a more detailed example. You have been asked to write a program
that reads a number and prints all values from that number until zero. The program then asks for a new number and repeats
that same process until 0 is entered. Once 0 is entered, the program prints “Thank you and have a nice day” and stops.

Example 2

130
Functions
A function is a block of code that only runs when it is called. It is a block of organized
and reusable code that is used to perform a single task. Functions are very useful in
many cases where you need to run the function every now and then.

To use a built-in function or a function that you defined, you only need to call the
function and pass the parameters. That will execute the function using the parame-
ters and return an expression if there is any.

Built-in functions
Python has many built-in functions that you can use immediately to save time and shorten your code.
You will find many built-in functions in the following table; some of them you already used in this chapter.

Method Description
abs() Returns absolute value of a number

all() Returns true when all elements in an iterable are true

any() Checks if any element of an iterable is true

ascii() Returns string containing printable representation

bin() Converts integer to binary string

chr() Returns a character (a string) from an integer

len() Returns the number of items in an object or the number of characters in a string

pow() Returns x to the power of y

print() Prints the given object

range() Returns sequence of integers between start and stop

repr() Returns printable representation of an object

reversed() Returns reversed iterator of a sequence

round() Rounds a floating point number to n places.

set() Returns a Python set

sum() Adds items of an iterable

131
Session Loops and Functions

Let us practice the function len(), which returns the number of characters in a string. Have a look at the following
example and predict the output:

efining a unction
If the built-in functions are not enough for you, then you can create your own functions. These functions are called
user-defined functions.

You can define functions to provide the required functionality. Here are simple steps to define a function in Python.

Function blocks begin with the keyword def followed by the function name
and parentheses ( ( ) ). Have a look at the following example where we are
creating a function with the name “my_function()”

Any input parameters or arguments should be placed within these


parentheses. You can also define parameters inside these parentheses. In
the below example, we are passing different values to “fname”:

The first statement of a function can be an optional statement — the documentation string of the function or docstring.

The code block within every function starts with a colon (:) and is indented.

The statement return [expression] exits a function, optionally passing an expression back to the caller. A return statement
with no arguments is the same as return none.

132
Apply

Activity
1
Write a program to print all natural numbers in reverse (from n to 1), using a for loop)

Activity
2
Write a program to print all even numbers between 1 and 100, using a while loop.

Activity
Write a program to find the maximum and minimum among three numbers, using functions.
3

Closing

Dear student, you have just learned how to use different loops and different types of functions to enhance your
programming and produce solutions for more complicated problems. We mentioned in this session two famous types of
loops and two ways of using functions. You can now refer to the Python website and explore more examples where we can
use different loops and functions and improve your previous programs.

133
Session File Input/Output (File I/O)

Session

File Input/Output (File I/O)

134
Goal

In this session, you will learn


how to read data from text files, use the data in your program, and write data to a text file.

Learning objectives

Dear Student
By the end of this session, you should be able to:

Read from and write to files


List different types of files.
in a programming language.

1 2 3

Use files in different modes.

Be prepared

You have learned many programming features of Python that allow you to write and execute many programs efficiently.
That is really great. In this session, you will learn an important feature that allows you to import data from a text file and
store the program output to a text file. In many cases, you do not want to enter every single variable that your program
requires by typing it, as you may already have it stored in a file. In other cases, you need to store the program outputs in a
file for documentation and sharing purposes. In such scenarios, using file I/O is very helpful. In this session, you will learn
how to read data from a text file, manipulate it, and then write data to a file and store it.

135
Session File Input/Output (File I/O)

Learn

Files in Python
Python has two categories of file: text or binary.
A text file is structured as a sequence of lines, where each line includes a sequence of
characters. Each line is terminated with a special character, called the EOL or End of Line
character. The most common EOL is the comma {,} or newline character. It ends the current
line and tells the interpreter a new one has begun. A backslash character can also be used to
tell the interpreter that the next character – following the slash – should be treated as a
new line.

On the other hand, a binary file is any type of file that is not a text file. Because of their nature, binary files can only be
processed by an application that knows or understands the file’s structure. In other words, there must be an application
that can read and interpret binary files.

ead data from file


Python provides basic functions and methods necessary to read data from files using the
file object. It is handled natively in Python, so you do not need to import a library. The first
thing you will need to do is use Python’s built-in open function to get a file object. As the
open ( ) function will return a file object, it is most commonly used with two arguments.
An argument is nothing but a value that has been provided to a function, which is relayed
when you call it. For example, if we declare the name of a file as “student”, that name would
be considered as an argument. The syntax to open a file object in Python is:
file_object = open(“filename”, “mode”)
Where file_object is the variable to add the file object, and mode tells the interpreter and developer which way the file
will be used.

Here is a list of the different modes that can be used while opening a file:

Modes Description

r Opens a file for reading only. The file pointer is placed at the beginning of the file. This is the default mode.

Opens a file for reading only in binary format. The file pointer is placed at the beginning of the file. This is the
rb default mode.

r+ Opens a file for both reading and writing. The file pointer is placed at the beginning of the file.

136
Opens a file for both reading and writing. The file pointer is placed at the beginning of the file.
rb+
Opens a file for writing only. Overwrites the file if the file exists. If the file does not exist, creates a new file
w for writing.

Opens a file for writing only in binary format. Overwrites the file if the file exists. If the file does not exist,
wb creates a new file for writing.

Opens a file for both writing and reading. Overwrites the existing file if the file exists. If the file does not exist,
w+ creates a new file for reading and writing.

pens a file for both writing and reading in binary format. Overwrites the existing file if the file exists. If the file
wb+ does not exist, creates a new file for reading and writing.

Opens a file for appending. The file pointer is at the end of the file if the file exists. That is, the file is in the append
a mode. If the file does not exist, it creates a new file for writing.

Opens a file for appending in binary format. The file pointer is at the end of the file if the file exists. That is, the
ab file is in the append mode. If the file does not exist, it creates a new file for writing.

Opens a file for both appending and reading. The file pointer is at the end of the file if the file exists. The file
a+ opens in the append mode. If the file does not exist, it creates a new file for reading and writing.

Opens a file for both appending and reading in binary format. The file pointer is at the end of the file if the file
ab+ exists. The file opens in the append mode. If the file does not exist, it creates a new file for reading and writing.

Also, and before we take an example of opening and reading file, let us explore some basic file attributes and how to
identify these attributes.

Attribute Description

file.closed Returns true if file is closed, false otherwise.

file.mode Returns access mode with which file was opened.

file.name Returns name of the file.

Now let us practice all of that. You have a text file “cfy.text”
which has three lines of text,
The file is saved in the following folder; “C:\TEMP”. If you have your
text file stored in another location, you can use it after changing
the current directory in the Python shell. Let us now change the
current directory to TEMP.

137
Session File Input/Output (File I/O)

>>> import os, sys


>>> os.chdir("C:\TEMP")

To check your current directory, type:


>>> os.getcwd()

Now we are ready to open the file and read the data.
>>> mycfy = open("cfy.txt", "r+")
To check the text inside the file object “cfy.txt” which you assigned to mycfy, you can use a print statement or simply type
mycfy.
>>> print("The text is:", mycfy)
The text is: Common First Year
King Saud University
2019

Let us now find out some attributes of the file “mycfy”


m c clo ed
al e
m c mode
'r+'
m c name
c t t

Now it is time to practice more advanced program. You


are asked to build a program that read cfy.txt file and
print it line by line with the line number. Here you need to
use for loop from previous session. And the output will be:

138
Write data to file

Before we write to a file, let’s create our own file and name it. Using the open file
statement open(“filename”, “mode”) with mode (W+) opens a file for both
writing and reading. It overwrites the existing file if the file exists and creates a new file
for reading and writing if the file does not exist.

Once you have your file ready then you can write to it using the write() function which writes any string to an open file. It
is important to note that Python strings can have binary data and not just text. The write() function does not add a
newline character ( n ) to the end of the string. The syntax of write function as follows:
file bject te( t n )

Let us create a file with your name and write your details in it.

Now you should have already created a file called “Ahmad.txt” with your information stored in it. To open the file, go to
C:\TEMP and double click on the file.

When you are finished working on your file, you can use the clo e() function to close it. This will close the file complete-
ly and terminate resources in use. It is important to understand that when you use the clo e() function, any further
attempts to use the file object will fail.
m file clo e()

139
Session File Input/Output (File I/O)

Apply

Activity Write a program to create a file with the name “KSU.txt” and add three things which you
1 like in the KSU.

Activity
2 Write a program to display contents of a file on the screen.

Activity
3 Write a program to read a file and display its contents with line numbers on a screen.

Activity
4 Write a program to copy one file to another.

140
Closing

Dear student, you have just learned how to use files in programming languages. We mentioned in this session some
famous file operations that we can apply to a file. You can now refer to the Python website and explore more examples
where we can use files and practice some more file modes and improve your previous programs.

141
Dr. Mona A. Asiri

142
Aim
The data visualization chapter focuses on visualizing the data using different tools and
applications. The student will be able to present different types of data to be much clearer
and more understandable. This chapter provides the practical skills that the student can use to
communicate data effectively to various audiences and in a variety of situations

Learning outcomes
Upon successful completion of this chapter, the student will be able to:

Understand data visualization for different types of data.

Represent numeric data using advanced charts in spreadsheet applications.

Represent non-numeric data using the appropriate graphical tools.

Use dashboards to represent multiple types of data visualization.

Contents

Introduction to data visualization

Visualization of numerical data

Visualization of non-numerical data

Data dashboards

143
Session Introduction to Data Visualization

Session

Introduction to Data Visualization

144
Goal

In this Session, you will learn


In this session, you will learn why representing data visually makes a difference and what
makes visual data successful.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Understand what data Justify the importance of


visualization is. representing data visually.

1 2 3 4

Identify the different Identify the criteria of a


types of data. successful data visualization.

Be prepared

In this session, you will learn what data visualization is, why data visualization is important, and how data visualization can
change people’s way of thinking.

List of Terms

Data visualization A method used to display data in graphic format


Numerical data Data in the form of numbers
Non-numerical data Data we cannot measure in numbers
Exploratory data visualization Using the data visualization to find the story behind it
Explanatory data visualization Using the data visualization to communicate the story

145
Session Introduction to Data Visualization

The Ghost Map


In 1854, London was a city of death. A cholera outbreak turned into an epidemic that
would eventually claim the lives of 10,000 people. The common belief was that cholera
was spread through the air, giving the disease an ethereal quality that earned it the
nickname “The Ghost.” However, a physician named John Snow had a different idea.
Snow’s hypothesis was that cholera wasn’t spread through air at all; he believed it was
spread through water. He published a paper explaining his theory, but the medical
community didn’t pay any attention to it — no experiment had been conducted to
justify his hypothesis. So, Snow started collecting more information about the spread
of cholera in London. He made a breakthrough when he found out where every victim
of the epidemic had lived, then marked each of those locations on a map. The result was
what came to be known as the “The Ghost Map.”

The map showed the distribution of the affected buildings – buildings where one or more people had died of cholera. When
the data were laid out on the map, it was relatively easy to trace the outbreak to a specific point: a water pump on Broad
Street.

Snow publicized his Ghost Map, and this time, people listened. The Broad Street pump was shut down, and the number of
cases of cholera decreased until the outbreak eventually ended.

John Snow’s decision to visualize the data he’d collected on cholera deaths became a significant step toward solving the
mystery of London’s terrifying Ghost.

I hope by now you are getting a sense of why visualizing data is such an important part of solving a problem or communicat-
ing a message.

146
Learn

Before learning about data visualization, we need to understand what data is.

What is data?
Data is a collection of information. It could be in a variety of forms, such as numbers, text, figures, analysis, statistics,
observations, and facts based on some existing information.

What we see is data. Data includes the things we know, facts, stories, closely interrelated concepts. Data includes all
information about any organization or individual: the number of employees in an organization, sales reports, investment
performance, profit and loss, etc.

On a larger scale, humans are currently generating an estimated


2.5 quintillion bytes
of data every single day.

Types of data
There are two main types of data.

Numerical Data Non-numerical Data


Data in the form of numbers is called numerical Data we can observe is called non-numerical data.
data. This includes data in quantitative form or in This is data that is in a qualitative form or that we
measurable form: time, weight, height, amount, etc. cannot measure in numbers: a person’s gender,
address, ethnicity, etc.

What is data visualization?


Data visualization is a method used to display data in a graphical format. It can show
patterns, trends, or presentations of data in a pictorial format. This is an effective way
to help your audience understand concepts or figures in an easier and more attractive
way. It enables a presenter to convey a concept or an idea in an understandable way
without making much effort.

Data visualization refers to the use of visual representation and presentation to


facilitate the understanding of data. Our minds cannot see every relationship, pattern,
and trend in a set of raw data (numeric or textual), especially when we are faced with
a huge amount of it. By transferring the data into a visual model, we help our mind
compare, connect, and observe information more easily and more quickly.

You see data visualization around you almost every day. Common The human brain processes images
examples of visuals are a Google map, Riyadh’s train map, the
scale-style speedometer, and many of the signs and visual 60,000
instructions you pass on the street. times faster than text.

147
Session Introduction to Data Visualization

History of data visualization


The concept of using maps, figures, and pictures to understand or to convey a message
has been around for centuries. Examples include mapmaking, drawings and pictures. It
has deep roots, having been used by cartographers and surveyors in the second
century. Nowadays we have all sorts of types of data and methods of visualizing data.
Why did the concept of data visualization gain so much popularity? The answer is that
our brain loves visuals. The visuals communicate more information than tables and
text. Our brain can more easily understand the data presented in graphics than in text.
Why is data visualization important?
“A picture is worth a thousand words.”

Data visualization helps you to explain the relationships among the data in an easier
way. We live in a fast-paced world in which our leaders, our managers, and we,
ourselves, are often faced with the need to make quick and accurate decisions. With
the flood of information available to us, the process of reviewing all the relevant data
seems impossible. However, reviewing charts, figures, and graphs that show the
patterns, trends, and relationships inherent in that data decreases the time and
effort it takes to make sound decisions.

Illustrate concepts

Show company goals and future plans Important simplify complex data would be better
aspects
of data
visualization
Convince your audience Convey a message

Get your audience’s attention

The more visual the input becomes, the more likely it is


to be recognized and recalled.
Neurologist John Medina

There are two main types of data visualizations

Exploratory data visualization Explanatory data visualization

Each uses specific tools to achieve its intended goal.

The next sections will discuss these two forms of visualization.


Exploratory data visualization
Exploratory data visualization is used when you want to look deeply into your collection of data to gain insight about its
meaning and to understand how the different variables connect. This type of data visualization is mainly used as a part of
a larger data analysis to help the researcher figure out the story behind the data. Exploratory data visualizations tend to
be complex and contain lots of information; this is to be expected, since the main goal of this form of representation is to
find the story that pulls together as much of the data as possible. In other words, if you start removing everything that
looks like data noise, you might end up missing a crucial link in your story chain.

148
Figure 3: The process of exploration.
Figure 3 shows the process of finding the story in an exploratory
data visualization. The process starts by carefully examining the
visual and formulating questions about what you see. Then you
examine the visual again to explore answers to those questions
or to find relationships or trends.

Explanatory data visualization


Unlike exploratory data visualization, explanatory data visualization is used when you already know the story behind your
data and you want to communicate that story to an audience. You choose which type of visual representation to use based
on the story that you want to share, and you include in that visual representation only the data you want to focus on; you
don’t want to include any unnecessary or irrelevant data here.

Figure 4 explains the process of explanatory data visualization. The


questions in the first step are usually asked by the audience, then
the visual designer tries to communicate answers to those
questions by designing an attractive visual with minimal data noise.

By this point, it should be clear to you that the significance of data visualization lies in:

Understanding the data Exploring the story behind the data

Finding relationships, trends, and patterns Answering questions

Supporting decision-making Communicating a message

It is worth mentioning that the focus of this chapter will be on explanatory visualization. Hence, in the following sessions,
you will learn how to visualize your data using some tools and software to communicate a story and answer questions for
your audience effectively and in a visually appealing manner.

What makes a successful data visualization?


The success of data visualization is based on a combination of four elements: audience, data, story, and visual. The next
sections explain how these elements should interact with one another to provide a successful data visualization.

Audience Data Story Visual

Clarity and simplicity


“Maximize impact and minimize noise.” —Chris Dutton
The main goal of explanatory visualization is to communicate a message to your audience. Therefore, it is important to make
the message clear and simple to ensure quick and easy understanding. Visualizing data with clarity and simplicity means
doing so in a way that gets directly to the point; tells the story the data show, not what you want to show; and avoids any
irrelevant data.

149
Session Introduction to Data Visualization

Create a narrative
“Don’t show your data, tell a story.” —Chris Dutton
To tell a story effectively through visual aids, you should know your audience as well as the message you want them to get
from your data visualization. Maybe your audience is a group of professionals who need to get a sense of how their business
or organization is performing so they can make important decisions. In this situation, the data visualization might focus on
presenting the changes to their market value over time or comparing earnings over two periods or the performance of two
products. Or maybe you want to communicate a general message about your latest assignment to non-specialists – in that
case, you might choose a visual that is very direct and contains fewer details. Thus, the storytelling changes according to
who the audience is, what they already know about the topic, and the level of information you want your data visualization
to convey.

Balance between design and function


“Beautiful is good, functional is better, both is ideal.” —Chris Dutton
You want your data visualization to attract the attention of your audience, so good design is a requirement. However,
attractive design is not enough. You don’t just want people to look – remember, your goal is to convey a message. To do
this in an effective way, you have to choose the best visual aid to represent your data. There are many types of data
visualizations to choose from, and the more familiar you are with your data, your audience, and the message you want to
communicate, the easier it will be for you to choose the best one.

The next sessions talk about how you can effectively visualize your data using the concepts we learned in this session.
First, you will learn how you can present your numerical data using different types of charts. Then, you will learn about
presenting non-numerical data. Finally, you will learn how to pull everything together to create your own dashboard that
tells your story in an effective way.

The power of Data Visualization


can change
one’s perspective.

What kinds of businesses or fields need data visualization?


Data visualization is becoming a vital part of every business and organization. Industries and businesses record their data
progress and visualize it, to track the company’s growth, development, profit and loss, etc. Using data visualization,
companies and organizations analyze their progress, what their target is, and where they are. Based on the figures,
companies make plans and strategies.
Because of computers, today it is easy to analyze big and complex data using data visualization techniques. It is used in the
corporate world, the banking sector, marketing companies, governmental organizations, hospitals, and other industries.

In 1644, Michael Florent van Langren, a Flemish astronomer, is believed


to have provided the first visual representation of statistical data.

150
Apply

In pairs, watch the following video, then answer the questions.

The Best Stats You've Ever Seen | Hans Rosling | TED Talks
Activity
a - What makes the presentation so attractive in your opinion?
1 b - What is the tool used in the presentation?
c - What is the type of data in the presentation?

Fill in the blanks with the appropriate words provided below.


(audience, explanatory, numerical data, exploratory, non-numerical)
Activity a - ____________ data visualizations tend to be complex and contain lots of information.
2 b - ____________ data visualization is used when you already know the story behind your data.
c - The success of data visualization is based on a combination of four elements: ____________, data,
story, and visual.
d - Data in quantitative form or in measurable form is called ____________.
e - ____________ data is data in qualitative form, data we cannot measure in numbers.

Choose TRUE or FALSE for the following statements.


Activity ( ) True
3 a - To tell a story effectively through visual aids, you should know your audience well.
( ) False
( ) True
b - Data we can observe or data in qualitative form is numerical data.
( ) False

c - Time, weight, height, and amount are examples of numerical data. ( ) True
( ) False
( ) True
d - Data visualization is a method used to display data in graphic format. ( ) False

Closing

Data Visualization

what is data? What is data visualization? What makes data visualization successful?

Types of data Types of data visualization Clarity and simplicity

Explanatory Create a narrative


Numerical data Non-numerical data
Exploratory Design and function

151
3 Session Visualization of Numerical Data

Session

Visualization of Numerical Data

152
Goal

In this Session, you will learn


In this session, you will learn how to present numerical data using different types of charts.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Assign numeric data to the Prepare numeric data to be presented


appropriate chart. in the appropriate chart or graph.

1 2 3 4

Understand the purpose of Create band and waterfall charts


different types of charts. using Microsoft Excel software.

Be prepared

As mentioned in the first session of this chapter, we will learn in sequence how to
visually represent numerical and non-numerical data. This session focuses on
numerical data, and we will learn how to use different types of charts to represent
a given set of data.
With your group, considering what you have learned about a successful data
visualization, examine the two charts below for the same data and answer the
following questions:

153
3 Session Visualization of Numerical Data

1 What is the story behind the two charts?

2 Which chart is harder to understand?

3 What changes could improve the harder one?

Source of the charts:


https://www.kaushik.net/avinash/analytics-tips-complex-data-simple-logical-stories/

List of Terms
Chart A graph or diagram that represents quantitative or qualitative data such as bar chart and pie chart
Data preparation The process of adding, deleting, calculating, or reorganizing the data before using it in a chart
Band chart A line chart combined with background shades

A chart that presents the cumulative effects of either positive or negative contribution to
Waterfall chart reach the net value

154
Learn

Assigning data to the appropriate chart

Assigning data to the wrong chart type affects the story and the message that you want to
deliver. However, how you can choose a suitable chart type to present your data effectively? The
answer is mostly based on the purpose of presenting the data and the message that you want
your audience to get from your data visualization. The next table shows a classification of some
types of charts, based on the purpose which they serve.

90 percent of information transmitted to


the brain is visual.

The purpose

Data comparison charts Data reduction charts


Comparison Composition Distribution Evolution Relationship Profiling

Examples of Bar Pie Histogram Line Scatterplot Grouped-bar


suitable chart Bullet Pareto Boxplot Step Bubble Horizon
Heatmap

Of course, this table does not cover all purposes or types of charts. However, it gives you an idea about how some charts
can serve specific purposes more than others, although some charts can serve several purposes perfectly.

In general, classifications of the types of charts based on their purpose are not sharply divided, because you can find a chart
that can serve more than one purpose. Thus, if you have a good sense of your data and you know exactly what message
you want your audience to get, you can pick a suitable chart easily.

Data Comparison Charts


a Comparison

1 Bar chart
A bar chart is a chart which represents categorical
data with bars with height or length proportional to
the values. It shows comparisons among discrete
categories. For example, the following chart shows
the elderly (65 years and above) population in the
year 2017 in Saudi Arabia for 6 different cities.

155
3 Session Visualization of Numerical Data

2 Bullet chart
A bullet chart or bullet graph features a single measure, which
compares to one or more measures, and displays it in the context
of qualitative ranges of performance. A bullet chart or graph is like
a traditional thermometer. It displays data value encoded by the
length of the main bar in the middle of the chart. Mostly, it
displays information as excellent, good, or poor. It conveys a lot of
information in a compact space.

3 Heat map

A heat map is a graphical representation of data that displays


values in a matrix and represents them as colors. In the matrix,
high values are represented with dark colors; the intensity of
colors represents values of data tables. Generally, a heat map is
used to display weather or real estate data. The following chart
shows the life expectancy data in the Arab world, where Morocco
is highest in life expectancy and Somalia is lowest.

b Composition

1 Pie chart
A pie chart is a circular statistical graphic that is divided into slices
to illustrate numerical proportion. One of the most popular chart
a
types, pie charts are widely used in the business world and the
mass media. Pie charts are best used for making part-to-whole
comparisons with discrete or continuous data. For example, the
following pie chart shows data about smokers in 6 different
regions for the year 2017.

2 Pareto chart

A Pareto chart is a type of chart that contains both bars and a line
graph. The vertical bar represents the frequency of individual
a
values and the line represents a cumulative total. The Pareto
chart is useful for analyzing what problems need attention first. It
is based on the Pareto principle, which states that in a given
situation, 80 percent of the effects come from 20 percent of the
causes. (It is also known as 80/20 rule.)

156
c Distribution

1 Histogram
A histogram shows you an accurate distribution of continuous
data. A histogram chart resembles a bar chart, but it actually
differs from it. In a histogram, data values are distributed into
bins, which are represented as columns.

2 Boxplot

Boxplots are used to understand the outliers in the data. A


boxplot is a graphical display of five statistics (the minimum,
lower quartile, median, upper quartile, and maximum) that
a
summarize the distribution of a set of data. For example, the
following boxplot shows the annual rainfall rate in mm in Saudi
Arabia for the years 2010-2016.

Data Reduction Charts

d Evolution

1 Line chart
A line chart is a type of chart that displays information as a series
of data points connected by a straight line segments. Line charts
are used to show time series relationships with continuous data.
They are most often used to visualize data that changes over
time. For example, the following line chart shows the statistics of
water consumption in 3 big cities for the period of 8 years from
2009 to 2016.

2 Step chart
A step chart is used display changes that occur at irregular
intervals. The step chart shows the trend as well as the time of
the change. It is an extended version of a line chart, but it does
not use the shortest distance to connect two data points; it uses
vertical and horizontal lines to connect, which makes a step-like
progress. The following example shows the change in price of an
item over a period of time.

157
3 Session Visualization of Numerical Data

e Relationship

1 Scatter plot

A scatter plot chart generally displays values for two variables


for a set of data. It uses a collection of points placed using
Cartesian coordinates. As a scatter plot uses the X axis and Y
axis for two different variables, it is also called an XY plot. The
a
data are displayed as a collection of points. It is best used for
correlation of large amount of data. The following scatter plot
shows the relation between number of customers and sales of a
particular item.

2 Bubble chart
A bubble chart displays three dimensions of data. It shows
relationship between data in 3 numeric dimensions: x-axis data,
y-axis data, and the size of bubble. It is used to compare and
display relationships between categorized circles. It is like a
scatter plot with the exception of the third variable. Following is
a sample bubble chart.

There are many tools and software programs to create charts, for example Tableau, Power BI, and Microsoft
Excel. In the following sections, you will learn how to create band and waterfall charts using Excel. Excel has
been chosen since it is the most powerful and flexible software to create charts, especially for average users.

Band chart
A band chart is basically a line chart combining with background shades that represent the upper and lower boundaries of
the data. The purpose of using the band chart is representing data during a period against specific intervals. For example,
you want to show, track, or monitor the performance of two companies during a period against percentage intervals.

Month Com.1 Com.2


Prepare the data for the band chart
Apr-15 86.4% 63.0%
The data should be ready to be used to create the band chart. The steps
May-15 45.8% 58.9%
below will show you how to prepare your data.
Jun-15 44.1% 81.6%
Jul-15 77.6% 86.1%
1 Let’s start with basic data you may have. Suppose that you have a
table of data for the performance of two companies through the
Aug-15
Sep-15
80.7%
83.7%
95.0%
78.2%
financial year.
Oct-15 78.8% 98.9%
Now let’s suppose that you want to compare the performance of the two Nov-15 76.0% 88.3%
companies against the following three intervals: Dec-15 79.0% 75.5%
Jan-16 77.0% 72.1%
Low (<50%) High (>80%) Feb-16 67.1% 93.1%
Medium (50% - 80%)
Mar-16 45.8% 95.7%

158
2 Thus, you have to add three columns to show the three intervals:

Month Com.1 Com.2 Low (<50%) Medium (50% - 80%) High (>80%)
Apr-15 86.4% 63.0% 50% 30% 20%
May-15 45.8% 58.9% 50% 30% 20%
Jun-15 44.1% 81.6% 50% 30% 20%
Jul-15 77.6% 86.1% 50% 30% 20%
Aug-15 80.7% 95.0% 50% 30% 20%
Sep-15 83.7% 78.2% 50% 30% 20%
Oct-15 78.8% 98.9% 50% 30% 20%
Nov-15 76.0% 88.3% 50% 30% 20%
Dec-15 79.0% 75.5% 50% 30% 20%
Jan-16 77.0% 72.1% 50% 30% 20%
Feb-16 67.1% 93.1% 50% 30% 20%
Mar-16 45.8% 95.7% 50% 30% 20%

The value in the Low column represents the band from 0% – 50%

The value in the Medium column represents the band from 50% – 80%

The value in the high column represents the band from 80% – 100%

You will get the value of the bands by subtracting the lower percentage from the higher one.
By now, your data is ready to create the band chart.

Create the band chart

To create the band chart, follow these steps:


1 Select your data, which you already created in step 2.
2 Insert a line chart.
3 Change the chart type to combo chart.

4 Change the chart type for the data series Com. 1, Com. 2, Low, Medium, and High as follows:

Line with Markers for the Com. 1 series and Com. 2 series.
Stacked Column for the series Low, Medium, and High.

You will get a chart as follows:

159
3 Session Visualization of Numerical Data

Click on any column, then, in the format data As a result, you will get bands rather than columns. Here is
5 series pane, change the gap width to 0%. your final band chart

Finally, add the chart title and band labels.


6 You can also adjust the vertical axis range
and change the color as you want.

By looking at the band chart now, it is easy and quick to track the performance of the two companies — when the companies
are performing well and when they need to improve.

Waterfall chart
A waterfall chart is used to show how an initial
value is increased and decreased by a series of
intermediate values, leading to a final value. It is
also called a flying brick or Mario chart.
The waterfall chart is commonly used in financial
departments of small to large businesses. It gains
its popularity from its feature of presenting the
cumulative effects of either positive or negative
contributions to reach the net value.

160
You can use the waterfall chart for quantitative analysis, such as inventory or performance analysis, and also for contract
tracking, which helps the stakeholders to make the right decisions about finishing some contracts or investing more in
others.
Thus, if you have start value and end value and you want to show how the changes occur to move from the start to the end
value, the waterfall will be the perfect choice.

Prepare the data for the waterfall chart


Assume that you have the following data:
Net Cash Flow

To present your given data using a waterfall chart, you have to prepare it as follows: 80000 Start
-5003 Apr
1 Make sure that the month column is on the right, because you do not want to include
-16700 May
the net cash flow column when you select your data to create the waterfall chart.
48802 Jun
2 Add two columns to represent the negative and positive contributions. -11195
-35260
Jul
Aug
3 Add two columns to represent the start and end values in the net cash flow; they will 18220
-23840
Sep
Oct
be the first and last columns in the waterfall chart.
43250 Nov
4 Add another column to represent the float column in the middle. -18280 Dec
26670 Jan
5 Now you are ready to insert the formulas in your column to calculate the values, as 15000 Feb
shown in the table below. 24750 Mar

You may notice that there are top and bottom rows with the value 50000 in the float column. This is a random value just
to save a space to the right and left sides of the waterfall chart.

161
3 Session Visualization of Numerical Data

After calculating the values in the table, your


data will look like this:

By doing these steps, you are ready to create the waterfall chart.

Create the waterfall chart You will get a chart like this chart:
The waterfall chart is basically a customized stacked
chart. You can create it by following these steps:

1 Select all your data except the first column.


2 Insert a stacked column chart.

3 Right click on the float series, and from the


The waterfall chart is ready, and it will look like this:
dropdown menu select Format Data Series.
4 In the series option, select No Fill for FILL options.
5 Select the negative series and select the fill color
as red.
6 Repeat the same process to change the colors of
the positive, start, and end series to blue, green
and gray, respectively.

7 Select any series and change the gap width under


the series option to 10%.

162
Apply

Activity Visit the website:

1 https://www.data-to-viz.com
Then, in pairs, answer the following questions:
a) What is the criterion to choose the most appropriate chart to represent numeric data?
b) How many categories of charts are used to represent numeric data, and what are they?

Fill in the blanks with the appropriate words provided below.


Activity (waterfall chart, band chart, histogram, heat map, pie chart)

2 a) A __________ chart is basically a line chart combined with background shades that represent the upper
and lower boundaries of the data.
b) The __________ chart is commonly used in financial departments of small to large businesses.
c) A __________ is a circular statistical graphic, which is divided into slices to illustrate numerical proportion.
d) A __________ resembles a bar chart but differs from it.
e) A __________ is a graphical representation of data that displays values in a matrix and differentiates
them by colors.

Choose TRUE or FALSE for the following statements.

Activity a) Assigning the data to the wrong chart does not affect the story and the message ( ) True
3 that you want to deliver. ( ) False

b) The purpose of using the band chart is representing data during a period against ( ) True
specific intervals. ( ) False

c) A bullet chart or graph is like a traditional thermometer. ( ) True


( ) False
( ) True
d) A bubble chart shows the relationship of data on the X axis and Y axis.
( ) False

Closing

Focal points of this session are:


- The purpose of the data visualization is the key to choosing the right chart.
- Preparing your data is a crucial step before creating the chart.
- A band chart is used to compare two sets of data during a period against specific intervals.
- A waterfall chart is used to represent the positive and negative changes that occur between start and end points.

163
Session Visualizing Non-Numerical Data

Session

Visualizing Non-Numerical Data

164
Goal

This session provides


how to visualize non-numeric data using different visualization techniques.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Differentiate between different


Understand what a diagram is. types of visualization techniques
for non-numeric data.

1 2 3 4

Assign data to an appropriate Use Dia software to create


diagram. different diagrams.

Be prepared

As we mentioned before, the main reason to visualize data is because we


have an overload of data around us from different sources, including the
internet. This data overload makes it hard to make decisions. The rule of data
visualization is to transfer complicated data into a simple form that is easier
to understand. In session 1, we learned about the different types of data, and
in session 2, we learned how to visualize numerical data. In this session, we
will focus on visualizing non-numerical data using several techniques.

165
Session Visualizing Non-Numerical Data

In groups, try to convert the following table of an organizational hierarchy into another
visual form to make it easier to understand and present.

Employee name Reports to Title Department

Ahmad Nasser CEO Executive

Khalid Saleh Ahmad Nasser Development manager Product development

Ali Rashed Khalid Saleh Software developer Product development

Maher Fares Ahmad Nasser Marketing manager Marketing

Abdullah Saud Maher Fares Market researcher Marketing

Table 1: Organizational hierarchy.

List of Terms

Term Explanation

Non-numeric data Data in a qualitative form or data we cannot measure in numbers

Diagram A visual illustration of a group of concepts and the relationships between them

Visualization technique A method to represent data considering the purpose of the visualization

Word cloud A group of words of different sizes placed together into a cloud shape

Tree diagram A visualization technique that has a start, root, or parent node, with branches
emanating from it

Flowchart A visualization technique to represent algorithms and processes

Venn diagram Sets of entities; each set is drawn within a circle

166
Learn

Non-numerical data can be referred to as categorical data or qualitative data.


Non-numerical data can be observed but cannot be measured. These data
mostly deal with the description of something such as feelings or characteristics.

When we talk about non-numerical or categorical data, this does not mean they
cannot be numbers. However, the numbers in non-numerical data do not have
any mathematical value, and mathematical operations cannot be performed on
these numbers. For example, if you collect data for a survey that needs the
gender of a client, you can make the task easier by assigning the number “1” as a
code for men and the number “2” as a code for women. The numbers “1” and “2”
here do not have any mathematical meaning, and you cannot add them.

Most non-numerical data can be represented in a diagram. In the next sections, we define a diagram and describe the most
common visualization techniques to draw diagrams.

What is a diagram?
A diagram is a visual illustration of a group of concepts and the relationships between them. Diagrams are mostly used to
represent non-numerical or qualitative data. Diagrams are used to convert qualitative data into visual representations to
make information clearer, simpler, and easier to understand and remember. Diagrams can use different visualization
techniques according to their purpose and the types of concepts and relationships that you want to show. You can see
diagrams around you everywhere, in educational settings such as in books, posters, or presentations, and in business
settings such as in organizational hierarchies or process maps for task completion.

167
Session Visualizing Non-Numerical Data

DIFFERENT TYPES OF VISUALIZATION TECHNIQUES FOR NON-NUMERIC DATA

The next section shows how to choose the right diagram to represent your data.

Assign your data to a suitable diagram


As we learned, information communication is the main reason to visualize
qualitative data using diagrams, and it provides a crucial advantage. But
how do you choose the most suitable diagram to communicate your message
to an audience? The main point to consider is the purpose of the diagram.
For example, do you want to show the process of how to accomplish a task,
to show cause and effect of an issue, or to illustrate relationships between
different concepts? The following table shows some of the most common
diagrams, classified according to their purpose.

Example of
Diagramming purpose diagramming technique

Demonstrate a process: show the steps to accomplish a task Flowchart

Brainstorm: create, include, and comprehend ideas about a topic Mind map

Identify defects: analyze the causes of a problem to correct the defect Fishbone diagram

Demonstrate relationships: show the connections between concepts or people Tree diagram

Compare: show similarities and differences between two or more concepts Venn diagram

The next section covers some of the most common visualization techniques for diagrams.

168
Common types of visualization techniques for diagrams
Mostly, only words are counted in non-numerical data; thus, most visualization techniques for this type
of data are about words or concepts and the relationships between them. The most common visualization
techniques for non-numerical data are the following.

Word clouds

Word clouds or tag clouds are one of the most well-known


visualization techniques for non-numerical data. Word
clouds are often seen in websites and blogs to show
keyword or tag usage. A word cloud appears as a group of
words of different sizes placed together into a cloud
shape. The size of each word represents the frequency of
that word in the text. You can use word clouds to highlight
keywords in a text or to compare two different texts.

WORD CLOUD OF THE HOMEPAGE OF THE KING SAUD UNIVER-


SITY WEBSITE BY HTTPS://TAGCROWD.COM/
Tree diagrams

A tree diagram is a visualization technique that has a start, root, or parent node, with branches emanating
from it. Each branch leads to a new node, and so on. Tree diagrams are used to make strategic decisions or
valuation calculations, or simply to show a classification, as each branch represents a mutually exclusive
decision. Each new node is created at a new level, and you continue moving to lower levels until you reach
the end, leaf, or child node with a concluding decision.

computer components

har dw are sof tw are

inp ut uni ts CP U out put uni ts system software application software

TREE DIAGRAM OF COMPUTER COMPONENTS

169
Session Visualizing Non-Numerical Data

Flowcharts

As described in chapter two, flowcharts are a visualization technique to represent algorithms and
processes. As algorithms contain series of computational operations to solve a problem, they can be hard
to understand and track within a text description. A flowchart’s role is to convert the algorithm into an
easy-to-understand-and-track diagram. Flowcharts use different shapes and connections. Each shape
represents a different type of operation, and each arrowhead connector represents the direction of the
steps. There are two main types of flowcharts: program flowcharts represent a single problem unit to
achieve a result, and system flowcharts represent multiple problem units interacting to achieve a goal.

Start

A represents the first number


INPUT A,B B represents the second number

S (A+B ) S represents the sum

AVG S/2 AVG represents the average

PRINT AVG

Stop

A FLOWCHART TO SHOW THE AVERAGE OF TWO NUMBERS

JPEG
Venn diagrams GIF
Venn diagrams are also known as set diagrams because
Smaller
each collection of entities represents a set. In Venn Limited File Size
diagrams, each set is drawn within a circle, and if two Loosy,
Color Palette No Transparency
sets intersect, it means that one or more entities occur
in both sets. The entities outside the intersection area WEB
represent the differences between sets.
Lossless,
SAFE
Large
Transparency
Color Palette

Larger
File Size

PNG
THE DIFFERENCES AND SIMILARITIES AMONG THREE TYPES OF IMAGES

170
Venn diagrams are also used in mathematics to represent possible logical relationships between sets.

A B A B

A B A B

A B A B

A B A B

LOGICAL RELATIONSHIPS BETWEEN TWO SETS

Examples of diagramming applications


Visio software is a Microsoft Office application and one of the most
commonly used tools to create different types of diagrams. However,
other, more affordable applications exist with great features, such as
SmartDraw, Lucidchart, and Dia.

The next section will introduce Dia software in detail.

Overview of the Dia application

Dia is a diagramming application that can be used to make a large variety of diagrams. Dia is easy to learn
and flexible enough to allow power users to create highly customized diagrams. It has many excellent
features, such as the following:

1 Dia is free

2 It allows multiple page printing

3 It can be exported to many formats (.eps, .svg, .cgm, and .png)

4 It allows the user to create custom shapes

171
Session Visualizing Non-Numerical Data

Interface of Dia

1 4

As you can see, the main interface of the Dia application is simple and easy to explore.

1 Ribbon

The ribbon has all the commands you need to deal with the file, canvas, and objects. The ribbon has several
tabs, and each tab includes a group of commands.

File tab: Includes commands that deal with files, such as new, open, save and export

Edit tab: Includes commands such as do, undo, copy, cut, and paste

View tab: Includes commands concerned with the appearance of the canvas

Layers tab: Allows you to distribute objects into multiple layers on your canvas

Allows you to control objects in ways such as send them back, bring them
Objects tab:
forward, or group them together

Select tab: Includes options for object selection

Tools tab: Includes all control tools in the toolbox, such as modify, text edit, and magnify

172
2 Toolbox

The toolbox contains three parts:

Includes all tools under the Tools tab,


Basic objects:
such as modify and edit text

Allows you to select a sheet of special


Listbox:
objects based on the desired diagram

Allow you to control the foreground,


Controls: background, line width, and line style
of the diagram

3 Canvas The canvas is where all the objects and diagrams are placed. You control
the properties of the canvas in the View tab.

4 Rulers The rulers allow you to align objects on the canvas and know how big the objects and canvas
are. There are both a horizontal and a vertical ruler.

What can I do with Dia?


Dia software allows you to draw many types of diagrams, such as flowcharts, networks, and UML (Unified
modeling language) diagrams.

The next sections provide example of drawing a flowchart using Dia.

Start
How to create a flowchart? A represents the first number
INPUT A,B B represents the second number
As you learned in chapter 2, you can draw a
flowchart using several shapes. Each shape
represents a specific action. For example, the S (A+B ) S represents the sum
oval shape is used to represent the start and
the end of an algorithm. AVG S/2 AVG represents the average

Now, let’s draw the previous example of the


PRINT AVG
flowchart to calculate the average of two
numbers, using Dia.

Stop

173
Session Visualizing Non-Numerical Data

1 From the sheet’s drop-down menu, select “Flowchart”

Once you select the flowchart sheet, you will see all the objects that
relate to flowchart diagrams.

2 Select the circle shape to represent the first step in the algorithm, “Start,” and draw an oval shape
on the canvas. Then click on the text edit tool to write “Start” inside the shape.

174
Select the input/output shape from the objects and draw the shape for the input of the two
3 numbers. Then click on the text edit tool to write “INPUT A, B” inside the shape.

4 To connect the two shapes, select the line from the toolbox and draw an arrow between the two
shapes. If the line connects to the edge of the shape correctly, the shape will be highlighted in red.

You can then control the style of the beginning and end of the
arrow from the tools at the bottom of the toolbox.

5 Repeat these steps to complete the flowchart.

175
Session Visualizing Non-Numerical Data

Apply

Activity
1 Now try to re-represent Table 1, using a suitable diagram in Dia.

Activity
2 Re-draw the network types (PAN, LAN, MAN, and WAN) from chapter 4 by using the
network sheet in Dia.

Activity
3 With your friend, use any search engine to find more diagrams to visualize non-nu-
meric data, other than the ones you have learned about in this session.

Activity
4
Choose TRUE or FALSE for the following statements.
a) The visualization technique depends on the purpose of the data visualization and
the type of the concepts.
( ) True ( ) False

b) Fishbone diagrams are used to demonstrate the process of accomplishing a task.


( ) True ( ) False

c) The size of the word in a word cloud represents the importance of that word in
the text.
( ) True ( ) False

d) The intersection area in a Venn diagram shows the common entities between
two sets.
( ) True ( ) False

176
Closing

In this session, you learned:


The definition of a diagram.
The criteria to consider in choosing the appropriate diagram for particular data.
Different types of visualization techniques.
The basic skills to use Dia software.

177
Session Data Dashboards

Session

Data Dashboards

178
Goal

In this Session, you will learn


how to design and create a dashboard using Tableau.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Understand the meaning Differentiate between the Create a dashboard using


of a dashboard. types of dashboards. Tableau.

1 2 3 4 5

Know the advantages of Design a dashboard.


dashboards.

179
Session Data Dashboards

Be prepared

For a long time, people relied on spreadsheet software not just to process
numbers and do calculations, but also to represent numbers in a visual format.
Nowadays, with the rapid growth of data sources, spreadsheet software is no
longer adequate. The dashboard is a powerful tool in the business intelligence field
that fills this gap. The idea of a dashboard itself is not new; however, dashboard
features and their ability to be more interactive have evolved and are now key to
their success. In this session, you will learn about the different types of
dashboards, how to design dashboards to answer specific questions or measure
specific key performance indicators (KPIs), and how to create a dashboard using
Tableau software.

List of Terms

Term Explanation

KPI (Key Performance A measurable value that indicates a company’s progress towards its goals
Indicator)

Metric A quantifiable and measurable unit within a KPI that tracks processes

A single visual display combining data from several sources to track the business
Dashboard
KPIs, metrics, and key data points

Daily web overview


An operational dashboard that monitors the daily performance of a website
dashboard

SaaS (Software as a A strategic dashboard mostly viewed once a day by executives to monitor their
Service) business performance

MRR (Monthly Renewal An analytical dashboard mostly used in the accounting department to predict the
Rate) new trends

180
Learn

What are KPIs and metrics?


Before learning about dashboards, we will first need to understand the most important factors used in
dashboards, i.e. KPIs and metrics.

A KPI is a measurable value that indicates a company’s


progress towards its goals and how well that company is
achieving its key business objectives. Selecting the right KPIs
for measuring a company’s success is an important need for
any organization.

A metric is a quantifiable and measurable unit within a KPI


that tracks processes. With the help of metrics, you can track
the activities and performance of a set target.
2016 2017 2018 2019

What is a data dashboard?


The dashboard is a single visual display combining data from several
sources to control the health of a business, a department, or a
process, by monitoring the business KPIs, metrics, and key data
points. The word “dashboard” originates from the car dashboard,
where the driver of a car can see all the major functions of the car at
a glance. A business dashboard is an information management tool
that provides answers to the questions of the decision makers by
tracking and analyzing business performance and helping them make
the right decisions.

181
Session Data Dashboards

What are the advantages of dashboards?


A dashboard is a powerful business intelligence tool that provides many advantages which a single chart
or graph cannot provide. Some advantages of dashboards are that they can:

1 provide all the information about your business at a glance


2 track the organization’s goals and progress
3 easily identify the parts of the business that require immediate attention
4 provide an overview of business status as well as detailed reports

Characteristics of Dashboards
Customizable
There are several types of dashboards, including operational, strategic, and analytical
dashboards. The differences among these three types depend on the type of information
and level of detail in the dashboard report. As a result, each dashboard type targets
different teams and different business departments. In this section, we will learn about
dashboard types, what type of information each contains, and which teams will benefit
from each type of dashboard.

All-in-one
By using the dashboard tool, you can represent all data analysis in one place. This gives
a valuable advantage over the old-fashioned method of reviewing huge reports to
reach conclusions.

182
Level of detail
Having everything at a glance does not mean you are limited to shallow data at all. You
can drill into details and show as much information as you need in a dashboard by
including the required objects and variables.

Easy to use and understand


Most dashboard software is easy to use, and special training is not required. The
software uses drag-and-drop features to create charts or graphs. You can also import
data from different data sources, such as spreadsheets or databases. Users can easily
understand dashboards because software developers have paid a lot of attention to
the graphic design of the software.

Accessibility
In an era of speed and competitiveness, especially in business sectors, accessibility to
data matters. A crucial advantage of dashboards is that they are accessible from
anywhere and at any time, even on mobile devices.

Types of dashboards
There are several types of dashboards, including operational, strategic, and analytical dashboards. The
differences among these three types depend on the type of information and level of detail in the
dashboard report. As a result, each dashboard type targets different teams and different business
departments. In this section, we will learn about dashboard types, what type of information each
contains, and which teams will benefit from each type of dashboard.

Operational dashboards (where are we now?)


An operational dashboard is a reporting tool that tracks business metrics and KPIs. The content of opera-
tional dashboards changes quickly and frequently, and the data used to create it is updated from one
minute to another. Thus, it is shown several times a day to measure improvements toward predefined
goals. A dashboard that monitors the daily performance of a website (daily web overview dashboard) is
an example of an operational dashboard. Usually, this type of dashboard is used by a digital marketing
department.

183
Session Data Dashboards

Strategic dashboards (how are we doing?)


The strategic dashboard is a business intelligence tool that tracks the performance of the business by
measuring different KPIs. The data in a strategic dashboard changes, but these changes are less frequent
than in operational dashboards. Viewing it once a day is generally enough. It is typically used by executives
to keep on top of business KPIs and monitor the performance of their businesses. The SaaS (Software as
a Service) dashboard, which is mostly used by CEOs, is an example of a strategic dashboard.

Analytical dashboards (where we are going?)

The analytical dashboard could be either an operational dashboard or a strategic dashboard. However, it
has drill-down functionality, which allows the analysis of large amounts of data to discover new insights,
view trends, or predict conclusions. The analytical dashboard is the most common type of dashboard
because the designer and developer of the analytical dashboard is a data analyst. Analytical dashboards
need accurate and up-to-date data to provide accurate predictions. However, the data is not updated
very frequently. The MRR (Monthly Renewal Rate) dashboard, which is mostly used in the Accounting
department, is an example of an analytical dashboard.

184
Designing the dashboard
Designing a dashboard is an art. While designing dashboards, keep in mind that you are communicating
important and large amounts of data which need to be readable at a glance.

Try to make complex data simpler.

Design your dashboard to tell a clear story.

Know your data well to transfer it into a meaningful and informative dashboard.

Choose the right KPIs (this is an especially important skill).

To Achieve Successful Design


Identify your audience

First, think about your audience. Successful dashboards target a specific team in
the business. Once you know who your target team is, it will be easy to pick the
data that is most useful to them and that they really need to know. For example,
if the executive managers of the business are your audience, then your data
should provide a good overview of business performance by choosing KPIs and
metrics such as periodic revenue or cost comparisons.

Choose the right dashboard type

Next, you will need to decide which dashboard type is most appropriate to
represent the selected data to your audience. As we discussed in the
previous section, there are three main types of dashboards: operational
dashboards, strategic dashboards, and analytical dashboards. Each type
is designed to represent specific data to specific teams in the business.
For example, if you want to represent data from everyday operations
such as website monitoring, or sales data such as the number of calls or
appointments, then the operational dashboard would be your best choice.

Order your data and use space effectively

When you have different groups of data in your dashboard, pay attention
to their logical order. For example, part of your data may be related to
marketing, while another part is related to sales. Make sure that the
marketing data is grouped and ordered logically and that the same
approach is taken with the sales data. Additionally, you need to use the
space on the dashboard effectively. For example, do not save the top left
corner of your dashboard for the business logo. The top left corner is the
first space in your dashboard that attracts the attention of western
language speakers, as their languages are read from top to bottom and
from left to right. Thus, keep this space for an important piece of data.

185
Session Data Dashboards

Connect the data with the audience

This rule depends on the size of the business. For a small business, you may
choose to create a single strategic dashboard for the executive manager and
the heads of departments. In this case, the dashboard contains several KPIs
for different departments. Each person in the audience will find the required
data for his department. For a large business, the situation is different. Each
department will have a separate dashboard with their required data. In either
situation, if you have a mixed audience, make sure that you identify the data
requirements for each group while keeping in mind the scope of the whole
business, each department, and each individual.

Just relevant and important data

The rule here is simple and easy to follow. Include in your dashboard just the relevant and
important data. Do not include items just because you can, or to fill a space. Irrelevant and
unnecessary data would distract the attention of your audience from the important
message that you want to convey. There is no golden rule to the amount of data you should
include on a dashboard; however, you can figure out what important data to include by
identifying your audience and their data requirements.

Identify the refresh rate

Deciding how often you will need to refresh the data on the dashboard before actual
development will save you time and effort while designing the dashboard and sourcing the
required data. The type of dashboard could help in this matter. For example, if you intend to
design an operational dashboard, you need real-time data, so the data refresh rate will be
quite high. However, a strategic dashboard needs less frequent data refresh.

Examples of dashboard tools


The main rule of business intelligence software is to simplify complicated data and transform it into a form that
can be used across all departments in the organization. The transformation process is highly impacted by the
business intelligence tool being used as well as by user capabilities. There are many available software tools to
help you develop professional dashboards, such as Tableau, Zoho Reports, Segment, and Sisense. Tableau is one of
the most powerful professional business intelligence tools for dashboarding. The next section discusses the
reasons for choosing Tableau.

Why Tableau?
Tableau has been trusted by more than 50,000 users around the world for many reasons.

1 Tableau is an easy tool that is both fast to learn and to apply. You do not need to code anything, as any
function can be applied by drag-and-drop features. In addition, there are many built-in features that allow
you to manipulate data easily, such as table calculations and connection to programming languages such as
R and Python.

2 Tableau can connect to more than 40 types of data sources. These include file-based data sources such as
Excel or CSV files, relational databases such as Teradata or SQL Server, and cloud-based data sources
such as Google Analytics.

186
3 Tableau allows users to create a dashboard that is automatically updated when the source data is refreshed.
This feature allows the user to share real-time data with teams who need minute-by-minute updated data,
such as the marketing team.

Tableau has strong community support, represented by the Tableau community, Tableau bloggers, and many
4 online training courses. These rich resources provide inspiration and solutions for many issues, from selecting
the most appropriate version of Tableau to the most advanced design issues.

Tableau offers several products to meet different needs. These products are Tableau Desktop (Personal),
5 Tableau Desktop (Professional), Tableau Server, Tableau Reader, Tableau Public, and Tableau Online. To
choose the most appropriate product for your needs, you must understand four terms:

Connectivity the ability of the product to connect to different data sources

Distribution the limitations of the product on sharing dashboards with others

Automation the ability of the product to update the dashboard based on refresh rates of the data sources

Security the level of security (on- or off-premise) that the product provides

The table below compares the different Tableau products against the features of connectivity, distribution,
automation, and security. This table is adopted from the book Practical Tableau: 100 Tips, Tutorials, and Strategies
from a Tableau Zen Master by Ryan Sleeper, 2018.

Tableau Features
products
Connectivity Distribution Automation Security

- Excel
- Text files
- Access Statistical files - Offline or Depends on your
Desktop - Tableau Public Not available computer/
- Shape files
(Personal) server security
- Spatial files
- Tableau files

All possible
All possible Depends on your
Desktop distribution
connections in Not available computer/
(Professional) options in
Tableau server security
Tableau

Depends on your
Tableau
.twbx files only Offline Not available computer/
Reader
server security

187
Session Data Dashboards

Limited; you have


control over
- Excel Cloud (public) Not available downloading your
Tableau Public - Text files file; however,
anyone on the web
can see it

Workbooks that Available via data Depends on Tableau’s


Tableau Online have been published Cloud refresh schedules third-party host
to Tableau Online

Workbooks that Available via Depends on your


Tableau Server On-premise or
have been published data refresh on-premise or server
in the cloud
to Tableau Server schedules host’s security

We will work with Tableau Public as our product of choice in the next practical section.

How to create a dashboard using Tableau


Connecting to data in Tableau

Once you open Tableau, you will see the


following screen:

On the left is the data pane showing the


various data connection options. These
options allow you to import data into
Tableau. In this section, click on Microsoft
Excel, then choose the Excel file
“Saudi-Superstore.xls”. You will be
presented with this screen:

188
Drag the sheet “Orders” to the upper empty space of the screen. You will get this screen:

You will notice a difference between the first few rows in the Tableau sheet and the Excel sheet. However,
we can fix this by using the Tableau Data Interpreter.

Data Interpreter

189
Session Data Dashboards

Click on the Data Interpreter option to get the following cleaned data:

Data visualizations

Once you have imported the dataset, you will have a “Go to Worksheet” option at the bottom left of
the screen:

190
Click on Sheet1 to move to the following screen, where you will develop all the graphs:

Before we go any further, we should explain some terms in the graph screen.

Dimensions Dimensions are fields that represent the headings of rows or columns. These fields mostly contain
a string of discrete values, which cannot be aggregated. An example of a dimension is city name.

Measures
Unlike dimensions, measures represent fields that contain numerical or continuous values. Thus,
you can aggregate and measure the values. Example of measures are sales or profits.

Shelves

Pages shelf

Rows and Columns shelf

Filters shelf

Marks shelf

191
Session Data Dashboards

If you intend to draw a chart in Tableau, the rows and columns shelf represents your x
Rows and Columns shelf
and y chart axes.

The pages shelf allows you to see dynamic changes in the data by shifting from page to
Pages shelf page to represent changes in data values between pages.

The filters shelf allows you to see the part of the data that you are interested in. For
Filters shelf example, if you are interested in the profit of each branch rather than the total profit of
the whole company, you would use this shelf.

The marks shelf allows you to annotate your data. For example, you may choose to
Marks shelf
represent your data using different shapes or sizes.

Show me

Show me is one of the most important features in Tableau. Once you drag and drop your dimensions
and measures, Tableau will create a default graph according to the number and type of dimensions and
measures. However, you can change the graph type using the Show me pane.

Create a map chart

To create a map chart, you first need to make sure that the geographic role of Administrative region is State/Province.
Then drag Administrative region (locations) onto the empty space in the middle of the screen.

192
If Tableau does not recognize the location of the Administrative regions on the map, you will get this screen:

You can fix the unknown locations by clicking on the “unknown” icon in the bottom right corner of the screen and choosing the
first option, “Edit Locations”:

Enter the name of the country “Saudi Arabia” in the dialog box, then click OK:

193
Session Data Dashboards

Now you will get a map of Saudi Arabia with small circles on it:

Next, drag Profit in the same way as you did Administrative regions. You will notice that the circle sizes change to reflect the
difference between the profits of the different administrative regions. This map is called a symbol map.

Now we will convert the symbol map to a map of the administrative regions colored in different shades to
represent the different profit values.
From the Show me pane, select Map.
Now drag Profit again, but this time you need to drag Profit onto the Label icon in the Marks pane. Then
you will get the following screen:

By right clicking on sheet1, rename this sheet to be “Map”.


Now let’s create another graph to add to our dashboard.

194
Create a new worksheet

To create another graph, you need to open a new worksheet by clicking on the bottom left corner:

You will get the following screen. Rename this worksheet to “Bar chart”.

Create a bar chart

Now let’s create a bar chart to represent the product subcategory sales in the new workbook. To do this:
Drag Sub-Category to the row shelf.
Drag Profit to the column shelf.

Then, from the Show me pane, choose Horizontal Bars to get the following screen:

195
Session Data Dashboards

To add some customization to the bar chart, drag Sales to the Color icon in the Mark shelf.

Create a scatter plot


To create a scatter plot, first open a new worksheet as you did for the bar chart and rename it to “Scatter
plot.”

Then, drag Sales onto the row shelf and Profit onto the column shelf. At this stage, you will see one small
circle that represents the total sales and profits for all administrative regions.

To represent sales and profit for each administrative region, drag Administrative regions onto the
current graph. The single circle will now scatter into multiple circles representing the different
administrative regions.

196
Now drag Administrative regions again, but this time onto the Label icon in the Marks pane to label each
circle on the scatter plot graph:

By now, you are ready to create your dashboard.

To create your dashboard, you need to combine all your graphs and charts to convey a message. To do
this, follow the following steps.

Click on the window symbol at the bottom of the screen to create a new dashboard.

197
Session Data Dashboards

The left side of the screen will now display a list of all the sheets that you have created so far. You can
combine any of these sheets to create a dashboard. In this example, we will drag all three sheets to the
empty area in the middle of the screen to create the following dashboard:

After creating your own dashboard, you can still change the position of the graphs and charts until you
get the desired visualization.
Furthermore, any changes you make in the worksheets after you have created the dashboard will still be
reflected in the dashboard.
Once you have created your dashboard, it is a good idea to add a filter to one of the charts so that you can
see the sales and profit of one administrative region at a time. To do this:

Click on the small arrow on the right of the graph that you want to convert to a filter. From the drop-down
menu, choose the Use as Filter option.

198
For example, if you apply the filter option to the map graph, you will get the following visualization:

199
Session Data Dashboards

Apply

Activity
1 Visit the following website for more online training and videos:
https://www.tableau.com/learn

Activity Fill in the blanks with the appropriate words provided below.

2 (strategic , analytical , operational , KPI )

a) A ____________ is a measurable value that indicates a company’s progress towards its


goals and how well that company is achieving its key business objectives.
b) The ____________ dashboard is a reporting tool that tracks business metrics and KPIs.
c) The ____________ dashboard is a business intelligence tool that tracks the performance
of the business by measuring different KPIs.
d) The ____________ dashboard needs accurate and up-to-date data to provide accurate
predictions.

Activity Choose TRUE or FALSE for the following statements.


3 a) Dashboards can easily identify which parts of the business require a) True
b) False
immediate attention.

b) The operational dashboard quickly and frequently changes its data; it is a) True
updated from one minute to the next. b) False

c) The strategic dashboard is a business reporting tool; it tracks the a) True


performance of the business by measuring different KPIs. b) False

a) True
d) Dashboards can display large amounts of data which are readable at a glance.
b) False

e) It is not necessary to choose the right dashboard type for the selected data. a) True
b) False

200
Closing

In this session, we have learned:

What a dashboard is.


Types of dashboards.
Advantages of dashboards.
Designing dashboards.
How to create a dashboard using Tableau.

201
Dr. Amani k. Samha

202
Aim
The main aim of data communication and networking is to enable continuous exchange of
data between any two points in the world. This exchange of data takes place over a computer
network. This chapter introduces basic concepts such as data, information, communication, and
computer networks. It describes how different data is communicated via computer networks.
Then it discusses how the data is stored in different storage units, how the data is protected and
backed up, and finally how the data is restored, along with an illustration of the best practices.

Learning outcomes
Upon successful completion of this chapter, the student will be able to:

Understand data communication within the network environment.

Understand the principles of computer networks.

Understand the pros and cons of various data storage units.

Backup data via different strategies.

Restore data from backup.

Contents

Overview of Data Communication and Network

Data Storage

Data Backup

Data Restore

203
Session Overview of Data Communication and Network

Session

Overview of Data Communication


and Network

204
Goal

In this session, you will learn


the main concepts of data communication, different types of data, and how data is transferred
via a network.

Learning objective

Dear Student
By the end of this Session, you should be able to:

Differentiate Define the main Define computer Differentiate between


Know how
between data terms of data networks and list different types of
data flows.
and information. communication. their properties. computer networks.

1 2 3 4 5 6 7 8 9 10

List and distinguish Understand the List the benefits Explain the
List the characteristics
between different components of a data of computer components
of data communication.
data types. communication system. networks. of a network.

Be prepared

Networks are popular these days; it is hard to do anything with data without a network. Two or more computers connected
to share resources (a printer, for example) are called a computer network. Networks are designed to exchange files and
share resources between different users and uses, allowing businesses to expand, grow, and save money. To use computer
networks efficiently, users need to understand what data to share and how to transfer that data as useful information.

This session introduces the topic of data communication—how data is exchanged and sent from one place to another via a
network. Networking is the process of communicating data remotely through connected devices and media. This session is
structured to introduce the main concepts of data communication and networking, and to illustrate different types of data
and its flow from one point to another.

Prerequisites
Before starting this session, you should know the basic concepts of a computer, the internet, and operating systems.

205
Session Overview of Data Communication and Network

List of Terms

ASCII American Standard Code for Information Interchange.

The rules or process that specify what is communicated and how it is communicated;
Protocol
acts like a translator

Simplex Sender transmits the data; the other device acts as a receiver only

Half-duplex Each device can transmit and receive the information, but not at the same time

Full-duplex The sender and receiver devices can transmit and receive the information,
simultaneously
The variance in the arrival time of the data packets in milliseconds (ms) over a
Jitter
communication network

PAN Personal Area Network

CAN Campus Area Network

LAN Local Area Network

MAN Metropolitan Area Network

WAN Wide Area Network

Server Enables users to access all network resources

Network Interface Card Electronic device (card), which allows a connection to the network

Operating System Software needed on client and server computers to communicate over the network

Hub Hardware device that splits the network connection and distributes it to multiple
computers

Router Hardware device used to share a single internet connection to multiple computers

Ethernet Cable Network cable used to connect different devices to the internet

206
Learn

Data and Information

Data is defined as a collection of raw facts, figures, or statistics, which are collected and processed
to deduce information, which in turn is used to make decisions. The raw facts (or factual information)
and statistics are first represented in the computer as quantities, characters, or symbols; any
necessary operations are then performed, and the output is stored and transmitted in the form of
electronic signals and finally recorded on a media device.

For example
some companies obtain people’s opinions by collecting data via distributed surveys. This data is collected, in whatever form
the people provide it, and the data needs to be summarized into reports to be presented to management (decision makers).
The managers then make important decisions based on the data collected through surveys and the reports prepared from
the data.The following figure illustrates the process, from data transmission to information.

Data Survey Processing Summarizing Information Reports

Types of Data
Data comes in different forms that a computer can take as input and then process to produce information as output.

Text
Text is a sequence of alphabetic and other characters, each of which LETTER ASCII CODE BINARY
is represented as a binary bit pattern (0’s and 1’s) or a code. It 107
k 01101011
includes combinations of alphabets, both lowercase and uppercase. K 075 01001011
These are stored and populated using an encoding system called s 115 01110011
“ASCII” (American Standard Code for Information Interchange). S 083 01010011
Each text symbol is a different bit pattern, and each character u 117 01110101
occupies one byte (which is eight bits) that is made up of numbers. U 085 01010101

For example:
the abbreviation for King Saud University is “KSU” and the codes representing it are in the following table.

Numbers
Numbers include all combinations of digits from 0 to 9. Numbers are also represented by bit patterns. However,
numbers do not use the ASCII table, because they are directly converted to binary numbers, to simplify mathe-
matical operations.
Images
Images are also represented by bit patterns. An image is composed of pixels, where each pixel is a small dot. Its
size depends mainly on the image resolution—the higher the resolution, the more memory the image occupies.

207
Session Overview of Data Communication and Network

Audio
Audio refers to sound or music. It is different from the previous data types because it is not discrete, but
continuous.

Video
Video refers to a continuous data that is being broadcast or recorded, as a combination of audio, such as sound
or music, and a sequence of images. For example, output from a TV camera.
After we discuss data and its types, the following section will show how the different types of data are communicated.

Data Communication Systems


The process of transmitting and exchanging data and information is
called “data communication.” This process involves communication
between “hardware” and “software” devices, which are called “the
communication system.” Hardware, as discussed in Chapter 1,
involves the devices of the sender and the receiver.
The communication system involves communication between “peripherals,” which are the computer’s hardware and
software devices. The hardware devices of the sender, receiver, and intermediaries are used to pass and transmit the data.
The software involves rules that specify what is communicated and how it is communicated. These rules, or processes, are
called a protocol.
PROTOCOLS

ENCODE DECODE
RULE 4.. RULE 1..
RULE 5.. RULE 2..
RULE 6.. MESSAGE RULE 3..
SENDER RECEIVER
SOURCE HOST

Components of a Data Communication System


The data communication system consists of five main components, which are as follows:

SENDER 4 MESSAGE RECEIVER


1 2
3 MEDIUM
SET OF RULES SET OF RULES
AGREEMENT BETWEEN THE COMMUNICATION DEVICES
5 PROTOCOLS
1 - Sender
The sender is the hardware device that sends the message. It can be a computer, telephone handset, workstation, video camera, or
any other device that can send data. Normally, a computer is used as the sender in information communication systems.

2 - Receiver
The receiver is a device that can receive a sent message. It can be a computer, workstation, telephone handset, television, printer,
fax machine, or any other computer-related device. The receiver must be capable of accepting the message.

208
3 - Transmission medium
The transmission medium is the physical path that connects the sender with the receiver, which is used to transmit data between
the sender and receiver. It can be wires, such as twisted-pair, hub, cables, or optical fiber, or it can be wireless, such as microwaves
and radio waves.

4 - Message
The message is the actual data or information to be communicated between the sender and receiver. The message may include all
data types. Some data will be converted, depending on its type. For example, text is converted into binary, and images into pixels,
whereas the other types will be sent as it is.

5 - Protocol
When two devices establish a connection, no communication can be accomplished without an agreement on the rules that will be
followed during this communication. Therefore, when two devices communicate, they need an agreement; this agreement, called a
protocol, is a set of rules that encode and decode messages and govern and control message transmission between computers on
the network.

Data Flow
The data flow describes the direction of the messages sent via a communication channel. The communication between the
sender and receiver devices, no matter what data type is sent, can follow one of the following three data flow modes.

DIRECTION OF THE DATA


a - Simplex
As shown in the figure, simplex communication means that only
one device can transmit the data, and the other device will act as
a receiver only, so messages are sent in only one direction.
SENDER (DEVICE) RECEIVER (DEVICE)
Examples TV broadcasting; keyboards and monitors, where the keyboard provides the input and the monitor accepts it as output.

b - Half duplex
In half-duplex communication, each station can transmit and receive, but not at the same time. One station acts as the
sender and sends the message that the other station receives. This mode is used when there is no need to communicate in
both directions at the same time. Once the message has reached the receiver, the receiver can reply to the message.

DIRECTION OF THE DATA AT TIME 1

DIRECTION OF THE DATA AT TIME 2


STATION 1 STATION 2

Examples walkie-talkie, with a “push to talk” button that sends data with no reply needed at the send time.

c - Full duplex
As shown in the figure, full-duplex DIRECTION OF THE DATA ALL THE TIME
communication is when messages can be
transmitted from and received by both
stations/devices simultaneously. STATION 1 STATION 2

Examples the telephone and cell phone networks, where two people can talk and listen on the phone at the same time. It is
used when communication is required all the time.

209
Session Overview of Data Communication and Network

Data Communication System Characteristics


a - Delivery
The data system should deliver the message to the right destination and guarantee the receipt of the message by
the intended device.

b - Accuracy
The system must guarantee the accuracy of the delivered message. Data that is received is not altered in
transmission.

c - Timeliness
The system must deliver the data in a timely manner; late data delivery is useless. For some data types, timely
delivery means delivering the data as it is produced and in the same order (for example, video and audio). This kind
of delivery is called “real-time transmission.”

d - Jitter
Jitter is the variance in the arrival time of the data packets over the network. For example, when two computers
are communicating, both will transfer data packets. If the network is in good condition, the packets travel at equal
intervals, which allows the receiving computer to process the data. However, if there is a jitter in the intervals, the
process becomes disrupted.

Computer Networks
A computer network is an interconnection of a group of computer systems and other hardware at different locations. Two
or more computers are linked through a “data communication device” and a “medium” to share resources and information.

Properties of Computer Networks

Facilitate communication
By using a computer network, users can communicate easily and efficiently
via different communication channels. Examples include sending emails,
video conferences, and telephone calls.

Permit sharing
By using a secured network, authorized users can access files (data and
information) that are stored on any computer within the network.

Share network and resources


By establishing a network, all authorized users can access and use all
resources, such as printing services from a shared network printer.

Network Benefits

File sharing
By using a computer network, files can be shared between computers, which gives users flexibility to access
files remotely. Shared files can include photos, music, and documents. Users can use a home network to save
copies of important data on different computers, as well as to keep backup copies that can be retrieved when
needed..

210
Resource sharing
Using a computer network allows resources, which include software and hardware, to share peripheral
devices, such as printers, faxes, scanners, and copiers. It also allows sharing of software between multiple
users. For example, a small home network can share a single printer between multiple users, as well as sharing
a single copy of software.

Internet sharing
A computer network allows multiple users to use a single internet connection, which is cost-effective.

Increase storage capacity


A computer network allows authorized users to access files and multimedia remotely, instead of saving a copy
on each computer.

Multi-player games
A computer network enables friends and family to play together, simply by joining the same network.

Home entertainment
A computer network can be used by family to share home entertainment products, including video-game
consoles such as Nintendo and Xbox. Adding such consoles to the network enables internet gaming and video
sharing.

Improved communication for business


A computer network can be used by different parties related to a business, such as staff, suppliers, and
customers, to exchange instant information, improve communications, and share information easily and
efficiently. They can also access common databases, where data is securely saved via the network, thereby
saving time and preventing errors.

Categories of networks

Computer networks are categorized by purpose and size, where the size is determined by the number of
computers and the geographic area covered.

PAN - Personal Area Network


Sometimes called HAN (Home Area Network), these are networks organized around an individual within a small area,
usually a single building, allowing data transmission among devices. For example, uploading a photo from a personal cell
phone to the user’s desktop computer.

HEADSET
PRINTER

TABLET

DESKTOP DESKTOP MOUSE


COMPUTER COMPUTER

MOBILE

CAMERA TV

211
Session Overview of Data Communication and Network

LAN - Local Area Network


A group of computers located in a clearly defined geographical area, ranging from one floor of a building to a group of small
buildings on a single site.

DESKTOP CLIENT

INTRNET
FIREWALL
SERVER 1
DESKTOP CLIENT
HUB

ROUTER
SERVER 2

LAPTOP FAX
TABLET MOBILE RINTER

MAN - Metropolitan Area Network


A computer network that connects multiple LANs at different locations. A MAN may cover an area from around 3 to 30
miles (5 to 50 km). For example, it could connect different stores located in one city.

LAN

LAN MAN LAN

LAN

CAN - Campus Area Network


A network that is made up of an interconnection of LANs within a limited geographical area (somewhere between MAN and
WAN). For example, government agencies or a university, where each college within the university has its own network and
all networks are under the university umbrella.

BUILDING (2) NETWORK

BUILDING (1) NETWORK NETWORK BUILDING (3) NETWORK

INTRNET

BUILDING (4) NETWORK

212
WAN - Wide Area Network
A computer network used to connect large geographical areas, such as countries. The largest and most well-known such
network is the internet.

LAN

WAN

The following diagram shows a comparison between the types of networks.

WAN CITY TO CITY (100 to 10,000 km)

MAN BUILDING TO BUILDING (5 to 50 km)

LAN
CAMPUS (10 meters to 1 km)

PAN Room up to 10 m

213
Session Overview of Data Communication and Network

Network Components
Computer networks consist of several integrated devices, functions, and features, as follows.

Servers
Servers are computers that hold the main applications, files, and network operating system. Servers
enable users to access all network resources, with each server providing several functions:

print server, mail server, file server, application server, database server, and
for example
message server.

File Servers
provide file functions, such as storing and retrieving data, which allow users to read, write, exchange, and manage files.

Print Servers
provide printing functions on a network and can handle fax services.

Application Servers
help to reduce cost by sharing software resources, such as allowing users to share one copy of expensive software.

Database Servers
provide users access to strong, centralized databases.

Clients
Clients are users’ computers that use the network and its resources, requesting and receiving services
from the network.

FILE
SERVER DATABASE
CLIENT SERVER
CLIENT

SWITCH ROUTER SWITCH

REMOTE
NETWORK
CLIENT
CLIENT

214
Transmission media
Transmission media are facilities that are used to connect computers, such as twisted-pair
wire, cable, and optical fiber.

Network interface card


A network card is an electronic device (card) that is installed in a computer, which allows a
connection to the network. For example, lab computers are connected to a university LAN
through network cards.

Operating system
Every computer needs a local operating system to function, which allows users to access files,
print documents, etc. The network operating system is a second system, which is needed on
both client and server computers to communicate over the network. One example is Microsoft’s
Windows Server.

Hub
A hub is a hardware device that splits the network connection and distributes it to multiple
computers. It works as a center for distributing the connection and can receive multiple
requests and transmit them to the entire network.

Switch
A switch is a hardware device that connects multiple devices together to receive and process
data and to forward it to its destination. The switch works as a control unit in the electronic
circuit (on and off), where it connects network segments.

Router
A router is a device that is used to connect a computer to the internet, share a single internet
connection with multiple computers, and forward data between computers.

Ethernet cable
An ethernet cable is a network wire that is used to connect different devices to the internet or
to other devices on the network, such as printers.

Network applications
Applications are the tools that a computer uses to perform operations. The applications that are run on the computer and
are not connected to other computers are called “stand-alone applications.” Examples include word processors,
web browsers, spreadsheets, and presentation software. They function even if they are offline; for example, a document
written using Microsoft Word 2016 and saved to the computer would have both the program and file stored locally.

In contrast, “network applications” are tools and programs that utilize the internet or another network to perform
useful functions, such as file transfer from one point to another. Network applications use a client-server format, in which
both computers are connected to the network.

A server is programmed to provide services to a client, which can be a desktop, a laptop, or even an iPhone. The server
could be any of these, but it is typically a computer in the data center.
An example of a typical network might be a client computer running a web client program (web browser), such as Firefox,
Google Chrome, or Microsoft Edge, with the server running a web server program like Apache or Microsoft Internet
Information Server. Data can be saved locally on the client or on the server, but it operates over a network rather than on
either individual computer.

215
Session Overview of Data Communication and Network

Apply

Read the following cases and note down your responses in the boxes provided below.

1 - Differentiate between data and information.


Activity 2 - What are the characteristics of data communication?
1 3 - What are the components of a data communication system?
4 - Define computer network and categories.

• Make a group of 6 students and discuss the following topics: types of data, data communication system,
Activity data flow, network categories, transmission media.
2 • Based on the above topics, identify:
a - The type of data you send and receive using an E-Mail communication.
b - The communication system you use while chatting with a friend.
c - How the information flows from sender to receiver.
d - Which network category you use while connecting to the network at your home.
e - Which transmission medium you usually use.

Choose the correct answer for the following questions:


a - Simplex
Activity
b - Half-duplex
3 1 - The communication mode in which the message can be transmitted and c - Full-duplex
received from both stations/devices, simultaneously, is d - Duplex

a - Protocol
2 - A set of rules that encode and decode the message and that govern and b - Message
control message transmission between computers on a network. c - Sender
d - Receiver

a - Accuracy
3 - The variance in the arrival time of the data packets in milliseconds (ms) b - Timeliness
over the network. c - Jitter
d - Delivery

a - MAN
4 - A computer network that is organized around an individual person b - WAN
within a small area, usually a single building. c - PAN
d - INTERNET

a - Router
5 - A hardware device that splits the network connection and distributes b - Hub
it to multiple computers. c - Network interface card
d - Ethernet cable

216
Closing

Dear student, you have learned the main concepts of data communication and networking,
as shown in the following diagram:

Data Communication and Networking

Data and Information Data Communication Data Communication System


Data Flow Computer Network
System Characteristics

Data Types Network Components

Network Benefits

Properties of Computer Networks

Network Applications

Network Categories

217
Session Data Storage

Session

Data Storage

218
Goal

In this session, you will learn


about different local, remote, and external types of data storage, along with their advantages
and disadvantages, and how data can be compressed.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Differentiate between Practice using different remote Practice data compression


different data storage units. storage units. in Windows 10.

1 2 3 4 5

List the advantages and disadvantages Understand the importance


of data storage units. of data compression.

Be prepared

The ability to store and access data is a vital part of our daily lives. Every day, we interact with countless pieces of data
and information stored across a variety of media, from USB drives to DVDs to the Cloud. The concept of data storage
began more than a century ago, starting with punch cards, which were used to communicate information to equipment
until electronic computers were developed. Punch cards were eventually replaced by magnetic and optical storage
technologies—revolutionary forms of data storage. The amount of data and information is continuously growing, now
measured in terms of gigabytes and terabytes instead of kilobytes and megabytes.

This session introduces data storage units, including local, external, and remote data storage (the Cloud). It then discuss-
es their advantages and disadvantages, lists data storage capacities, and reviews how to compress files and folders in
Windows 10 to reduce costs and to save storage space.

219
Session Data Storage

Prerequisites
Before starting this session, you should have a basic knowledge of different types of data and how to access the internet.

List of Terms

Portable External Hard Drive Magnetic disk drive that is plugged into the computer via a USB

Local Storage Storage devices that are locally embedded with the computer

Random Access Memory, holds the frequently required instructions and data
RAM that the processor is currently working on

Read Only Memory, a built-in memory chip that contains instructions,


ROM initially used by the computer for the booting process

HDD Hard Disk Drive, a low-cost, high-capacity permanent physical storage medium

CD Compact Disc, optical plastic discs that stores up to 700 MB of data.

Digital Versatile Disc or Digital Video Disc, optical plastic discs having
DVD
capacities from 4.7 GB to 17 GB

Blue-Ray Optical Disc, stores large amounts of data, specifically


BD-Optical Disk high-definition videos

Magnetic Storage A storage method that stores the data in the form of magnetized dots

Floppy Disc An older storage device that holds up to 1.44 MB of data

Flash Drive A pen drive memory unit, data stick, keychain drive, etc.

Memory Card (SD - Secure Digital) A flash memory card that is used to store images, videos, and other digital data

Cloud Storage Data storage on internet servers

Cloud storage service provided by Google, provides the users with the ability
Google Drive
to share files online with anyone at any time

Cloud storage service provided by Dropbox, synchronizing the contents with


Dropbox the Dropbox server and other devices of the user

Online cloud storage service provided by Microsoft; allows you to store files
OneDrive in the cloud and access and share them anytime, anywhere

KSU Storage Cloud storage service provided by King Saud University

Conversion process in which the file size is reduced by using a particular


Data Compression
compression technique.

220
Learn

Data Storage

Data storage refers to the ways of using recording media to store data in a computer or other storage
devices, in digital format. A storage device is an electronic memory device used to store and extract data,
media, and other types of files.

Types of Storage
Data storage can be categorized based on its physical storage units, as follows.
Local Storage
Data stored on storage devices that are locally attached to the computer. For example, hard drives (both internal and
external).
1 - Portable external hard drive
A portable magnetic disk drive that is plugged into the computer via a USB or FireWire cable.

2 - Desktop external hard drive


Has the same functionality as a portable drive, but is designed for stationary use.
The major difference between these drives is that the portable drive does not need a powered connection, as is it powered
by the USB, whereas the desktop drive needs a separate power connection.
The following table lists some advantages and disadvantages of using local storage devices.

Advantages Disadvantages

Convenient to setup, with plug and play devices Bulky; as they take up much space; typically inconvenient

Compatibility with different operating systems, such as Prone to failure, and can be wiped out by electrical surges
Windows, Linux, and Mac OS

Cost effective; the cheapest storage device option Security issues: not reliable as portable discs

Astounding storage capacity. May be damaged if dropped

Internal storage
A system component embedded within the computer and used for storing data and programs.
Primary Storage (Primary Memory)
Primary memory is where data and programs are kept on a short-term basis and made accessible to the central processing
unit (CPU). Primary memory is also known as the “main memory” of the computer. It is smaller in size and closely connected
to the processor. It consists of two memories:

221
Session Data Storage

1 - RAM (random access memory)


RAM is also known as volatile or temporary memory, as it needs a constant power supply. It
holds the frequently required instructions and data that the processor is currently working
with. The computer can access it randomly at any time, and it is used to run applications, such
as Microsoft Office.

2 - ROM (read-only memory)


ROM is also known as non-volatile memory and holds instructions that cannot be modified, but
only read by the processor. It retains its data even if the device is not powered on. It is a
built-in memory chip that contains instructions used by the computer for the initial booting
process.

Secondary Storage
These storage devices have large capacities to store data for a long period of time. A hard disk
drive (HDD) is a low-cost, high-capacity physical storage medium that permanently stores the
operating system files, software applications, user’s personal files, etc. Its storage capacity
can range from 120 GB to 4 TB, and the upper limit is gradually increasing. Data is recorded
magnetically onto a hard disk; rapidly spinning platters, which are divided into tracks and
sectors, are used as the recording medium. The electromagnetic heads are placed just above or
below the surface of the platters and are used to read data from, and write data to, the
platter. The hard drive spins thousands of times per minute.

The internal hard drive is considered the main long-term storage device, while external hard
drives and other external media are additional storage devices. Primary and secondary
storage refer specifically to the components inside the computer; RAM and ROM are therefore
considered to be primary storage, while the internal hard drive is secondary storage.

Some of the advantages and disadvantages of HDDs are showed in the following table.

Advantages Disadvantages

Huge storage capacity Damaged hard drive will stop the computer from working

Persistent storage Crashes on the disk surface cause loss of data

Faster than optical discs like DVDs Slower read and write speed than RAM

Longer lifespan and affordable High power consumption

File: The file is a piece of information or data that is stored in different storage units, where it can

TIP be made available to computer programs. For example, images, video, sound recordings, PDF files,
and documents are all stored as files. Users use different applications to create, move, modify, and
delete files.

Storing files: Most computers save files to the hard disk, which allows instant access for users.

222
4 - External storage
)
These are the storage devices that are externally connected and controlled by a computer but are not integrated with it.
There are two categories of external storage devices: optical storage and magnetic storage.

i. Optical Storage
An electronic storage method that uses lasers to store and retrieve data. There are three main methods of optical storage.

A - Compact Disc (CD)


These are optical plastic discs that store up to 700 MB of data and are normally used for multimedia
applications. There are several types in the market:
a - CD-ROM – A read-only storage medium. The data is written on it before being sold by the
manufacturer. They are used to distribute software applications, video games, user guides, etc.
b - CD-R – A recordable disc. It is written only once, and its contents cannot be overwritten.
c - CD-RW – A rewritable disc. The user can write, erase, and overwrite its contents.

B - Digital Versatile Disc (DVD)


These are physically similar to CDs, but with enhanced storage capacity from 4.7 GB to 17 GB. Like CDs,
DVDs are also in the form of DVD-ROM, DVD-R, and DVD-RW.
a - DVD-ROM – The data can only be read and cannot be written or erased.
b - DVD-R – This is recordable. The user can write data only once, and the data is then readable, but its
contents cannot be overwritten.
c - DVD-RW – This is rewritable. The user can write, erase, and overwrite its contents.
d - HD-DVD – This has higher-definition playback capability than normal DVDs.

C - Blu-Ray Disc (BD-Optical Disc)


This is designed to store large amounts of data and especially high-definition videos. The sizes range from
25 to 50 GB. They are in the form of BD-ROM, BD-R, and BD-RW.
The main difference among CDs, Blu-Ray discs, and HD-DVDs is that they are single-layer, double-layer,
and triple-layer discs, respectively. To read and write different disc types, the user needs a disc drive and
applications that can read all the formats and write to all the discs.

Single Layer Double Layer Double Layer Quadruple

BD 25 50 100 120 (BD-R Only)

HD-DVD 20 40 35

ii.Magnetic Storage
A storage method that stores the data in the form of magnetized dots. The following are some magnetic storage devices.

A - Floppy Disk
An older storage device that holds up to 1.44 MB of data. Older computers had a floppy drive to read
data from, and write data to, a floppy disk.

B - Zip Drive
This has the same physical shape and properties as the floppy disk, but a zip drive is needed to read it, and
its capacity is 250 MB.

223
Session Data Storage

C - Flash Drive
An integrated circuit memory chip that is portable and often around the size of a human thumb. They are
sometimes called thumb drives, pen drives, memory units, data sticks, and keychain drives. The physical size
of the memory is becoming very small, and the capacity is expanding and currently ranges from 2 GB to 4 TB.
Following are some advantages and disadvantages of flash drives.

Advantages Disadvantages

Large capacity Easy to get lost, stolen, or damaged

Sharing between many computer systems can make data


Portable and easy to carry around
unreadable over a period of time

D - SD – Secure Digital
A flash memory card is used to store images, videos, and other digital data for electronic devices, such as
digital cameras, MP3 players, printers, cell phones, and game consoles. Capacities range from 4 GB to 128 GB.

Advantages Disadvantages

Portable and can hold large amounts of data Due to its small size, it is more likely to be lost or stolen

Not all computers come with a card reader, which is required


Users can read, write, and overwrite them
to view its content

Cloud Storage (Remote)


Remote storage, sometimes known as cloud storage, allows users to store data on a remote
device through the internet, by reserving space that is accessible from a computer with an active
internet connection.
Cloud storage is a service model in which data is maintained, managed, and backed up remotely, and made available to users
over a network. It stores files on a remote server to be retrieved when needed by different devices at any time. Access to
free storage is limited, but it can be expanded with subscription fees. Some examples of Cloud storage are Google Drive,
Dropbox, iCloud, and OneDrive. The table below reviews the advantages and disadvantages, with some advantages of Cloud
storage potentially acting as disadvantages as well.

Following are the features of Cloud storage:

• Accessibility: Cloud storage provides easy access to all stored files. However, accessibility is limited to the availability
of an internet connection.

• Space: Cloud storage provides a variety of capacity options. However, users may have to pay annual or monthly fees,
which can sometimes be expensive.

• Security: Security can be an issue, as users can give privileges to other users depending on their role.

224
Advantages Disadvantages

Accessibility irrespective of geographical location Requires internet connection

Not affected by disasters such as fire or theft Less control and is more expensive

Easy to add more storage Slower than local storage

Comes with management tools and less data


Security and privacy in the cloud
maintenance is required

The example of Cloud storages are not limited to store data but also works to as backups for data, therefore, the examples
will be discussed in session 3 where the storages acts as backups.

Zip a file/folder in Windows 10


When you compress files using ZIP, they take less storage space than their original size. Smaller ZIP files make sharing,
transferring, and storage easier and quicker. Windows 10 has built-in tools to support the process of zipping files or folders.
In Windows, you can directly zip a file or folder from its storage location.

To compress, follow these steps:


You can select one or more files/folders you want to compress at the same time.
1 - Right click on the files/folders you want to compress. Point to the “send to” option from the displayed menu.

2 - Select the option “Compressed (zipped) folder” 3 - Rename the file/folder if you want. or press the ENTER
to compress your selected file/folder. key to skip.

Zip one or more files with the File Explorer ribbon menu
1 - Select the files/folders you want to compress.
2 - Click on the “Share” tab of File Explorer and select the “Zip” command.
Add files and folders to an existing ZIP folder
To add files/folders to an existing ZIP folder, drag and drop the selected files/folders to
the already zipped folder.

225
Session Data Storage

Creating RAR files.


Windows 10 does not support RAR tools, so to use this compression format, you must have a RAR program installed on your
computer (e.g. WinRAR). These use the file name extension .rar.

Compressing a file/folder using RAR in Windows 10


To compress files or folders using RAR, follow these steps:
1 - Right click on the files/folders you want to compress and select the option “Add to archive” to compress your selected
file/folder.
2 - Type the archive name and select the location to store the archive.
3 - Click on the “OK” button.

Extracting RAR files


1 - Open the WinRAR archived file/folder you want to extract.
2 - In the WinRAR Ribbon, click the “Extract To” command.
3 - Choose the destination location to store the extracted files/folders and click on the “OK” button. You can also extract
using drag and drop; simply open the archived file/folder, select the files you want to extract, and drag and drop the
selected files to the destination folder.

226
Storage Capacity
Storage capacity is the volume of data a storage device can hold. The smallest unit of measurement is a bit, which has a
value of either 0 or 1, then a byte, which consists of eight bits, with each byte representing a single character, e.g. the binary
code for letter “A” is “01000001”and the ASCII Code is “065. (each keyboard character = 1 byte).
The following table presents different units of measurement for data storage.

Unit Shorten Value

Bits Bits 0 or 1

Bytes B 8 bits = 1 byte

Kilobytes KB 1024 = 1024 B

Megabytes MB 10242 = 1024 KB

Gigabytes GB 10243 = 1024 MB

Terabytes TB 10244 = 1024 GB

Petabytes PB 10245 = 1024 TB

Exabytes EB 10246 = 1024 PB

Zettabytes ZB 10247 = 1024 EB

Yottabytes YB 10248 = 1024 ZB

227
Session Data Storage

Apply

Activity
1 1 - Open the File Explorer app on your computer. Compress any file using the Windows 10 ZIP tool.

Choose the correct answer for the following questions: a) ROM


Activity b) RAM

2
1 - It is known as volatile or temporary memory as it needs a constant power c) CD
supply. d) DVD

a) DVD
2 - It is known as non-volatile memory and holds the instructions that cannot b) RAM
be modified but can be read only by the processor. c) ROM
d) CD

a) HDD
3 - __________is a low-cost, high-capacity physical storage medium that permanently b) ROM
stores the operating system files, software applications, user’s personal files, etc. c) RAM

a) Magnetic storage
4 - An electronic storage method that uses laser light beams to store and b) Optical Storage
retrieve the data. c) ROM Storage
d) RAM Storage

a) CD-ROM
5 - This is rewritable. The user can write, erase, and overwrite its content. b) CD-R
c) CD-RW
d) DVD-ROM

a) Local Storage
6 - ________ allows users to store data on the internet by reserving a space b) Cloud Storage
that is accessible from the computer with an active internet connection. c) External Storage
d) Internal Storage

a) Byte
7 - The smallest unit of measurement is the________, which can have a value b) Bit
of either 1 or 0. c) Kilobyte
d) Megabyte

a) Data Process
8 - It is a conversion process in which the file size is reduced by using a b) Data Compression
particular compression technique. c) Cloud
d) Local storage
a) 1000
9 - 1GB contains this many megabytes: _______. b) 1024
c) 1028
d) 1064

228
Closing

Dear student, you have learned the following:

Data Storage

Types of Data Storage Data Compression Storage Capacity

Local Storage ZIP Bits, Bytes, Kilobytes, Megabytes,


Gigabytes, Terabytes, Petabytes,
1- Portable External Hard Drive RAR Exabytes, Zettabytes, Yottabytes
2- Desktop External Hard Drive

3- Internal Storage

External Storage

1. Optical Storage

2. Magnetic Storage

Cloud Storage

229
Session Data Backup and Restore

Session

Data Backup and Restore

230
Goal

In this session, you will learn


what data backup is, its types, and how to use backup to restore in case of a data loss event.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

Define backup and Practice restoring data from


List types of backups.
restore. local backups.

1 2 3 4 5 6

List the steps of backup. Practice different types of Practice deleting the backup
local backups files and folders.

Be prepared

Data is considered a valuable and irreplaceable asset of any organization or individual. There exist situations which may
result in data loss, like power failures, system or file corruption, malware attacks, or a natural disaster. Backup is a
high-priority task of organizations and computer users, to protect and restore their data.

This session introduces local and offsite data backups, then discusses their advantages and disadvantages and illustrates
the best practices.

231
Session Data Backup and Restore

Prerequisites
Before starting this session, you should have a basic knowledge of different data storage units.

List of Terms

Keyword Description

Data restore The process of making available a usable copy of the backed-up data

Popular backup type which involves backing up all selected files and
Full backup folders that are important to the user

File history Regular or scheduled backup of data from your PC to a storage device

Incremental backup Backup of all changes that have been made since the last backup

Data backup procedure that records the data changes that have
Differential backup
occurred since the last full backup

Backing up the entire PC content including all documents (files folders),


Personal computer backup installation files, programs, operating system, emails, etc.

System Image Mirrored copy of the operating system

232
Learn

Backup
Backup is the process of creating copies of data to a separate storage drive or
location, which is later used for restoring in case of any data loss. Backup is
required to protect your data and information from any loss or to make sure
that the information is available when you need it.

The process of backup is a set of procedures that users prepare and


implement to obtain a protected copy of all or part of digital content that could
be lost due to system failure, viruses, natural disasters, or accidental deletion.

Backup steps
Depending on the aim and need, the backup process consists of a number of steps, which are essential for a successful
backup.

1 - Determine what to back up


Users need to identify what to back up from their files and folders, which involves users going through all their
digital content including vital information, setup files, installation files, programs, documents, etc. and
determining the important, irreplaceable files and folders they need to backup.

2 - Determine where to back up


After choosing what data to back up, the next step is to identify the location of the backup, i.e. where to store
the backup copy so that it is protected against all events leading to data loss. Users can choose a particular
type of backup, including local or remote backup. Backup types are discussed later in the session. Note that
the user can choose multiple backup locations to keep as many copies as needed, considering the advantages
and disadvantages of each type in terms of cost, time, security, accessibility, and availability.

3 - Determine when to back up


After choosing what to back up and where to back up, the backup schedule is decided. It can be a manual or
automatic backup. Some folders and files are static and do not need to be backed up regularly, whereas some
files are dynamically changed over time and different versions need to be backed up regularly.

To choose the perfect time for backup, users need to consider these factors:
a - Frequency
Frequency determines how often a backup is scheduled locally or remotely, e.g. hourly, daily, weekly, or month-
ly. Large organizations configure special servers that are located in a backup center to back up data based on
predefined times.

b - Starting time
It is very important to set a starting time for each backup. There are some issues to be considered when
choosing the starting time. Scheduling backups when system use is as low as possible will speed up the backup
process. A connection drop might cause a backup failure. Also, any opened and in use files will not be backed
up at all. Therefore, most organizations start the backup process after working hours and have the computers
backed up overnight.

233
Session Data Backup and Restore

Features of good backup strategy


1 - Ability to recover lost data due to hard drive failure, viruses, natural disasters, accidental deletion, and entry errors.
2 - Ability to recover data as quickly as possible to save time and cost.
3 - Minimal requirement for human interaction.
4 - Ability to run automated or semi-automated backup.

Restore
Data restore is the process of making available a usable copy of the backed-up data. It is the replacement and restoration
of lost, stolen, or damaged data to its original location or to other locations. A number of conditions can create the need for
data restore, such as human error, where the data is accidentally deleted; malicious attacks, where the data is stolen or
hacked; natural disasters; and machine failures.

Local Backup and Restore


There are several types of local data backup. The most common types are full backup, incremental backup, and differential
backup.

1 - Full backup
Full backup is the most common and popular backup type. It involves backing up all selected files and folders that are import-
ant to the user. For example: a business organization needs to maintain fresh and updated copies of data every day;
therefore, it will set up an initial backup schedule that starts every night from Sunday to Thursday. Every day, the selected
data would be fully copied to the backup location.

Advantages Disadvantages

Time consuming since each file will take time to be backed


Easy to restore since there is only one copy.
up every time the user run a full backup.

Fast restoring time as complete files are Space consuming, since every time the user runs a full
stored each time. backup, it will take more space.

Full backup of data using File History


File History is a remarkable feature of Windows. It is used to automatically back up files and folders saved
on the Desktop or in Libraries, Documents, Pictures, Videos, Music, and other locations of your PC. It
allows you to make regular or scheduled backup of data from your PC to an external, internal, or
network-connected storage and restore them at a later stage. Creating a backup of original content
means having that data saved in two locations; it’s important that those two locations aren’t on the
same PC.
To do a full backup for files and folders, the user can set up a drive for File History, which allow an easy
and automated backup of data.

The following steps illustrate how to set up and use File History in Windows 10 to safeguard your important files. Initially,
the user should use a new external drive that is connected to the PC or a network drive.

234
Set up a drive to use with File History
1 - Click the “Start” button and Click the
“Settings” button to open the Settings app. 2 - Click the “Update & security” button from the Settings app.

3 - Click the “Backup” option on the left side of the 4 - Click the “Add a drive” button, then select the media
Settings window. with which you want to use the File History feature.

The option “Automatically back up my files” is switched “on” by default when you select a backup media. The system will
automatically back up data on the selected media after the specified time.

5 - To open different backup options, click the 6 - Click the “Add a folder” button to select the folders you want to
“More options” button. back up. Select the Folder and Click on “Choose this folder” button.

By default, the system will only back up the folders listed in the “Back up these folders” section. As you have a drive linked
with File History, you can also choose which additional folders you want to back up.

235
Session Data Backup and Restore

7 - To specify how often your backups take place, click on the dropdown box beneath “Back up my files”. Select a particular
time period. This can range from every 10 minutes to just once a day, but the default hourly backups are probably fine for
most people. Making regular backups of all your files can take up a lot of space on your external hard drive, so there’s a
second pull-down menu that tells File History how long it should keep all those backups.

8 - You can also specify how long you want to keep the backup
versions on the selected media. Click on the “Keep my backups”
dropdown list and Select one of the options: 1 month, 3 months,
Forever, etc.
File History automatically adds certain folders to the backup.
Before you begin the backup process, you can remove folders you
don’t want to back up.

9 - In the “Back up these folders” section, select a folder you don’t want to back
up and click “Remove”. Repeat for each folder you want to remove.

You can also choose to exclude some folders. For example, you can exclude a
subfolder, if it is in one of the folders being backed up.

10 - In the “Exclude these folders” section, click “Add a folder”. Select a folder
to exclude and click “Choose this folder”.

When you have applied all the above settings and are ready to start the backup
process, click on the “Back up now” button at the top, in the “Overview” section.
You’ll see a message saying File History is backing up your data.

Restore from the File History backup

The File History tool in Windows 10 lets you restore your files if
they’re corrupted or accidentally deleted. It also allows you to
restore a modified document to an earlier version.

The following are the steps used to restore files or folders.

1 - Open the “Settings” app and Click on the “Update and


security” option.

236
2 - Click the “Backup” option on the left side of the 3 - Choose the files and the folders that you intend to
Settings window, then click the “More options” button. restore, then click the “Restore” button, which is
green in color, to restore them to their original
On the backup options screen, click “Restore files from a location.
current backup” under Related Settings.

2 - Incremental backup
Incremental backup involves making a backup of all changes that have been made since the last backup, which can be the
initial full backup or the last incremental backup. For example: an initial backup is done on Sunday, then on Monday the
backup of only those files and folders that were changed or added since Sunday takes place. The Tuesday backup will include
the files or folders changed since Monday, and the cycle continues this way.

Advantages Disadvantages

Much faster than other backups. More time to restore than full backup.

Complicated, since it may contain a large number of


Efficient use of storage.
files and folders.

3 - Differential backup
Differential backup records the data changes that have occurred since the last full backup. It falls in between full backup and
incremental backup. Initially, a full backup is made; then subsequent backups save all changes since the last full backup. For
example, if a full backup is made on Sunday, then on the following day of the backup schedule (Monday), only the files that
have changed since Sunday and new files added to the backup folders will be backed up. The following day (Tuesday), the
files changed and added since Sunday’s full backup will be copied again.

Advantages Disadvantages

Faster than full backup. Slower than incremental backups.

Efficient use of storage space. Less storage space than incremental backup.

Slower restore than full backup.


Restores faster than incremental backup.
More complicated restore than full backup (but
simpler than incremental).

237
Session Data Backup and Restore

To understand the main differences among full, incremental, and differential backups, assume that a company decided to
compare the three backups to determine the best practice for it to use by creating all types of backups for the whole week.

Since the business week is 5 days, there would be 5 backups. The full backup process would take a full backup of the whole
data for 5 days. The incremental backup would start at the first backup and keep copies of any changes for every day, then
take the next day’s backup. The last is the differential backup, which would take only the differences and the changes from
the previous full backup.

Number of Backup
Full backup Incremental Differential
arranged by days
Backup no.1 All data ‫ــــــــــــ‬ ‫ــــــــــــ‬
Backup no.2 All data Changes from backup 1 Changes from backup 1
Backup no.3 All data Changes from backup 2 Changes from backup 1
Backup no.4 All data Changes from backup 3 Changes from backup 1
Backup no.5 All data Changes from backup 4 Changes from backup 1

4 - Local backup
When local storage such as a hard drive (internal or external) or a flash drive is used to store the backup copies, the storage
medium is kept close at hand. Offsite backup is the opposite. The offsite backup is used to keep the data at a different
physical location; however, the local backup is used to keep copies of the data in the same physical location where the
source data exists.

Example
The following steps guide you in backing up to a local HDD. 2 - Click on the “Update and security” option
1 - Click the “Start” button and open the “Settings” app. from the Settings window.

3 - Click on the “Backup” option on the left side and 4 - In the Control Panel window, click on the “Set up
select “Go to Backup and Restore (Windows 7)”. backup” button.

238
5 - Select the location where you want to back up the data. 6 - Select what you want to back up.

7 - Backup is in process. Click on the “View Details” button to see the progress of the backup.

Advantages Disadvantages
Faster backup and restore. Since the backup is stored close to the source, it does
not offer good protection against natural disasters.
Good protection against hard drive failures.
When the source is damaged,
Data transfer cost is cheaper than any other storage medium.

Since it is local, it is conveniently obtained whenever there is a good chance the backup will also be
needed for backup and restore. damaged.

5 - Full computer (PC) backup


A full computer backup involves backing up the entire PC’s content, including all documents (files, folders), installation files,
programs, operating system, emails, etc. Such a backup is called a drive image, which means taking an image of the PC. The
backup can be compressed or uncompressed to be restored later in case of computer crashes; it can restore the PC to its
exact state when the backup was taken.

Advantages Disadvantages

In case of emergencies, the computer can be restored


The backup may not be restored if the type
in minutes, which includes the operating system,
of computer has changed.
programs, documents, and settings.

Any unsolved problems when the system was


Ideal solution for hard drive failure backed up will be kept and will be restored as it
was at the time of backup.

239
Session Data Backup and Restore

Backup using System Image


Another feature of Windows 10 for creating system backups is System Image, also known as System
Restore. The system image is initially created with the installation of Windows 10. It is the mirrored copy of
the operating system that contains the configuration files, system settings, programs, and other files. It is
useful when you need to restore the operating system—specifically, when the operating system does not
boot properly or is corrupted. It returns the PC to the same state at which the system image was created.

The following are the steps in creating a system image.


1 - Plug in any external drive that has enough free space to take a mirror copy of the data stored in the PC.
2 - Right-click on the “Start” button or press Windows + X, then from the menu select “Control Panel”.

3 - In the Control Panel window, click the “Backup and


Restore (Windows 7)” option from the “System and
Security” option.

4 - Click “Create a system image” in the Control Panel


Home section on the left side.

This option creates an exact duplicate of your PC’s hard drive – sometimes referred to as a “disk clone” – including
Windows 10 itself, along with any other programs and all the personal files you have stored on your PC.

240
5 - Select one of the drives to store the system image and click on the
“Next” button. Make sure your external storage device is plugged in and
turned on. It should automatically be detected.

6 - Select the other drives you want to include in the backup. The drives that
are required for Windows to run will be included by default. You cannot include
the drive to which the backup is to be stored. Click on the “Next” button.

7 - Click the “Start backup” button to begin the backup process. The process
can take some time, depending on the size of your backup.

Restore a System Image backup


In order to restore a fully working copy of Windows 10 onto your PC, along with all other programs and files, follow these steps.

1 - Click the “Start” button and open the “Settings” app.

241
Session Data Backup and Restore

2 - Click the “Update & security” option.

3 - Click on the “Recovery” option in the left-hand panel.

4 - If your PC isn’t working normally, you can reset your PC.


You can also restart your PC using the recovery partition
found on most PCs that use Windows 10; this will ask you if
you want to restore your PC using a system image.

Using a Restore Point


You can use a restore point to restore your computer’s system files to an earlier point in time. On Windows 10, System
Restore is turned off by default, but you can use the following steps to enable it.

1 - Open the Start menu. Search and select “Create a


restore point”.

242
2 - Under “Protection Settings,” select the main system
drive (e.g. C:) and click the “Configure” button.

3 - Select the “Turn on system protection” option, click


“Apply,” and then click the “OK” button.

4 - click on the “Create” button.

5 - Enter a description to identify the restore point and


click the “Create” button.

243
Session Data Backup and Restore

Apply

Open the OneDrive app, which is already installed on your computer.

Suppose you have a database, that needs a continuous back up. Which of the following strate-
Activity gies could you use to speed up the backup process, depending on available backup resources?
1 Discuss with your friends.

a - Perform a full backup on the weekend and differential backups during the week.
b- Perform a full backup on the weekend, and during the week, back up only the tables with many changes.

Choose the correct answer for the following questions. a) Start time
Activity b) End time

2
1 - _____________ determines how often a backup is scheduled locally c) Frequency
or remotely. d) Restore

a) Compression
2 - The process of making available a usable copy of the backed-up b) Encryption
data is c) Data restore

a) File History
3 - The ________tool in Windows 10 lets you restore your files if b) Save History
they're corrupted or accidentally deleted. c) System Point

a) Full backup
4 - The data backup procedure that records the data changes that b) Differential backup
have occurred since the last full backup is: c) Incremental backup
d) Data restore

5 - _____________is an online cloud storage service provided by a) OneDrive


Microsoft. It allows you to store files in the cloud and access and b) Google Drive
c) Dropbox
share them anytime, anywhere on your PC, tablet, or phone.
d) KSU Storage

244
Closing

Dear student, you have learned the following:


- What backup is and its steps.
- Features of a good backup.
- Different types of backups.
- Practical approach for using different backups.
- Advantages and disadvantages of using a particular type of backup.
- Different cloud storage services.
- What data restore is.

245
Session Remote Data Backup and Restore

Session

Remote Data Backup and Restore

246
Goal

In this session, you will learn


about online and remote data backups, along with their advantages and disadvantages, then
see illustrations of some of the best practices. Finally, we will discuss data compression, its
importance, and how to encrypt data.

Learning objectives

Dear Student
By the end of this Session, you should be able to:

List remote backup types. Describe the meaning of data compression and encryption.

1 2 3

Practice different types of remote backups.

Be prepared

Online and remote data backup have accessibility drawbacks that online and cloud backups can solve. Some individuals and
organizations need to keep records of their backup copies online, where it is more convenient and easier to access and
modify them at any time.

This session introduces remote and online data backups, then discusses their advantages and disadvantages and illustrates
the best practices.

247
Session Remote Data Backup and Restore

Prerequisites
Before starting this session, you should have a basic knowledge of different data storage units and offsite backups.

List of Terms

Keyword Description

FTP File Transfer Protocol

Cloud backup Backing up of data to a remote storage, cloud-based server

Cloud server Accessible to a computer via an internet connection

Google Drive Cloud storage service provided by Google

Dropbox File hosting service provided by Dropbox

OneDrive Online cloud storage service provided by Microsoft

KSU Storage Cloud storage service for university employees

Online backup Backup of data to a storage center connected to the source system

Copies of the source data in a different geographical location


Offsite backup

Remote backup Data is remotely backed up apart from the source data

248
Learn

Remote Data Backup and Restore

There are several types of remote data backups; the most common type is cloud
backup. The following section discusses different types of remote backups, the
advantages and the disadvantages of each type, and best practices.

File Transfer Protocol backup (FTP)


FTP is a network standard that is used to transfer files from one computer to another via an internet connection. This type
of remote backup is maintained on an FTP server using File Transfer Protocol. It is an example of offsite backup, where the
FTP server is located at a different location than the source data. Usually, the FTP server is located in a commercial data
center, away from the source data being backed up.

Advantages Disadvantages

Offer protection from natural disasters More expensive than other backups
May take a long time to back up and restore,
Easy access via the internet
depending on the internet connection

Available only with an internet connection

Cloud Backup
Cloud backup (also called online backup or remote backup) refers to backing up data to a remote storage, cloud-based
server. The cloud server is accessible to a computer via an internet connection. This strategy involves backing up data over
the internet to an offsite server, hosted by a third-party service provider. The provider charges fees based on the usage
capacity.

Advantages Disadvantages

Protected from natural disasters. More expensive than local backup.


Accessible via the internet by many users Can takes a long time to back up and store as it
and at any time. depends on the speed of the internet connection.

High security. Available only with an internet connection.

249
Session Remote Data Backup and Restore

The following are some cloud storage services.


Google Drive
A cloud storage service that provides users the ability to share files online with many users at any time
and to collaborate with others on a particular document at the same time.
You can access Google Drive in one of the following ways:

Browser or Device Requirements How to Access

Web browser Any web browser www.drive.google.com

Install Drive File Stream from the Drive Click Drive File Stream and then
PC or Laptop
Help Center Open Google Drive.

Install the Drive app from the Play Store


Mobile device Open the Drive app on your device
(Android) or App Store (iOS).

Accessing Google Drive


The following steps will guide you in using Google Drive through a Web browser.
Opening Google Drive
• Open the link www.gmail.com and log in to your Gmail account.
• Click on the “Google Apps” icon and click on the “Drive” app icon to open the Google Drive dashboard.

The Google Drive dashboard is displayed. The navigation tabs along the left side are:
My Drive: To access your stored files
Shared with me: To access files shared with you
Recent: To access recently used files
Google Photos: To access your photo library
Starred: To view files tagged for importance
Trash: To access your recycle bin
Backups: To access your backups
Upgrade Storage: To buy more cloud storage

250
Creating a new document.
The following table lists the documents that can be created in Google Drive.

Documents Description Example

Google Docs Text documents Proposals, reports, shared meeting notes


Google Sheets Spreadsheets Project plans, budget sheets
Google Slides Presentations Pitch decks, training modules, team presentations

Google Forms Surveys Customer satisfaction surveys, group polls


Google Drawings Shapes, charts, and diagrams Flowcharts, organizational charts, website wireframes, mind maps

To create a new word processing document:


• Click on the “New” button
• Select “Google Docs”
• Click on “Blank Document”

The document is created. You can follow the same


steps to create a spreadsheet or a presentation file.

To add a title and save the document:


- Click in the “Rename” box.
- Add a title for the document.
The document is saved and all the changes are updated
automatically.

To share the document:


- Click the “Share” button in the top right corner.
- Enter the email addresses of the people with whom you
want to share the document.
- Set permissions for the other users.
- Click the “Send” button.

251
Session Remote Data Backup and Restore

To upload a file/folder to Google Drive:


- Click on the “My Drive” dropdown arrow.
- Select the option “Upload files” or “Upload folder”.
- Select the file or folder you want to upload.
- Click on the “Open” button from the Open dialog box.

6 - Dropbox
The Dropbox company offers a file hosting service that creates a folder (Dropbox) on user’s computer
while synchronizing the contents with the Dropbox server and the user’s other devices, thus keeping the
files updated. A Dropbox basic account is free with 2GB of storage space.

Installation of Dropbox
Install the Dropbox app from https://www.dropbox.com/install. Once it is installed, a Dropbox folder is created on the
computer. To access the Dropbox, user must have a Dropbox account.

Creating a Dropbox account


You can create a Dropbox account at https://www.dropbox.com/register.

Accessing Dropbox
Go to https://www.dropbox.com/home/and log in to your Dropbox account.

252
To add files to your Dropbox folder in Windows 10:
Initially, the user has to install the desktop app on their computer.

• Drag and drop files to add into the Dropbox


folder. The files will be synchronized automatically
and added to the list of your Dropbox files.

To add files to your Dropbox on dropbox.com:


• Sign in to dropbox.com.
• Click the Upload file button at the top of the
window.
• Choose the file to add and click Open. Or drag
and drop files directly into your web browser.

To share a link of a file on dropbox.com:


•Choose the file or folder
•Click the “Share” button.
•Enter the email addresses of the users with
whom you want to share the file.
•Click “Share”. Or click “Copy link” to share with
users who do not have a Dropbox account.
Also, users can copy and paste the link into an
email or instant message, then click on the “Send”
button.

253
Session Remote Data Backup and Restore

To set up a shared folder:


• Choose “New shared folder” at the top of the window,
• Select “I’d like to create and share a new folder”.
• Click “Next”.
• Enter a name for the shared folder.
• Click “Next”.

• Enter the email addresses of the people you want to


invite. Add a personal message and choose “Can edit” or
“Can view” permissions.
• Click the “Share” button.

7 - OneDrive
OneDrive is an online cloud storage service provided by Microsoft that allows you to store files in the
cloud and access and share them anytime, anywhere on your PC, tablet, or phone. It lets a user easily
back up, store, and share photos, videos, documents, and more – anywhere, on any type of device.
OneDrive is pre-installed on Windows 10, and it also works on Mac, Android, and iOS.

Accessing OneDrive
Setup the OneDrive.
• Windows 10 has the OneDrive app already installed. Click
on the “Start” button, search, and open the OneDrive app
from the File Explorer.
• The OneDrive setup window is displayed. Enter your email
address associated with Microsoft, click on the “Sign in”
button, and set up the OneDrive account.

254
Uploading files to OneDrive from your PC.
OneDrive is integrated within File Explorer, making the process of
uploading files easy. You can transfer the files and folders from
PC to OneDrive so that you can access them from anywhere,
anytime.
• To upload, open the File Explorer and click on “OneDrive” in the
Navigation pane of File Explorer.
• Drag and drop or copy and paste content into the OneDrive
folder.
The files and folders placed in OneDrive on your PC will be
automatically synchronized with your OneDrive account. Now
you can access and share the files and folders from anywhere,
anytime.

Access your OneDrive account online


• Go to https://onedrive.live.com/
• Log in to OneDrive with your Microsoft account details.
Here we are: the place where you can store, access, share, and
manage all your work. The left pane of OneDrive displays the follow-
ing options:
• Files: Contains the files stored in your OneDrive account.
• Recent: Contains the list of files you have viewed and worked
with recently.
• Photos: Contains the photo albums you have saved in OneDrive.
• Shared: Lists the documents and files shared with other people.
• Recycle bin: Lists the deleted files and folders.

Creating a new File or Folder


- Click on the “New” button and select file type of file you want to
create, i.e. Word, Excel, or PowerPoint.
- Once you create a file, the changes will be saved automatically.
- You can also create a new folder to manage your files and
documents.

Uploading files and folders


- To upload, click on the “Upload” button, select File or
folder, and upload the file from your PC.

Menu Options
- One you select a file or folder, right click on it. You
can choose from the following options:
• Open the selected item.
• Share the selected item
• Download the selected item to your device.
• Delete the selected item from OneDrive.
• Move, copy, or rename the selected item.

255
Session Remote Data Backup and Restore

Sharing
- To share an item, select and right click on it, then click on the “Share” option from the menu.
- Now set the suitable permissions and click on the option “Email”.
- Enter the email address of the person to whom you want to share the file and add a suitable
message, then click on the Share button to share the file

8 -KSU Storage
King Saud University has made an agreement with Microsoft Corporation to
provide cloud storage service to university employees, which has been linked with
employee’s’ university e-mail.

Cloud storage service includes many features, which are as follows:


- Cloud storage up to 25 GB.
- Store and share files securely and easily.
- File editing in Microsoft Office using a web browser.
- Synchronize files in your personal computer’s hard disk.
- Flexibility in file-sharing powers to ensure privacy and confidentiality.
- Easily access files stored online using a smart phone or a personal computer.

Accessing King Saud University Storage


- Visit http://etc.ksu.edu.sa/ar/cloud and click the link
“Cloud Storage Service”.
- Log in with your KSU email account.

In this one place, you can find a number of useful Apps. In the Apps pane section, you can create different types of
documents, store all your important work online, manage data and information, share and collaborate on your work, and
explore the Microsoft OneDrive app.

256
Creating new Documents
- To create a new Word, Excel, or PowerPoint document, click on
“New” button and select the type of document you want to
create. You can also use a particular app from the Apps pane to
create a new document.
- Type a suitable title for the created document. All your work and
changes are saved automatically.
The created document will be listed in the Documents pane. The
Documents pane displays a list of recent documents, the pinned
documents, and the documents shared by you or other people.

Manage your documents


You can open, edit, download, pin, and share your documents
anywhere, anytime. To manage your files, click on the “More
options” dropdown arrow from the Documents pane.
- Select an option from the following list:
- Open: Opens your Word/Excel/PowerPoint file in the online app.
- Share: Enables you to share your file. You have to enter the email
of the person with whom you are sharing the file and set the
permissions. Finally, click on the “Send” button to share the file.
- Add to pinned: Adds the selected file to the list of pinned
documents.
- Download: Enables you to download and save the selected file.
- Remove from list: Removes the selected file from the recent file
list.
- Open file location: Directs you to the location where the selected
file is saved, i.e. OneDrive.
You can display the list of files as Tiles by clicking on the “List or Tile” button.

Uploading a file
- To upload a file, click on “Upload and open” button, select the file you want to upload and click on the “Open” button.
- Your file is uploaded to Microsoft OneDrive and will be opened automatically after the upload is complete. Whenever you
edit the uploaded file, the changes are saved automatically.

257
Session Remote Data Backup and Restore

Online backup
Online backup provides continuous backup of data to a storage center connected to the source system (the one from which
the data is being backed up). It is considered an offsite backup as the storage facility provided is a data center located away
from the source computer. Since it is an ongoing backup process via the internet, it does not require human intervention for
connecting drives or media for backup. Typically, it is a paid service, and many data centers provide this subscription service
to consumers. Normally, the data centers are built with safety specifications against natural disasters. They have very high
security standards and a monitoring system to protect the data. The backed-up data is replicated across many storage
media, which grants more safety and lowers the risk of data loss.

Advantages Disadvantages

Provide best protection against natural disaster. More expensive than other local backup.

Require minimal human and manual intervention. Might take a long time to back up and store due to
the internet speed.

Replicates copies, minimal risk of data loss. Slow to restore.

Offsite backup
Offsite backup is any backup kept at a different geographic location from the source data. The data is placed locally on any
storage device, such as a hard drive, DVD, or flash drive, which then gets moved to a different location, such as another
building. Remote backup (see below) also counts as being offsite.

Examples:
• A backup copy taken from the office and kept at home.
• A copy that is kept online, i.e. remote backup.

Advantages Disadvantages

Costly if it is kept in physical storage (if you have to


rent a building or a room).
Protected against natural disasters.
Possibility to get lost and damaged due to
movement from one place to another.

Remote backup
Remote backup is a form of offsite backup where the data is remotely backed up apart from the source data, i.e. in a
different physical location.

Advantages Disadvantages

Secured or protected from natural disasters. More expensive than other local storage methods.
Can takes a long time to store, backup, and restore,
Easy access and does not need physical depending on the speed of the internet connection.
movement to access.
Available only with an internet connection.

258
Delete backup files in Windows 10
You can also tell Windows 10 to delete older backups automatically, which will prevent your hard drive from filling up too
quickly. Windows 10 has many backup features to protect your system and files. You may have enabled system protection
to create system restore points, set up automatic image backup tasks with Backup and Restore (Windows 7), or backed up
your files using File History.
Clean up File History
Before you delete File History backup versions, you need to make sure the backup drive is connected and File History is
turned on. Otherwise, you are not allowed to delete File History backups.
To delete File History, follow the given steps:

1 - Open Control Panel and select the “Save


backup copies of your files with File History”
option.

2 - You will have the option to change how long the


saved versions are stored. You can keep saved
versions for 3 months or so. Click the link “Clean up
versions” to delete versions right now.

3 - Choose a clean-up version, e.g. older than 1


year, and click the “Clean up” button.

259
Session Remote Data Backup and Restore

10 - Delete Previous Image Backups


No backup can be created if your backup disk is full. This leaves your files and system at risk. Therefore, it is important to
manage backups well in Windows 10.

1 - Open Control Panel and navigate to Backup and


Restore (Windows 7) . Click on “Manage space”.

2 - Click on the “View backups” button.

3 - This allows to view all your data file backups


and delete the backups you do not need.

Compression and Encryption


Certain backup files are very large, and occasionally users need to keep several backup copies, which requires huge memory.
This creates a need to reduce the size of the files to save on storage and cost while keeping as many copies as needed. This
process is called “compression”.
To maintain the privacy of the backed-up files, users may encrypt them by setting up an encryption key or phrase, especially
if the files are kept online.

260
Apply

Open the OneDrive app, which is already installed on your computer.

Activity Enter your email address associated with Microsoft, click on the “Sign in” button, and set up the
1 OneDrive account.

Activity Create a Word document and save it in the Documents folder. Open File Explorer to access the
2 OneDrive folder on your computer. Now move the Word file to your OneDrive storage location.

Activity Log in to your Google account to access Google Drive. Create a new Excel file with the title “Student”
3 and save the file to Google Drive.

Activity
4 Open the MS Word app, create a document, and save it with a suitable name.

Activity
5 Transfer the file from your PC to your OneDrive folder so that you can access it from anywhere, anytime.

Choose the correct answer for the following question: a) Cloud backup
Activity This is the strategy for backing up data over the internet to an offsite b) Local backup
6 server, hosted by a third-party service provider. c) System image backup
d) Offsite backup

Closing

Dear student, you have learned the following:


• Advantages and disadvantages of using a particular type of backup.
• Different cloud storage services.

261
Dr. Rakan A. Alsowail

262
Aim
The aim of this chapter is to provide students with an introduction to the basic principles in
the field of information security. Students will become aware of the importance of the field of
information security, as well as various security terminologies that are widely used in the field.
Also, students will be able to differentiate among the different types of attacks and types of
protections needed to protect the different components of the information system. The focus
will be on technical protections, mainly access control and cryptography. Students will become
aware of the concept of access control and cryptography, and they will have the chance to
practice important cryptographic mechanisms.

Learning outcomes
Upon successful completion of this chapter, the student will be able to:

Define the term information security and state its main goals.

Differentiate the types of protections and security attacks.

Explain the concept of Access Controls and differentiate its components & models.

Describe the different cryptographic mechanisms and algorithms and practice them.

Contents

An Overview of Information Security

Access Control

An Introduction to Cryptography

Cryptography in Practice

263
Session AN OVERVIEW OF INFORMATION SECURITY

Session

AN OVERVIEW OF INFORMATION SECURITY

264
Goal

This session provides


an overview of the field of Information Security, its main goals, and different types of
Security Attacks.

Learning objective

Dear Student
By the end of this Session, you should be able to:

Define the term Information Differentiate the three types of Classify the different types
Security. Protections. of security attacks.

1 2 3 4 5

Describe the components State the three main goals of


of the Information System. Information Security.

Be prepared

Discuss, in pairs, the following questions:


1 - What is Information Security all about? What are its advantages?
2 - What are the consequences of not following the practices of information security?
3 - Have you ever been a victim of a Security Attack?
If yes,
A - What have you lost or suffered from?
B - What you could have done to prevent such an attack from happening?

265
Session AN OVERVIEW OF INFORMATION SECURITY

List of Terms

Term Explanation

Attack Any kind of malicious activity that attempts to collect, disrupt, deny, degrade,
or destroy information system resources or the information itself.

Authorized user A person who possesses the authority to perform an action or set of activities.

Unauthorized user A person who does not possess the authority to perform an action or set of
activities.

Unauthorized disclosure
Exposure of information to user(s) not authorized to access the information.

Unauthorized modification Modification of information by user(s) not authorized to modify the information.

Unauthorized disruption Unauthorized user interrupts or prevents the correct operation of system
services and functions in order to make information unavailable.

Unauthorized destruction
Unauthorized user destroys information in order to make it unavailable.

Encryption Converting the data (Scramble) into a form that is not understandable .

266
Learn

1 - What is Information Security?


Information security is a concept that has become of great importance in our lives. This
is because our adoption of computing technology has become universal. We work daily
on computers, go to school online, buy goods from merchants on the internet, play on
computers at home, work for our employers, carry our smartphones around with us
and use them to check our bank balances, send and receive emails, track our exercise
with sensors in our shoes, and so on.

While the technology has increased our productivity and simplified our access to
vast information, it raises various security issues. For example, if an attacker is
able to access our bank information, the consequences can be severe. About 30
years ago, such security issues almost did not exist. This is because technologies
were not implemented as widely as nowadays, and fewer people were using the
technology at that time.
Information Security is a field that involves the study of practices of protecting our information wherever it is
(in the Information System) from those who would seek to misuse it.

The term “Information Security” is defined as protecting information and information systems
from unauthorized access, use, disclosure, disruption, modification, or destruction.

Information Security is not only concerned with protecting the information itself, but also protecting each component of
the Information System.
So let’s understand the different components of the Information System that need to be protected.

2 - Components of an Information System


As depicted in figure below, the different components of the Information System (IS) are :

Software Hardware Data People Procedures Networks

All these components play an important role in producing the desired information and presenting, storing, or transferring it.

Hardware Networks

People Software
Components
of an Information
System
Procedures Data

267
Session AN OVERVIEW OF INFORMATION SECURITY

Software
Software consists of the applications, operating systems, and command utilities that are being
used in the Information System. This component of the IS is considered the most difficult to
secure.

Hardware
Hardware consists of the physical technologies installed in the IS that host and execute the
software, store and transport the data, and provide interfaces for entering or removing the
information in the system. This component of the IS is considered as physical assets which must
be protected from harm, theft, and unauthorized access or interaction.
The physical location of computers and the computers themselves must be secured because a
breach of physical security can result in a loss of information.

Data
Data consists of the facts and figures that are stored, processed, or transmitted in and out by
the Information System. This component of the IS is considered the most valuable to an organiza-
tion and the main target for intentional attacks. Therefore, it must be highly protected.

People
People, the users of the IS, are also an important component of the IS, which is often neglected in
information security considerations. People always constitute a threat to information security,
and they are considered the weakest link in an organization’s security program. There must be
security policies that prevent people from accidentally or intentionally damaging or losing
information.

Procedures
Procedures are another component of the IS that also is often neglected in information security
consideration. Procedures are written instructions to accomplish a specific task in an Information
System.
Organizations usually distribute procedures to their employees so that they can access the
information system, but without proper protection of procedures. Protection of Procedures is of
great importance. For example, similar to all critical information, Procedures should be distributed
to employees or users on a need-to-know basis.

Networks
Information Systems are often connected together to form Networks, such as a Local Area
Network (LAN).
This component of the IS has increased the necessity of information security. Threats to the
security of Information and Information Systems increase when organizations work on LANs, and
they become worse when these LANs are connected to the Internet. Extreme focus is required to
secure this component of the IS.

Thus, in order to protect information, each component of the information system must be protected as well.
These components are different from each other, and each of them requires a different kind of protection.

268
3 - Types of Protections
There are different types of protections that can be applied for protecting the different components of the IS. Following are
the three main types of Protections in the Information Security context:

1 - Physical Protection
The Hardware component of the IS requires Physical Protection.
Physical Protection involves the use of physical security policies, such as locks and keys that restrict access to the
area where the hardware components are located.

2 - Awareness-Based Protection
The People and Procedures components of the IS are protected by Awareness-Based Protection.
Awareness-Based Protection involves education and training to prevent users from accidental or intentional
misuse of information or procedures.

3 - Technical Protection
Software, Data, and Networks are protected by Technical Protection.
Technical Protection involves the use of security technologies to manage access to, and usage of, a system or
information by different users.

Examples of such security technologies are Access Control systems, Cryptography, firewalls, etc.

Two main security technologies that we will be focusing on in this chapter are:

Access Control Cryptography

Access Controls involve processes that allow us to Cryptography allows us to keep information secret. It
limit access to a system or information by the users involves generating codes to convert (scramble) data into an
and to control and manage it. Users must provide User unreadable format so that an unauthorized user can’t
IDs, Passwords, biometric identifiers, etc., to get understand or misuse it. To recover the data, the authorized
access to a system or information. You will learn more user requires a key. You will learn more about Cryptography
about Access Controls in Session 2 of this Chapter. in Sessions 3 and 4 of this Chapter.

TIP Technical Protection can also be additionally applied for the protection of People and
Procedures to prevent individuals from intentionally misusing knowledge in the Procedures.

269
Session AN OVERVIEW OF INFORMATION SECURITY

4 - Main Goals of Information Security


The main goals that underlie information security are to achieve Confidentiality, Integrity, and Availability of information,
commonly known as the CIA triad.

Confidentiality Integrity Availability

1 - Confidentiality
onfidentiality is the a ility to pre ent unauthorized disclosure of information
so that sensiti e information is accessi le only to authorized users.

Every one of us has sensitive information that we want to keep confidential and not have
disclosed to unauthorized users.

A patient’s record in a hospital is a kind of sensitive information that


should be confidential. Providing such information to third parties is
unacceptable.

2 - Integrity
Integrity is the a ility to pre ent unauthorized modification of information in order
to maintain its accuracy, consistency, and trust orthiness o er its entire lifecycle.

In other words, Integrity is a property that is concerned with allowing sensitive information
to be modified only by authorized users.

In a hospital, only the doctors should be able to modify records of the


assigned patients. Modification of such records by unauthorized users
might lead to wrong treatment for the patient.
There are times or places where Integrity is more important than Confidentiality.

3 - Availability
Availability is the ability to prevent unauthorized withholding of information
so that it is a aila le hen needed y the authorized users.

Although it might seem less important than Confidentiality and Integrity, there are situations
where the Availability of information is of great importance.
A patient’s record should be available to the authorized users at all times
in a hospital. In emergency situations, getting access to such information
as quickly as possible is very important; if the information is not available
on time, there could be loss of lives due to delayed treatment.

270
Types of Security ttac s.
A security attack is one of the main concerns in information security. It can come in
different forms.When performed by unauthorized users (outsiders), it is known as an
External Attack; when performed by authorized users (insiders), it is known as an
Insider Attack. It is more difficult to detect or prevent insider attacks than external
attacks, because insiders are authorized users who operate within their privileges.

Insider and external attacks can be further classified into four categories:
1 - Interception Attacks
2 - Interruption Attacks
3 - Modification Attacks Confidentiality Interception
4 - Fabrication Attacks
Interruption
Each type of attack can affect the Confidentiality, Integrity, or
Availability of the CIA triad, as depicted in Figure aside.
Integrity Modification
Fabrication

Interruption
Availability Modification
Fabrication

1 - Interception Attacks
Interception attacks allow an attacker to gain access to sensitive information. Interception might take the form of
unauthorized file viewing or copying, eavesdropping on phone conversations, or reading email. This type of attack affects
the confidentiality of the information.

2 - Interruption Attacks
Interruption attacks allow an attacker to make sensitive information unusable or unavailable to authorized users. This
type of attack affects the availability of the information. It might affect the integrity of the information as well.
For example, if an attacker overwrites files in a file system in order to prevent access to the data they contain, we might
consider this an integrity attack, due to the possible corruption of data.

3 -Modification Attacks
Modification attacks affect the integrity of the information. They allow an attacker to tamper with sensitive information.
This type of attack might affect the availability of the information as well.
For example, if an attacker tampers with a configuration file that manages how a particular service behaves, this might affect
the availability of that service by changing the contents of the file.

4 - Fabrication Attacks
Fabrication affects the integrity of the information. It is a type of attack in which the attacker inserts forged objects or
information into the system, as if it was generated by an authorized user. This forged information misleads authorized
users when they use it. In addition, fabricated data may reduce confidence in genuine data within the affected system.This
type of attack might affect the availability of the information as well.
For example, if an attacker generates enough network traffic, email, or nearly anything else that consumes resources, this can
potentially render the service that handles such traffic unavailable to authorized users of the system.

271
Session AN OVERVIEW OF INFORMATION SECURITY

Apply

ead the follo ing cases and note do n your responses in the o es pro ided elo .

A - Consider that you are a Security Officer in a Bank and you have a flash drive (USB)
Activity containing secret financial details and security codes of the banks. You want to protect
1 this flash drive from theft or misplacing.

1 - Note down the possible security measures you will follow to protect your flash drive (USB).

2 - Match your security measure with the appropriate type of Protection you have learned in this Session.

3 - Consider that you are using your laptop on a coffee shop, which provides free open Wi-Fi. Will you use
that flash drive (USB) on your laptop? Why or why not?

B - You are planning to buy a car on loan from a bank. An employee of the bank has asked you
to fill out a form (PDF) and send it to him via email. In the PDF form, it asks details about your
financial sources and also about your family. You filled out the form correctly, but while
sending the email, you mistakenly sent it to a wrong person.

4 - Which of the goals of Information Security is affected in this case?

5 - How can you avoid this kind of mistake in the future? List your suggestions.

C - When you start chatting with someone through an application on your smartphone,
sometimes it gives a message like “This chat is secured with end-to-end encryption.”

6 - What do you understand from this message? And which goal(s) of Information Security are
achieved with this?

272
Choose the correct option for the blanks in the following statements.
a) Availability
Activity b) Confidentiality
2 a - ____________ is/are the main goal(s) of Information Security.
c) Integrity
d) All of the above

a) Modification
b - _____________ attacks insert fake objects or information into b) Interception
the system. c) Fabrication
d) All of the above.

a) Integrity
c - ________________ is the assurance that the information is b)Awareness-Based Protection
trustworthy and accurate. c) Confidentiality
d) Information Security

a) Confidentiality
d - Interception attacks are generally designed to target and b) Availability & Confidentiality
challenge the __________ pillar(s) of the CIA Triad. c) Integrity & Availability
d) All of the above

a)Professional Development
e - ______________ involves providing Education and Training to b) Integrity
c) Awareness-Based Protection
employees in an organization.
d) None of the above

Closing

Dear student, Following is a mind map that summarizes the concepts and knowledge you
have learned in this session.

AN OVERVIEW OF INFORMATION SECURITY

1 - What is Information 2 - Components of an 4 - Main Goals of 5 - Types of


3 - Types of Protections
Security? Information System Information Security Security Attacks

Software Physical Protection Confidentiality Interception Attacks


Protecting information
and information systems Hardware Awareness-Based Protection Integrity Interruption Attacks
from unauthorized Data Technical Protection Availability Modification Attacks
access, use, disclosure,
People Access Controls Fabrication Attacks
disruption, modification,
or destruction. Procedures
Cryptography
Networks

273
Session ACCESS CONTROL

Session

ACCESS CONTROL

274
Goal

This session provides


students with an introduction to Access Control as one of the Technical Protection Methods in
Information Security.

Learning objective

Dear Student
By the end of this Session, you should be able to:

1-Understand the concept of Access 3 - Understand the different


Control and its importance in Access Control Models.
Information Security.

1 2 3

2 - Describe the components of Access Control:

a - Identification b - Authentication c - Authorization

1 - Differentiate between Identification and Authentication.


2 - State the three types of Authentication.

Be prepared

Discuss, in pairs, the following questions:


1 - Do you come across situations in everyday life where you need to prove your identity? The People who ask for your
identity—what do they do after that, and how do they manage their work?

2 - Have you ever learned about / thought about / experienced managing and controlling access to a resource?
For example, access to your car by many drivers. How do you manage or control it?

275
Session ACCESS CONTROL

List of Terms

Term Explanation

Subject A user (or program of a user) that needs access to data or resources.

Object The data or resources of the system.

Usually much longer than a password, an actual phrase of some type; easier for the
Pass-phrase user to remember.

Cognitive password Questions about facts or predefined responses that only a user knows the answers to.

Token device Handheld device with an LCD display.

OTP One-Time Password.

MAC Mandatory Access Control

DAC Discretionary Access Control

RBAC Role-Based Access Control

ACL Access Control List

276
Learn

1 - What is Access Control?


Information security aims to achieve Confidentiality, Integrity, and Availability of
information. This can be achieved by allowing only authorized people to perform actions
while disallowing the actions of unauthorized people.

For instance,
confidentiality is met if only authorized people can view or access the information;

integrity is met if only authorized people can modify the information;

and availability is met if only authorized people can withhold the information.

Thus, there must be a method to differentiate authorized from unauthorized people.


This is what Access Control does.

The major function of Access Control is to manage access rights of users when fully sharing the
system resources, and to ensure that illegal use of and access to the resources cannot occur.

Access Control limits the access of the subject (user) to the object (data). It controls the subject’s access according to
his/her authentication.

Access Control is one of the central themes of information security; it helps to achieve confidentiality and integrity of data.

2- Components of Access Control


Access Control involves performing three steps as follows:

Firstly, each person must have a unique identity to identify him/herself to the system;
this step is known as Identification.

Secondly, each person must prove to the system that he/she is really who they claim to
be; this step is known as Authentication.

Finally, the system must define what the authenticated person can or cannot do with
the information; this step is known as Authorization.

Thus, Access Control comprises three components; Identification, Authentication, and Authorization. Each complements
the other, and they must be implemented in order. Let’s discuss each one in detail.

277
Session ACCESS CONTROL

1 - Identification
The first step in access control is identification.

Identification is the process y hich a user agrees an identity and responsi ility is initiated.

Hence, the identification process is established when a user provides a username, a log-in ID,
a personal identification number (PIN), or a smart card. Once a user has identified himself, his
identity will be responsible for further actions undertaken by him. Computers are not able to
differentiate humans from each other but rather are able to differentiate your user account
from all other user accounts.

Identification is about providing a public piece of information (username, account number), and it might be known by a
subject’s friends or family. Thus, identification does not play an important role in making the system more or less secure.
However, it is only the first step and the starting point that facilitates, introduces, and is relied on by the two most important
steps: Authentication and Authorization.

2 - Authentication
The second step in access control, Authentication, relies on the identification step. While identification is about providing
a public piece of information, authentication is about providing a private piece of information that is known solely by a
certain user.

uthentication is defined as the process of erifying or testing that a claimed identity is alid.

In the authentication step, additional information is needed from a user, and it must correspond
exactly to the identity declared. A well-known example of authentication is a password.

Authentication techniques can be classified into three types based on their characteristics, as follows:
a) Something the user Knows b) Something the user Has c) Something the user Is

a) Something the user Knows

Authentication Techniques such as Password, Pass-phrase and Cognitive Password belong to the category of
“Something the user Knows.”
Password is the most commonly used technique for authentication processes; it is considered the weakest.
Pass-phrase, which is a string of characters usually much longer than a password, is more efficient and effective than
passwords. A pass-phrase is easier for the user to remember than passwords, as it is an actual phrase of some type.
Pass-phrases also provide a higher level of protection than passwords, as they are longer and harder for an attacker to
guess or break.
Cognitive password, which is a number of questions about facts or predefined responses that only a user should know,
is efficient.

Examples of cognitive password are “What is your birth date?”, “What is your mother's maiden
name?”, and “What is the name of your division manager?”

278
An effective cognitive password system asks a different set of questions each time.
Cognitive passwords are more difficult for an attacker to break, and they are usually easier
for a user to remember.
Although making a long, complicated password is preferred to survive attacks and make
this type of authentication stronger, humans are not able to remember long, complicated
passwords that consist of different alphanumerical characters. Even if a user is forced to
create such passwords, the user would write them down somewhere, as he/she will not be
able to remember them; hence, they are susceptible to physical theft.

Thus, this type of authentications is not efficient to be used alone, and it is usually used in
combination with type 2 (something the user has) or type 3 (something the user is).

b) Something the user Has

There are several authentication techniques that can be classified in the category of “Something the user Has,” such as
One-Time Password (OTP), Memory card, and Smart card.

One-Time Password (OTP)


One-Time Password is dynamically generated and it is valid only once. The advantage of
using One-Time Passwords is that when the password is known by an attacker, it is
useless; the attacker cannot use it. In order for a user to obtain the one-time password,
he/she must possess a handheld device with an LCD display, referred to as a Token device.
For the authentication process to be performed, the user first reads the generated
password from the Token device and then enters it, along with a username, into a system
for the authentication process. This generated password can only be used once, and if the
user wants to go through the authentication process again, another password is generated
dynamically for the user to perform the authentication process again.

Memory card
Memory card is another technique to use in this type. Memory cards contain information
within a magnetic strip and rely on a reader of some sort to process the information. For a
user to be authenticated in this technique, he/she first inserts the card into the reader and
then enters a set of credentials to be authenticated.
A well-known example of Memory card is an Automated Teller Machine (ATM). The user
inserts the ATM card into the ATM and then enters his/her PIN number. The card provides
the account number (user information) while the user provides the secret code (PIN);
together, they provide a credential set.

Smart card
Smart card is different from a Memory card. It has a microprocessor and
integrated circuits, which make the smart card able to process information It is also possible to authenticate
rather than only containing the information as with a Memory card. While based on something you have, that is,
using the smart card, the user must insert it into a reader which has electrical something in your possession. Give an
connections that switch on and power the smart card processor. The user example of authentication based on
something you have.
then enters a PIN value, which unlocks the information and processing power
contained on the smart card. Smart cards are considered more tamper-proof
than memory cards as a smart card locks itself if the user has entered

Cryptographic keys can be used for the Authentication process; this can be classified under the “Something that
TIP user Has” type of Authentication Techniques. You will learn about Cryptographic Keys in Session 3 of this chapter.

279
Session ACCESS CONTROL

c) Something the user Is

The authentication process based on “Something the user Is” is considered the strongest and
most efficient. It is suitable for organizations that require a very high level of security. This type
of authentication is usually referred to as Biometric Authentication. Biometrics measure
unique physical or behavioral characteristics of a user to recognize or authenticate his/her
identity. Physical biometrics include fingerprint, hand or palm geometry, retina, iris, and facial
characteristics. Behavioral biometrics include signature, voice, keystroke pattern, and gait.

The acceptance of biometric authentication by society is very low, and the implementation is
very expensive compared to other authentication types.

People do not prefer biometric authentication because of the associated inconvenient processes that a user must go
through to be authenticated, and also because it reveals personal information about them. As a result, it can only be seen
in organizations that require a very high level of security, where confidentiality is more important than people’s
convenience and preference.

Multi-Factor Authentications
The three types of authentication techniques provide different levels of When you want to authenticate
security; each type is stronger than the one preceding it. In other words, yourself to your computer, most likely you
type in your username and password. The
type 3 of the authentication techniques is the strongest type because it is
username is considered public knowledge,
the most difficult to breach, compared to the other two types.
so it is the password that authenticates
you. Your password is something you
Deciding which Authentication technique to use depends on the level of know.
security desired by a certain organization: whether it is a low, moderate,
or high level.
Discuss in groups and answer
the following questions:

Authentication techniques like Token devices are used


by financially oriented organizations, while Biometrics It is also possible to authenticate based
are more suitable for military-oriented organizations on something you are, that is, a physical
where the data is top secret. characteristic. Such a characteristic is
known as a biometric. What is an example
of biometric-based authentication?

To satisfy the levels of security desired by different organizations, one or two or all three types of Authentication
techniques can be used at a time.

When only one of the three types of Authentication techniques are used, it is referred to as One-factor authentication.

When two of the three types of Authentication techniques are used, it is referred to as Two-factor authentication.

Whereas if all three types of Authentication techniques are utilized, it is referred to as Three-factor authentication.

280
In order to have a strong authentication process,
the authentication must utilize two-factor or

9 0 1 2
Two-factor authentication requires
more. An example of utilizing two-factor is when

DEBIT CARD

5 6 7 8
$ 123 that two of the three authentication

1 2 3 4
a subject/user uses a debit card at a shop. He methods (something you know, something you
must swipe the card (something he has) and have, something you are) be used. Give an
enter a PIN (something he knows) to complete example from everyday life where two-factor
the transaction. authentication is used. Which two of the
three are used?

3 -Authorization
Authorization is the third and final step of access control. It is performed after a user has been identified and authenticated.

uthorization is the process of assigning access and the right to carry out specific operations to authenticated
users, depending upon their preconfigured access rights and permissions outlined in access criteria.

It must be noted that not every identified and authenticated user can use all resources.
Instead, after a user is identified and authenticated, a check must be performed to find
out what accesses and operations he/she can perform. In other words, by performing
the Authorization step, we can determine what an identified and authenticated user can
actually access and what operations he/she can carry out.

Authorization is provided by a system through Access Control Models, which manage the
type and level of each user’s access to objects. A wide variety of Access Control Models
exist, each of which provides a different approach to Authorization. The following section
gives a brief description of the major types of Access Control Models.

3 - Access Control Models


An Access Control Model is a framework that dictates access control using various access
control technologies.

The main objective of an Access Control Model is to enforce the rules and objectives of certain security policies. In other
words, it dictates how objects must be accessed by subjects/users.

There are different Access Control Models that focus on different goals of Information Security (the CIA triad). Some
Access Control Models focuses more on Confidentiality of data, whereas others focus more on data Integrity.

Each Model has its own advantages and disadvantages and serves different organizations’ needs, culture, nature of
business, security policy, etc. Traditionally, there are three widely accepted Access Control Models:

Mandatory Access Control (MAC) (DAC) (RBAC) Role-Based Access Control

Discretionary Access Control

281
Session ACCESS CONTROL

1 - Mandatory Access Control (MAC) Model

In Mandatory Access Control, each object is attached to a security label and each user is assigned to
a security clearance.

Access restriction in the Mandatory Access Control Model is based on the security clearance of users and security labels of
objects.
In order for a subject/user to access an object, the subject’s clearance level must be equal to or greater than the object’s
label level. For instance, if an object is very confidential in an organization and has been assigned a “Top Secret” security
level, a user who has been assigned the lower security level “Secret” cannot access the object, as his/her security level does
not match the object’s.

User A
Secret

Data Top Secret

User B
Top Secret

As this model is named mandatory, the security levels are enforced by the system and only the administrators of the
system can modify them. In other words, it does not allow a user or a program of the user to modify the security levels. That
makes this model stricter and more secure, suitable for organizations that require a high level of security, such as the
military.
ut this model is neither e i le nor scala le.

2 - Discretionary Access Control (DAC) Model


In contrast to MAC, Discretionary Access Control Model gives the owner or the creator of an object the freedom to specify
who can access the object and what operations can be performed on the object.

For instance, if a subject creates a file on his system and wants to share it with other subjects, the subject can control and
specify who can access the file. In other words, the access control is based on the discretion or the decision of the owner.

DAC is often implemented using an access control list (ACL) of objects, where each ACL defines the types of access granted
or restricted to an individual or a group of subjects.

Unlike MAC, DAC is applicable for organizations that do not require a high level of protection.

282
2 2

ACL List Security Label

1 1
3 3

DAC - Subject Server MAC - Subject Server

In Discretionary Access Control, a subject is permitted to access an object based on the identity of the
subject, and some subjects can also delegate their own access authorities to other subjects.

o e er, this has led this model to e e i le ut also comple .

Example of MAC and DAC


In building operating systems, the decision to select MAC or DAC depends on what functionality an operating system is
intended to provide. For instance, Windows-based platforms provide DAC access structure rather than MAC. However,
specially developed operating systems, such as those created for government agencies and the military, provide a MAC
access structure to enforce the level of security needed. Many operating systems, such as Linux, Unix and Windows
NT/Server, use DAC access structure.

3 - Role-Based Access Control (RBAC) Model


The Role-Based Access Control Model was proposed to overcome the complexity problem associated with the MAC and
DAC models.

In the Role-Based Control Model, access to objects is restricted based on the business function or
role that subjects/users are performing.

Unlike DAC, access permissions in RBAC are assigned to roles rather than to subjects’ identifiers. In this model, groups of
users are created by the administrators, who then assign access rights and permissions to the groups. A user in a group will
be able to utilize the access rights and permissions of the group.

This model is more appropriate for large organizations that are required to change access rights and permissions more often.
This is because this model allows the administrators to add a subject, add an object, or change access rights and permissions
very easily by changing centralized roles without having to manipulate any subject or object in the system. For instance, in a
company, the administrator can add a new employee to a role rather than creating access rights and permissions for every
person who joins the company.

283
Session ACCESS CONTROL

Apply

Do the following Access Control Exercises by using your Google Drive account.
Activity
1 1 - Authorize your class friend(s) to only be able to view a Word file stored in your Google Drive account.

2 - Authorize your class friend(s) to view and edit a Word file stored in your Google Drive account.

3 - Share a Word file stored in your Google Drive account by using the sharable link feature.

Choose the correct option for the blanks in the following statements.
Activity
2 1. ____________ is a number of questions about facts or predefined
a) Password
b) Pass-phrase
responses that only the user should know. c) Cognitive Password
d) Subject

a) Two-factor authentication
2. When one of three types of Authentication techniques is used, b) One-factor authentication
it is referred to as ________________. c) Three-factor authentication
d) None of the above

a) Identification
3. ________________ is the process of assigning access and the right b) Password Protection
to carry out specific operations to the authenticated users. c) Role-Based Access Control
d) Authorization

a) One-Time Password
4. OTP stands for _______________. b) One-Time Protocol
c) One-Way Protocol
d) None of the above

284
Closing

Dear student, Following is a mind map that summarizes the concepts and knowledge you
have learned in this session.

ACCESS CONTROL

1 - What is Access Control 2 - Components of Access Control 3 - Access Control Models

Manage access rights of users Identification Mandatory Access Control


when fully sharing the system (MAC) Model
Authentication
resources, and to ensure that
illegal use of and access to the Discretlonary Access Control
Authorization
resources cannot occur. (DAC) Model
Something that user Knows
Example of MAC & DAC
Something that user Has
Role-Based Access Control
Something that user Is (RBAC) Model

Multi-factor Authentlcation

285
Session An Introduction to Cryptography

Session

An Introduction to Cryptography

286
Goal

This session provides


students with an introduction to Cryptography, its importance in the Information Security
context, and Cryptographic Mechanisms and Algorithms .

Learning objective

Dear Student
By the end of this Session, you should be able to:

Define what Cryptography is. Understand the Cryptographic Algorithms


(Symmetric and Asymmetric).

1 2 3 4

Describe the different Cryptographic Mechanisms Summarize the Uses of Cryptography


(Encryption, Hash Functions, Digital Signatures, in Information Security.
and Digital Certificates).

287
Session An Introduction to Cryptography

Be prepared

Dear students, discuss in pairs the following questions:


1 - How secure is our digital information? Is our digital information protected from natural disasters, computer hackers, and
human errors?

2 - When checking your email over a secure connection, or making a purchase from an online retailer, have you ever
wondered how your private information or credit card data is kept secure?

3 - In ancient times, how did people share secret messages during world wars?

List of Terms

Term Explanation

Plain Text The original message (or) an original readable textual material message or data.

Cipher Text The coded message (or) a non-readable form of the original text.

Cipher An algorithm for transforming plain text to cipher text.

Process of converting plain text to cipher text or process of coding information


Encryption
into a form that is unreadable.

Decryption Restoring the original plain text from the cipher text.

A value that is used to encrypt or decrypt a message. It can include numeric and
Key
alphanumeric text and special symbols.

In the context of encryption, the mathematical formula used to scramble and


Algorithm
unscramble data.

Eavesdropper Unauthorized listener (spy).

288
Learn

1 - What is Cryptography?
Cryptography is a science of secret writing and is an ancient art. The aim is to hide the meaning of a
message so that it is unreadable by unauthorized eavesdroppers. Cryptography has a definitive
existence in everyday life. There are a range of situations where we want our data to be undisclosed.
Everything from our smartphone to our banking relies heavily on cryptography to keep our information
safe and our life secure.

Cryptography is the study of methods used to transmit information securely


between two or more participants, so that it is unreadable by unauthorized users.

Security of information in communications, computer systems, electronic commerce, and the emerging information society
depends on cryptography. Cryptography can protect communications that traverse untrusted networks.

Cryptography is an essential tool to achieve the basic goals of Information Security: Confidentiality, Integrity, and Availability.

Cryptanalysis is the science of breaking cipher texts without knowledge of the key. Cryptography and Cryptanalysis are
known as Cryptology.

The Arabic Origins of Cryptography


During the golden age of the Islamic Civilizations, the Arabs translated many branches
of knowledge from other languages and considerably added and enriched them.
However, the Arabs were the first to formalize Encryption and Cryptanalysis. David
Kahn, a prominent historian of Cryptography, wrote “Cryptology was born among the
Arabs. They were the first to discover and write down the methods of cryptanalysis.”
[DK] Many Arabic manuscripts were discovered in 1979 that show the earliest work on
Encryption and Cryptanalysis was done by Ya’qub al-Kindi in his Treatise “Risalah fi
Istikhraj al Mu'amma” (Treatise on Decrypting Cryptographic Messages). written in
the 9th century AD, which is about 1200 years ago. [MAT] Many Arab scholars have
written original works on Encryption and Cryptanalysis after al-Kindi, and possibly
before him.

2 - Cryptographic Mechanisms
In Cryptography, a variety of cryptographic mechanisms exist to support different security services: data confidentiality,
data integrity, etc. Some of the popular cryptographic mechanisms are as follows:

1- Encryption
2- Hash Functions
3- Digital Signatures
4- Digital Certificates (Digital IDs)

289
Session An Introduction to Cryptography

1 - Encryption – A Core Cryptographic Mechanism


Cryptography, prior to the modern age, was effectively synonymous with encryption, which means simply hiding
or converting data.

Encryption is a process of converting the data (referred to as “plain text”) into a form that is not
understandable (referred to as “cipher text”).

The conversion and subsequent recovery of the data depend on a code or a key, which can be a number or a string
of characters.

For example, you want to send a coded message to your friend.

• You can substitute each letter of your message with the letter that is two down from it in the alphabet order. So “A”
becomes “C,” “B” becomes “D,” and so on.
• You need to inform your trusted friend that the code (or the Key) is “Shift by 2.”
• Your friend gets the message and decodes it properly by replacing each letter with the letter that is two up in the alphabetic
order.
• Anyone else who sees the message will see only distorted text.
The fundamental requirement is that no information be lost (that is, all operations are reversible).
Thus, Encryption is a cryptographic mechanism that helps to achieve the security service Confidentiality, whether the
information is in storage or in transit.

There are a range of techniques of encryptions. In other words, there are different ways to transform the “plain text” into
the “cipher text.” Two of the techniques are basic:

Substitution Ciphers Transposition Ciphers

Substitution Cipher Transposition Cipher


ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 2 3 4 5 6 7 8 9
2 1 5 3 4 6 8 9 7
QWERTYUIOPASDFGHJKLZXCVBNM
GRAY FOX HAS ARRIVED T O P S E C R E T
UKQN YGB IQL QKKOCTR O T E P S C E T R

In substitution, each element in the plain text Transposition Ciphers are a bit different from
(bit, letter, group of bits or letters) is mapped Substitution Ciphers. In transposition, elements
into another element. in the plain text are rearranged or plain text
characters are shifted in some regular pattern to
form cipher text.

290
2 - Hash Functions

ash function is a one ay mathematical function that generates a fi ed length hash alue
based on the plain text.

Values returned by a hash function are called message digest or simply hashes.

The hashes can be sent with the message. The receiver simply hashes the message again using the same algorithm, then
compares the two hashes. If the hashes match, the message has not changed. If they do not match, the message has been
altered.

It is impossible for someone to change the data without affecting the hash value, thus securing the data from intruders.

Hashing functions are easy to compute but hard to reverse.

A hash function H( ), applied on input (x), returns a fixed string, hs. Mathematically, it is written as hs = H(x).

Thus, the Hash function is a cryptographic mechanism that helps to achieve the security service Data Integrity.

Message Integrity is ensured through Hashing

SENDER RECEIVER

Hash
Data Intended for Sending Data Received
Value
Hashed
Message

Message Hash
Hashed Value

Data Intended for Sending Hash


Sent Value

Hash
Compared
Value

Message Integrity Yes


Confirmed Tallied?

Message
No
Tampered with

291
Session An Introduction to Cryptography

3 - Digital Signature
In situations where there is not complete trust between sender and receiver, we need Digital Signatures to
authenticate the sender of the message.

A digital signature is like a handwritten signature, but it is in digital form for an electronic document.

To digitally sign a message, the sender generates a hash of the message,


then uses a key to encrypt the hash, thus generating a digital signature. (The
key used is often a private key, discussed later in this session.)

The sender then sends the digital signature along with the message, usually
by appending it to the message itself.

When the message arrives at the receiving end, the receiver uses a key
shared by the sender to decrypt the digital signature, thus restoring the
original hash of the message. (The key shared is often a public key, discussed
later in this session.)

The receiver can then verify the integrity of the message by hashing the
message again and comparing the two hashes.

Although this may sound like a considerable amount of work to verify the integrity of the message, it is often done by a
software application of some kind, and the process typically is largely invisible to the end user.

A digital signature is considered legally binding, and if it is lost or stolen, it must be revoked.

4 - Digital Certificate
Message signing can be scaled up by using Digital Certificates.

igital ertificate is an electronic e ui alent of an indi idual s identity card it can e used to
erify the identity of someone you don t no .

A digital certificate is typically formed by taking a key (public key) and identifying information, such as a name and address,
and having them signed by a certificate authority (CA).
- A CA is a trusted entity that handles digital certificates.
- One well-known CA, at present, is VeriSign.

The advantage of having a certificate is that it allows us to verify that a key (public key) is truly associated with a particular
individual. In the case of the digital signature we discussed in the preceding section, it might be possible that someone had
falsified the keys being used to sign the message and that the keys did not actually belong to the original sender. If we have
a digital certificate for the sender, we can easily check with the CA to ensure that the public key for the sender is legitimate.

292
3 - Cryptographic Algorithms
Cryptography involves the combination of mathematical and computational strategies, keys, algorithms, etc., to securely
and reliably prevent unauthorized access to sensitive information and verify each component in a communication.

A mathematical function/procedure for performing encryption and decryption on data is often


known as a Cryptographic Algorithm.

Through the use of an algorithm, information is made into meaningless cipher text; a key is required to transform the data
back into its original form. The security of encrypted data is totally dependent on two things: the strength of the
cryptographic algorithm and the secrecy of the key.

Fundamentally, Cryptographic Algorithms are of two types:


1) Symmetric Cryptography
2) Asymmetric Cryptography

1 - Symmetric Key Cryptography


Symmetric algorithms encrypt and decrypt the data using the same key. The sender and receiver must have the same key
in order to share confidential information. Because a single key is used for both encryption and decryption, this method is
called symmetric cryptography.

Message Confidentiality is ensured

SENDER RECEIVER

Encryption Decryption
Plaintext Algorithm Plaintext
Algorithm Ciphertext
Message Message
(Y)
(X) (X)

Symmetric Key Symmetric Key

ASYMMETRIC KEY CRYPTOGRAPHY: Same Key shared by both sender and receiver pair

For example, two users, Alice and Bob, want to exchange messages privately and
securely. In the Symmetric Key Cryptography setting, the following steps will occur:
STEP
1 Alice buys a lockbox and two identical keys to open it.

STEP
2 Alice arranges to meet Bob to give him one of the keys. (It’s inconvenient, but she only
has to do it once.)
STEP
3 Alice uses her key to lock her message into the lockbox and sends the lockbox to Bob.

STEP Bob can use his identical key to unlock the lockbox and read the message. Bob can use
4 the same method to securely reply.

293
Session An Introduction to Cryptography

Challenges in symmetric key cryptography

- Distribution of key – Secret key sharing among senders and receivers is a challenge. It gets even more inconvenient when
the users are on opposite sides of an ocean.
If multiple parties are involved in the communication, then multiple keys have to be distributed. Managing many keys is
difficult.

- Authenticity – Trust and Authenticity of the two parties is also a concern.


Symmetric key cryptography is more useful for encryption of files or file systems in local machines and less useful for
communication between two systems in a network because of Key Distribution challenges.

2 - Asymmetric Key Cryptography


In asymmetric cryptography, two different keys (Public and Private keys) are used for encryption and decryption of data.
Using the public key, anyone can encrypt the data. The private key is used to decrypt the data and is kept secret at all times,
but the public key may be freely distributed. In this approach, both sender and receiver have the ability to generate both
keys (using a computer system) together. Hence, the problem of key distribution never arises.

Both message confidentiality and authenticity are ensured through asymmetric key cryptography. It is also commonly
known as Public Key Cryptography.

Message Confidentiality is ensured

SENDER RECEIVER

Plaintext Encryption Decryption Plaintext


Message Ciphertext Message
Algorithm Algorithm
(X) (Y) (X)

Public Key of Receiver Private Key of Receiver

ASYMMETRIC KEY CRYPTOGRAPHY: Public Key of receiver shared


with all, Private Key of receiver held secret by receiver

294
For example, two users, Alice and Bob, want to exchange messages privately and securely. In the Asymmetric Key
Cryptography setting, the following steps will occur:

STEP Bob buys a padlock and matching key.


1

STEP Bob sends the (unlocked) padlock (Public Key) to Alice, keeping the key (Private
2 Key) safe with himself.

STEP Alice puts her message in a simple box, locks it with Bob’s padlock (Public Key),
3 and sends it to Bob.

STEP Bob receives the locked box, which he can open with his key (Private Key). He can
4 read the message. Alice can follow Steps 1 and 2 to get a reply from Bob securely.

4 - Main Security Services achieved through Cryptography


Cryptography in the digital world involves many techniques and mechanisms that support the different security services.
Different cryptographic mechanisms, such as Encryption, Hash Functions, and Digital Signatures, work as tools to achieve
the different security services. This section outlines how the security services are achieved through different cryptographic
mechanisms.

Confidentiality
By using Encryption, which is one of the core cryptographic mechanisms, we achieve the security service
“Confidentiality.” Before you send sensitive data over a network or store it on a disk, you can encrypt it,
which turns it unreadable. The intended receiver needs to decrypt it to get the readable data back.

Integrity
Cryptographic mechanisms such as Digital Signatures and Hash Functions are used to ensure the security
service “Integrity.” One can easily forge email, but it’s very hard to forge a digitally signed email message.
Similarly, it’s hard for someone to modify or manipulate a message that is digitally signed.

Cryptographic mechanisms such as Digital Certificates (Digital IDs) are also used to achieve the access
control component “Authentication.”

Non-Repudiation
The security service “Non-Repudiation” prevents the sender from denying that he or she sent the
message. The cryptographic mechanism Digital Signatures is used to achieve this service.

295
Session An Introduction to Cryptography

Apply

Activity
1 1 - Using a transposition cipher, reverse the order of the plain text “ELPMAXE ELPMIS A”

2 - Convert this plain text to cipher text with the shift parameter of 3.
PLAIN TEXT: ABCDEFGHIJKLMNOPQRSTUVWXYZ

Choose the correct option for the blanks or select True or False in the following statements.
Activity
2
a) Public Key
1 - ______________________ Cryptography uses the same key for b) Asymmetric Key
encryption and decryption of data. c) Symmetric Key
d) None of the Above

a) Cipher text
b) Secret text
2 - The ________is the original message before transformation.
c) Plain text
d) None of these

a) True
3 - A Key is a value that is used to encrypt or decrypt a message.
b) False

a) True
4 - Values returned by a hash function are called message digest.
b) False

a) Plain text
b) Decryption
5 - ______________________ is the process of converting plain text to
c) Encryption
cipher text.
d) None of these

6 - Cryptography can ensure the confidentiality and integrity of both a) True


data in transit and data at rest. b) False

296
Closing

Dear student, Following is a mind map that summarizes the concepts and knowledge you
have learned in this session.

An Introduction to Cryptography

What is Cryptographic Cryptographic Main security services achieved


Cryptography? Mechanisms Algorithms through cryptography

Cryptography is the Encryption Symmetric Key Cryptography Confidentiality


study of methods Substitution ciphers Integrity
Asymmetric Key Cryptography
used to transmit
Transposition ciphers
information securely Digital Certificates (Digital IDs Non-Repudiation
between two or more Digital Signatures
participants, so that
it is unreadable by Digital Certificates (Digital IDs
unauthorized users.

297
Session CRYPTOGRAPHY IN PRACTICE

Session

CRYPTOGRAPHY IN PRACTICE

298
Goal

This session provides


students with various hands-on practice exercises for the Cryptographic Algorithms and
Mechanisms in an illustrative way.

Learning objective

Dear Student
By the end of this Session, you should be able to:

Basic Encryption with


The Hash Function The Asymmetric Cryptography
the Substitution Cipher
mechanism. Algorithm.
Technique.

1 2 3 4 5 6

Basic Encryption with the


The Symmetric Cryptography The Digital Signature
Transposition Cipher
Algorithm. mechanism.
Technique.

299
Session CRYPTOGRAPHY IN PRACTICE

Learn

1 - Practice on Basic Encryption – Substitution Ciphers


You have learned in Session 3 how a message can be encrypted by using the Substitution cipher technique.
Use the CFY-KSU Cryptography Tool and do the following.

Encrypt a message with the Substitution cipher technique by using the CFY-KSU Cryptography
Tool. Send the encrypted message to your class friend through your KSU email.

(Hint: Use the option “Shift by 3”)

1 In the CFY-KSU Cryptography Tool, choose the “Basic Encryption” tab.


2 Enter your message in the “Plain Text” box.

3 Choose the “Substitution Cipher” option.


4 Choose the option “Shift by 3.”
5 Encrypt the message.
6 The Encrypted message will be shown in the “Cipher Text” box.
7 Copy the encrypted message and send it through your KSU email to one of your class friends.
8 Inform your friend of the encryption technique (Substitution cipher) that was used so that only he will be able to
decrypt the message correctly.

Decrypt an encrypted message that you have received in your KSU email from your class
friend by using the CFY-KSU Cryptography Tool.

Your friend has informed you that the Encryption technique Substitution cipher with “Shift by 3” was used while
encrypting the message.

1 In the CFY-KSU Cryptography Tool, choose the “Basic Encryption” tab.


2 Copy the encrypted message from your email and paste it into the “Cipher Text” box.
3 As per the information from your friend (the sender), choose the “Substitution” option and choose the “Shift by 3” Key.
4 Decrypt and read the message from your friend.

300
2 - Practices on Basic Encryption –Transposition Ciphers
You have learned in Session 3 how a message can be encrypted by using the Transposition cipher technique.
Use the CFY-KSU Cryptography Tool and do the following.

Encrypt a message with Transposition cipher technique by using the CFY-KSU Cryptography
Tool. Send the encrypted message to your class friend through your KSU email.

1 In the CFY-KSU Cryptography Tool, choose the “Basic Encryption” tab. NOTE
2 Enter your message in the “Plain Text” box. CFY-KSU
Cryptography
3 Choose the “Transposition Cipher” option. Tool uses the
“Rail Fence”
4 Encrypt the message. technique of
Transposition
5 The Encrypted message will be shown in the “Cipher Text” box. Cipher.
6 Copy the encrypted message and send it through your KSU email to your class friend.
7 Inform your friend of the encryption technique (Transposition) that was used so that only he will be able
to decrypt the message correctly.

Decrypt an encrypted message that you have received in your KSU email from your class
friend by using the CFY-KSU Cryptography Tool.

Your friend has informed you that the Encryption technique Transposition cipher was used while encrypting
the message.

1 In the CFY-KSU Cryptography Tool, choose the “Basic Encryption” tab.


2 Copy the encrypted message from your email and paste it into the “Cipher Text” box.
3 As per the information from your friend (the sender), choose the “Transposition” option.
4 Decrypt and read the message from your friend.

301
Session CRYPTOGRAPHY IN PRACTICE

3 - Practice on Hash Functions


As you know, in the Hash Function mechanism, the sender generates a Hash value which is sent along with the message (or
a file). The receiver generates the Hash value again and compares the two Hash Values. If they are not the same, the
message/file is compromised. Use the CFY-KSU Cryptography Tool and practice the Hash Functions as follows.

Generate a Hash Value for a file that you want to send safely to your friend by using the
CFY-KSU Cryptography Tool.

Send the Hash Value along with the file to your class friend through the KSU email.

1 In the CFY-KSU Cryptography Tool, choose the “Hash Functions” tab.


2 Upload your file in the Generate Hash Value section.
3 Generate the Hash Value and download it onto the desktop. Save it with the name “H1”.
4 Send this Hash Value along with the file to your class friend through your KSU email.

You have received a file and a Hash Value in your KSU email. Generate the Hash Value again
and compare it with the Hash Value received by using the CFY-KSU Cryptography Tool.

1 Download the file and the Hash Value from your KSU email and save it onto the desktop.
2 In the CFY-KSU Cryptography Tool, choose the “Hash Functions” tab.
3 Upload the file in the Generate Hash Value section.
4 Generate the Hash Value and download it onto the desktop. Save it with the name “H2”.
5 Now, in the Compare Hash Values section, upload the Hash Value “H1”, which was received in your KSU email.
6 Upload the Hash Value “H2”, which you have generated.
7 Compare the two Hash Values and check the result.

302
4- Practice on Symmetric Key Cryptography
As you know in Symmetric Key Cryptography algorithm, the sender and receiver share the same key, which is used for both
encryption and decryption. Use the CFY-KSU Cryptography Tool and practice Symmetric Key Cryptography as follows.

Generate a symmetric key using the CFY-KSU Cryptography Tool and share it with your
class friend.

1 In the CFY-KSU Cryptography Tool, choose the “Symmetric Key Cryptography” tab.
2 Generate a key and download it onto the desktop.
3 Share this key with your class friend.

(Hint: You may use the Flash drive, because you need to share it privately.)

ncry t a file with the Symmetric Key and send it to your class friend through your KSU email.

1 In the CFY-KSU Cryptography Tool, choose the “Symmetric Key Cryptography” tab.
2 In the Encrypt Section, upload the file you want to encrypt.
3 Upload the Symmetric Key.
4 Encrypt the file and download it onto the desktop.
5 Send this encrypted file to your friend through your KSU mail. Ask him to decrypt the file by using the
pre-shared key in the CFY-KSU Cryptography Tool.

ecry t the encry ted file that you have received in your KSU email with a ey
shared by your friend.

1 Download the encrypted file sent by your class friend in your KSU email and save it onto the desktop.
2 In the CFY-KSU Cryptography Tool, choose the “Symmetric Key Cryptography” tab.
3 Upload the encrypted file in the Decrypt section.
4 Upload the Symmetric Key, which was shared by your class friend separately.
5 Decrypt and download the decrypted file onto the desktop.
6 Open and check the original file.

303
Session CRYPTOGRAPHY IN PRACTICE

5 -Practice on Asymmetric Key Cryptography


As you know, in the Asymmetric Key Cryptography algorithm, the sender uses a Public key of the Receiver for the
encryption and the Receiver uses his Private key (which is paired with the Public key) for the decryption. Thus, a key
pair is required in the Asymmetric Key Cryptography algorithm.
Use the CFY-KSU Cryptography Tool and practice the Asymmetric Key Cryptography as follows.

Generate your Public and Private keys using the CFY-KSU Cryptography Tool and
share the Public key with your class friend.

1 In the CFY-KSU Cryptography Tool, choose the “Asymmetric Key Cryptography” tab.
2 Generate the Public and Private Keys and download them onto the desktop.
3 Share the Public key with your class friend.

(Hint: You can share it publicly or send it through your KSU email.)

ncry t a file with the shared ublic Key of your class friend by using the Y KSU
ry togra hy ool and send the encry ted file to him through your KSU email.

1 In the CFY-KSU Cryptography Tool, choose the “Asymmetric Key Cryptography” tab.
2 In the Encrypt section, upload the file.
3 Upload the shared Public Key of your class friend.
4 Encrypt the file and download it onto the desktop.
5 Send this encrypted file to your friend through your KSU mail. Ask him to decrypt the file by using the
pre-shared key in the CFY-KSU Cryptography Tool.

ecry t the encry ted file that you have received in your KSU email by using your rivate Key.

1 Download the encrypted file from your KSU email to the desktop.
2 In the CFY-KSU Cryptography Tool, choose the “Asymmetric Key Cryptography” tab.
3 In the Decrypt section, upload the encrypted file.
4 Upload your Private Key.
5 Decrypt and download the file onto the desktop.
6 Open and check the original file.

304
6 - Practice on Digital Signatures
As you learned about Digital Signatures in Session 3, the sender can generate a Digital Signature for a file by first generating
the Hash Value for it and then encrypting the Hash Value with a Private Key. Use the CFY-KSU Cryptography Tool and
practice the Digital Signatures as follows.

Generate a Private and a Public key using the CFY-KSU Cryptography Tool and share the
Public with your class friend.

1 In the CFY-KSU Cryptography Tool, choose the “Asymmetric Key Cryptography” tab.
2 Generate the Public and Private Keys and download them onto the desktop.
3 Share the Public key with your class friend.
(Hint: You can share it publicly or send it through your KSU email.)

Generate a igital Signature for your file using the Y KSU ry togra hy ool and
send it along with the file to your class friend.

1 From “Hash Functions” tab of the CFY-KSU Cryptography Tool, generate the Hash Value for the file.
Download and save this Hash Value onto the desktop.
2 Choose the “Digital Signatures” tab in the CFY-KSU Cryptography Tool.
3 In the Generate Digital Signature section, upload the Hash Value for the file.
4 Upload your Private Key.
5 Generate the Digital Signature and save it onto the desktop.
6 Send this Digital Signature along with your file to your class friend through your KSU email.

Verify a igitally signed file that you have received in your KSU email from your class
friend, by using the CFY-KSU Cryptography Tool.

1 First, generate the Hash Value for the received file. Use the “Hash Functions” tab of the CFY-KSU
Cryptography Tool. Download and save this Hash Value onto the desktop.
2 Choose the “Digital Signatures” tab in the CFY-KSU Cryptography Tool.
3 In the Verify section, upload the Hash Value generated.
4 Upload the Digital Signature received.
5 Upload the Public Key shared by your class friend.
6 Verify the Digital Signature and check the result.

305
Session CRYPTOGRAPHY IN PRACTICE

Apply

As Asymmetric Cryptography is slower and Symmetric is faster, it’s a common practice to use
Activity Asymmetric Cryptography only to share the Symmetric Key and to use Symmetric Cryptography
1 at both the ends.

Use the CFY-KSU Cryptography Tool to send an Encrypted “Symmetric Key” by using
Asymmetric Cryptography.
a - Encrypt a file with Symmetric Key Encryption by using the CFY-KSU Cryptography Tool.

b - Encrypt the generated “Symmetric Key” with Asymmetric Cryptography. Use the Receiver’s “Public
Key” for this encryption.

c - Send the encrypted “Symmetric Key” to the Receiver along with the encrypted file. It can be simply sent
by using email.

d - The receiver needs to Decrypt the “encrypted Symmetric Key” received with his “Private Key.” He gets
the “Symmetric Key,” with which he can decrypt the file easily.

We use Hash Functions for Data Integrity. What if, in the middle of communication,
Activity someone stops the file, modifies it, generates a new Hash value, and sends you the new ones?
2 For this reason, Hash Values are often sent encrypted.

Use the CFY-KSU Cryptography Tool to send an Encrypted “Hash Value” to your class friend
by using Asymmetric Cryptography.

a - Generate the Hash Value for a file.

b - Encrypt the Hash Value by using Asymmetric Cryptography.

c - Send the file and the encrypted Hash Value to your friend by using your ksu email.

d - Your friend should Decrypt the received encrypted Hash Value by using the Private Key.

e - He should generate the Hash Value again for the file at his end.

f - He should then compare the two Hash Values to ensure complete data integrity.

306

You might also like