Download as pdf or txt
Download as pdf or txt
You are on page 1of 150

Faculty of Computer &

Artificial Intelligence
Beni-Suef University

COMPUTER
Fundamentals

2024

Lecture Notes
Table of Contents

Chapter 1: An Introduction to Computers …………………………………………………… 1

- Introduction
- Data, Information and Program
- Computer Generations
- Components of a computer
- Types of Computers
- Computers in Society

Chapter 2: Number Systems ……………………………………………………………………… 22

- Introduction
- Bits and Bytes
- Decimal Number System
- Binary Number System
- Hexadecimal Number System
- Decimal to Binary Conversion
- Conversion of Fractional Decimal to Binary
- Conversion of Decimal to Hexadecimal
- Decimal-Hexadecimal Conversion
- How to convert from hex to decimal
- Binary-Hexadecimal Conversion
- Octal Representation
- Signed vs unsigned integers
- Coding Systems for Text-Based Data
- Coding Systems for Other Types of Data

Chapter 3: Computer Hardware ………………………………………………………………… 46

- Electrical Safety
- Computer Components – Functionality Viewpoint
- Computer Components – Devices Viewpoint
- The CPU (Central Processing Unit)
- Cooling Components
- Expansion
- Ports and Connectors
- How the CPU Works
- The System Clock and the Machine Cycle
- Memory Unit
- Input/output Devices
- Storage Devices

Chapter 4: Computer Software …………………………………………………………………. 88

- Introduction
- Types of Software
- System Software
- Processing Techniques for Increased Efficiency
- Differences Among Operating Systems
- Categories of Operating Systems
- Operating Systems for Personal Computers and Servers
- Operating Systems for Mobile Devices
- Device Drivers
- Utility Programs
- Application Software
- Software Licensing
- Open Systems
- Open Source Software

Chapter 5: Computer Networks ………………………………………………………………… 109

- Introduction
- Applications of Networks
- Benefits of Networks
- Types of Networks
- Network Topology
- Network Architectures
- Basics of Networking
- Internet
- World Wide Web (WWW)
- Home Network Hardware
Chapter 6: Computer Security …………………………………………………………………… 127

- Introduction
- Confidentiality
- Integrity
- Availability
- Assurance
- Authenticity
- Anonymity
- Threats and Attacks
- Encryption
- Passwords
- Viruses
- Backup
Chapter 1
An Introduction to
Computers

By the end of the chapter, student should


be able to:
- Define a computer.
- Identify the types of single user and multi-user computers.
- List the components of a computer system.
- Explain the difference between data, information and
program.
- Discuss the phases of the information processing cycle.
- Discuss the role of software as a part of the computer.
- Discuss how computers have shaped our world.

1
The computer is the loyal friend in whom you record your secrets and
memories. It is the kind friend whose advice and opinions you love to listen
to. It is the trustworthy person whose calculations and decisions you can rely
on. The computer is the virtual world that allows you to roam without
restrictions or compensation, and the world of reality through which you can
buy/sell and profit. The computer is the means of communicating with your
friends, relatives and colleagues. The computer is the only person who
listens to you tirelessly, no matter how young or old you are, poor or rich,
ignorant or knowledgeable.

The computer is everywhere around you: you find it in your home as a


breeder, in your factory as a producer, in your hand as a medic and rescuer,
in your college as a lecturer and teacher, in your kitchen as a helper, in your
library as a researcher, in your car as a guide.

Some people think that the computer is that desktop or laptop device that he
has always seen at home or laboratory, which is always distinguished by the
keyboard and screen. But if you look carefully, you will find the computer
around us in various forms and types: the car now contains a computer that
enables it to diagnose and solve many of its problems, the factory has
become dependent on the computer in production and product management,
the meteorological centers have a computer to collect information about the
weather and other operations, all stores and shops have computers to
manage sales, cell phones contain computers, and wristwatches often rely
on simple computers for stopwatch and calendar functions.

So, computers are everywhere. From office desks to kitchen tables, from
library tables to people’s laps in coffee shops, the screen and keyboard
combination is a familiar sight. But if you look more carefully, you’ll discover
that computers exist in even more places than you first realize. Cash
registers in stores have computers inside that calculate prices and help
manage inventory. Most cars produced today have diagnostic computers to
help find problems and improve performance.

2
Many workers who once had little use for technology now interact with
computers almost every minute of the workday. At home, people use
computers to read the news, play games, and keep in touch with family and
friends. News from around the world is instantly available. More and more
people have international friends and colleagues, and they can use
computers to communicate.

What is Computer?
A computer is a programmable, electronic device that accepts data, performs
operations on that data, and stores the data.

It follows instructions, called programs, which determine the tasks the


computer will perform.

A computer has five Basic Operations:


– Input: Entering data into the computer
– Processing: Performing operations on the data
– Output: Presenting the results
– Storage: Saving data, programs, or output for future use
– Communications: Sending or receiving data

3
Data, Information and Program

Computer is a tool for solving problems. Computers accept instructions and


data, perform arithmetic and logical operations and produce information.
Hence the instructions and data fed into the computer are converted into
information through processing.

Basically data is a collection of facts from which information may be derived.


Data is defined as an un-processed collection of raw facts in a manner
suitable for communication, interpretation or processing.
Hence data are:
- Stored facts
- Inactive
- Technology based
- Gathered from various sources
On the other hand information is a collection of facts from which conclusions
may be drawn. Data that has been interpreted, translated, or transformed to
reveal the underlying meaning. This information can be represented in
textual, numerical, graphic, cartographic, narrative, or audiovisual forms.

Hence information are:


- Processed facts
- Active
- Business based
- Transformed from data.

4
Algorithm is defined as a step-by-step procedure or formula for solving a
problem i.e. a set of instructions or procedures for solving a problem. It is
also defined as a mathematical procedure that can usually be explicitly
encoded in a set of computer language instructions that manipulate data. A
computer program (or set of programs) is designed to systematically solve
a problem. The programmer must decide the program requirements,
develop logic and write instructions for the computer in a programming
language that the computer can translate into machine language and
execute. Hence, problem solving is an act of defining a problem,
understanding the problem and arriving at workable solutions. In other
words, problem solving is the process of confronting a novel situation,
formulating connection between the given facts, identifying the goal of the
problem and exploring possible methods for reaching the goal. It requires the
programmer to co-ordinate previous experience and intuition in order to
solve the problem.

Computer Generations

Computers have evolved significantly over the years, and the history of
computers is often divided into generations based on the technology used.
Each generation of computers has built upon the advancements of the
previous generation, leading to the computers we use today. Here are the
five generations of computers:
• First Generation (1940s-1950s): The first computers used vacuum
tubes for processing and magnetic drums for storage. They were large,
expensive, and unreliable.
• Second Generation (1950s-1960s): The second generation of
computers replaced vacuum tubes with transistors, making them
smaller, faster, and more reliable. Magnetic core memory was also
introduced, which was faster and more reliable than magnetic drums.
• Third Generation (1960s-1970s): The third generation of computers
used integrated circuits, which allowed for even smaller and faster
computers. They also introduced magnetic disk storage and operating
systems.
• Fourth Generation (1970s-1980s): The fourth generation of
computers saw the introduction of microprocessors, which made

5
personal computers possible. They also introduced graphical user
interfaces and networking.
• Fifth Generation (1980s-Present): The fifth generation of computers
is still ongoing, and is focused on artificial intelligence and parallel
processing. This generation also saw the development of mobile
computing and the internet.

Components of a Computer

A computer system has two major components, hardware and software. In


practice, the term hardware refers to all the physical items associated with a
computer system. Software is a set of instructions, which enables the
hardware to perform a specific task.

Hardware: The physical parts of a computer


– Internal hardware
• Located inside the main box (system unit) of the computer
– External hardware
• Located outside the system unit
• Connect to the computer via a wired or wireless connection

6
Hardware Devices:

As shown in the following figure. Hardware devices are associated with all
five computer operations as follows.
Input Devices:
– Used to input data into the computer
– Keyboards, mice, scanners, cameras, microphones, touch pads,
touch screens, fingerprint readers, etc.
Processing Devices:
– Perform calculations and control computer’s operation
– Central processing unit (CPU) and memory
Output Devices:
– Present results to the user
– Monitors, printers, speakers, projectors, etc.

7
Storage Devices:
– Used to store data on or access data from storage media
– Hard drives, CD/DVD discs and drives, USB flash drives, etc.
Communication Devices:
– Allow users to communicate with others and to electronically access
remote information
– Modems, network adapters, routers, etc.

Software
The programs or instructions used to tell the computer hardware what to do.
Two types of software:
System Software:
– Operating system starts up the computer and controls its
operation
– Without OS, computer cannot function
– Boots the computer and launches programs at the user’s
direction
– Most use a GUI to interact with the user via icons, buttons, tiles,
etc.
– Windows, Mac OS, Linux, Android, etc.
Application Software:
– Performs specific tasks or applications
• Creating letters, budgets, etc.
• Managing inventory and customer databases
• Editing photographs
• Scheduling appointments
• Viewing Web pages
• Exchanging e-mail • Burning DVDs
• Designing homes

8
• Playing games
Examples of application software:
– Word processing programs
– Multimedia programs
– Web browsers
– E-mail programs

Computer Users and Professionals

Computer Users (end users):


– People who use a computer to obtain information
Computer professionals include:
– Programmers: Write programs computers use
– Systems analysts: Design computer systems
– Computer operations personnel: Manage day-to-day computer
operations
– Security specialists: Secure computers and networks against
hackers
The relationship among hardware, software, and users could be shown in
the following figure.

9
Types of Computers

Following are 6 basic categories of computers.


– Embedded computers
– Mobile devices
– Personal computers
– Servers
– Mainframe computers
– Supercomputers
Now, we are going to discuss each of them in details.

Embedded computers:
Embedded computers are everywhere. They are in phones, microwaves,
airplanes, automobiles, calculators… The list goes on and on. An embedded
computer, which is an integral component of most embedded systems, is a
combination of hardware and software that is designated to perform a highly
specific function. For example, the type of embedded computer in a washing
machine will not be the same as the embedded computer in a Nikon camera.
Because the software in embedded computers is designed to only execute
certain tasks, the computer’s software in one device can be totally distinct
from that of another. The hardware of an embedded computer is also
specially designed to withstand stresses in its intended environment. For
instance, an embedded computer installed under the hood of a car is
designed to withstand high temperatures.

Mobile Devices:
A mobile device is a general term for any type of handheld computer. These
devices are designed to be extremely portable, and they can often fit in your
hand. Some mobile devices—like tablets, e-readers, and smartphones—are
powerful enough to do many of the same things you can do with a desktop
or laptop computer.

10
Tablet computers:
Like laptops, tablet computers are designed to be
portable. However, they provide a different computing
experience. The most obvious difference is that tablet
computers don't have keyboards or touchpads.
Instead, the entire screen is touch-sensitive, allowing
you to type on a virtual keyboard and use your finger
as a mouse pointer.
Tablet computers can't necessarily do everything
traditional computers can do. For many people, a
traditional computer like a desktop or laptop is still
needed in order to use some programs. However, the
convenience of a tablet computer means it may be
ideal as a second computer.

E-readers:
E-book readers—also called e-readers—
are similar to tablet computers, except they
are mainly designed for reading e-
books (digital, downloadable books).
Notable examples include the Amazon
Kindle, Barnes & Noble Nook, and Kobo.
Most e-readers use an e-ink display, which
is easier to read than a traditional computer
display. You can even read in bright
sunlight, just like if you were reading a
regular book.
You don't need an e-reader to read e-books.
They can also be read
on tablets, smartphones, laptops,
and desktops.

11
Smartphones:
A smartphone is a more powerful
version of a traditional cell
phone. In addition to the same
basic features—phone calls,
voicemail, text messaging—
smartphones can connect to the
Internet over Wi-Fi or a cellular
network (which requires
purchasing a monthly data plan).
This means you can use a
smartphone for the same things
you would normally do on a computer, such as checking your email,
browsing the Web, or shopping online.
Most smartphones use a touch-sensitive screen, meaning there isn't a
physical keyboard on the device. Instead, you'll type on a virtual keyboard
and use your fingers to interact with the display. Other standard features
include a high-quality digital camera and the ability to play digital music and
video files. For many people, a smartphone can actually replace electronics
like an old laptop, digital music player, and digital camera in the same device.

Personal computers
Computer could be classified as single-user and multi-user computer. The
former one (known as personal computers (PCs)) is designed to be used by
only one person at a time, while the later one is designed to work by multiple
users. Personal computers may have separate work spaces and storage for
several different users (those in a computer lab are probably set up that way),
but only one user can work with the machine at a time. Personal computers
are also called microcomputers because they are among the smallest
computers created for people to use. Although personal computers are used
by individuals, they can be connected together to create networks, allowing
users to share information from computer to computer.

Multi-users computers are created to handle the needs of many users at the
same time. These powerful systems are most often used by businesses or
schools, and are commonly found at the heart of an organization’s network.
Each user interacts with the computer through his or her own input and

12
output hardware, freeing people from having to wait their turn at a single
keyboard and monitor. The largest organizational computers support
thousands of individual users at the same time, from thousands of miles
away. While some of these large-scale systems are devoted to a special
purpose, enabling users to perform only a few specific tasks, many
organizational computers are general-purpose systems that support a wide
variety of tasks.

Desktop computers:
Desktop computers are personal
computers designed for regular
use at a single location on or near
a desk or table due to its size and
power requirements. Desktop
computers are powerful and
versatile, and they are used for an
amazing array of tasks. Not only
do these machines enable people
to do their jobs with greater ease and efficiency, but they can be used to
communicate, produce music, edit photographs and videos, play
sophisticated games, and much more. Used by everyone from preschoolers
to nuclear physicists, desktop computers are indispensable for learning,
work, and play. As its name implies, a desktop computer is a full-size
computer that is too big to be easily carried around. The main component of
a desktop PC is the system unit, which is the case that houses the
computer’s critical parts, such as its processing and storage devices.

Workstations:
A workstation is a special
computer designed for
technical or scientific
applications. It has more power
and features than a standard
desktop PC. These machines
are popular among scientists,
engineers, and animators who
need a system with greater-
than-average speed and the
13
power to perform sophisticated tasks. Workstations often have large, high-
resolution monitors and accelerated graphics-handling capabilities, making
them suitable for advanced architectural or engineering design, modeling,
animation, and video editing.

Laptop (Notebook) computers:

A laptop, often called a notebook or


"notebook computer", is a small,
portable personal computer.
Laptops are folded shut for
transportation, and thus are suitable
for mobile use. Although originally
there was a distinction between
laptops and notebooks, the former
being bigger and heavier than the
latter, as of 2014, there is often no
longer any difference. Laptops are commonly used in a variety of settings,
such as at work, in education, and for personal multimedia and home
computer use. A laptop combines the components, inputs, outputs, and
capabilities of a desktop computer, including the display screen,
small speakers, a keyboard, pointing devices (such as a touchpad or
trackpad), a processor, and memory into a single unit. Most 2016-era laptops
also have integrated webcams and built-in microphones. Some 2016-era
laptops have touch screens. Laptops can be powered either from an
internal battery or by an external power supply from an AC adapter.
Hardware specifications, such as the processor speed and memory capacity,
significantly vary between different types, makes, models and price points.

Servers

A medium-sized computer used to host programs and data for a small


network. Sometimes, it referred to as a minicomputer. Users connect via a
network with a computer, thin client, or dumb terminal.

14
Today, most organizations’ networks are based on personal computers.
Individual users have their own desktop computers, and those computers
are linked together in a network to allow convenient file and information
sharing between users. When all people use their computers for a common
purpose (for example, running e-mail programs or working on documents),
a special, central computer called a network server is added to the network.
A network server is a powerful personal computer with special software and
equipment that enable it to function as the primary computer in the network.

Though their exact functions are different from organization to organization,


network servers all have the basic task of making documents, programs, and
in some cases other computer hardware available to others. For example, a
network server might run the e-mail services for a company. Rather than
having each employee run his or her own mail program, employees simply
access the central e-mail program running on the server to retrieve their
messages. Network servers are also responsible for sending Web pages to
users who are browsing the Internet; a single server can send its Web pages
to thousands of people visiting the site that it hosts. Often, the requests from
the network grow so large and complex that a single PC cannot handle the
job by itself. In such cases, network server computers are linked together to
share the load. In some cases, dozens or even hundreds of individual
servers work together to manage data processing requests. The following
are different types of servers.

15
Web server:
An open-source web server is used for accessing the world wide web
through public domain software. These servers connect stored information
from an internet website to your own computer. Web servers store
information for the internet that is retrieved via "HTTP" code and sent to your
web browser. This is one of the most widely used types of servers.

Proxy Server:
Proxy servers act as a bridge between a host server and a client server. A
proxy sends data from a website to your computer IP address after it passes
through the proxy's server. This practice adds a layer of security since the
information is requested then transferred from the source to the proxy server
and never directly from a client to another user. A proxy server can filter out
various harmful internet entities.

File transfer protocol (FTP) server:


FTP servers are used to relocate files from one computer to another.
Uploaded files move from your computer to the server while downloaded files
are extracted from the server onto your device. File transfer protocol also
refers to the method of using a server to connect one computer to another in
order to share data safely.

Application server:
These servers connect clients to software applications through virtual server
connections. This allows users to bypass downloading data to their own
hardware in order to access applications. Application servers can effectively
host large amounts of application data to many users at once, making them
ideal for businesses.

File server:
A file server stores data files for multiple users. They allow for faster data
retrieval and saving or writing files to a computer. This is a basic type of
server used commonly by organizations where lots of users need access to
files that are more conveniently and safely stored on a server than a personal
computer.

16
Database server:
Database servers function as large storage spaces that organizations use
and access to run multiple programs to meet their needs. A database server
can run independently of any database architecture.

Mail server:
A mail server stores and delivers mail for clients through email service
platforms. Because mail servers are set up to continually connect to a
network, individual users can access their email without running any systems
through their own devices.
Mainframe computers:

Mainframe computers are large, powerful systems used in organizations


such as hospitals, universities, large businesses, government offices
insurance companies and banks, where many people frequently need to use
the same data. In a traditional mainframe environment, each user accesses
the mainframe’s resources through a device called a terminal. There are two
kinds of terminals. A dumb terminal does not process or store data; it is
simply an input/output (I/O) device that functions as a window into a
computer located somewhere else. An intelligent terminal can perform some
processing operations, but it usually does not have any storage. In some
17
mainframe environments, however, workers can use a standard personal
computer to access the mainframe. The largest mainframes can handle the
processing needs of thousands of users at any given moment. Most
mainframe systems are designed to handle only a specific set of tasks.
Mainframes usually operate 24 hours a day.
Supercomputers:

Supercomputers are the most powerful computers and physically they are
some of the largest. These systems can process huge amounts of data, and
the fastest supercomputers can perform nearly two quadrillion calculations
per second. Some supercomputers link together hundreds of thousands of
processors. Supercomputers are ideal for handling large and highly complex
problems that require extreme calculating power. For example,
supercomputers are actively used in the mapping of the human genome,
forecasting weather, and modeling complex processes like nuclear fission. It
can cost several million dollars each. Supercomputers tend to be very large
and contain a large number of CPUs. Titan is one of the fastest computers
in the world.

18
Computers in Society

Computers provide benefits to society in a wide spectrum of different fields:


they provide jobs, improve communication, help with the education process
and are even able to improve medical processes. The compounding impacts
of the benefits of computers can be hard to measure specifically because of
how deeply computers have become involved in many industries. Even in
some industries that don't traditionally use such technologies, computers
help improve communication efficiency.

People can list countless reasons for the importance of computers. For
someone with a disability, for example, a computer may offer freedom to
communicate, learn, or work without leaving home. For a sales professional,
a PC may mean the ability to communicate whenever necessary, track leads,
and to manage an ever-changing schedule. For a researcher, a computer
may be the workhorse that does painstaking and time-consuming
calculations. Let’s take a look at where computers are found in our society
and what they do there.

Computers at Home:

- Communication: Electronic mail (e-mail) allows family members to


communicate with one another and to stay in contact with friends and
co-workers. Social Web sites such as Facebook help extended families
and groups of friends stay in touch and share their lives. Services like
Twitter take the “keep in touch” idea even further, allowing people to
broadcast quick updates, thoughts, and items of interest throughout
the day. It’s more common than ever for computer users to meet and
make friends with people all over the world, no matter where they live.
Business work done at home. It is possible for many users to connect
to their employer’s network from home. Computers also are making it
easier for people to start their own home-based businesses.
- School: Today’s students are increasingly reliant on computers, and
not just as a replacement for typewriters. The Internet is replacing
printed books as a reference tool, and easy-to-use software makes it
possible for even young users to create documents.

19
- Entertainment: Computers and video game consoles are intensely
popular, with an endless variety of games from solitaire to simulating
your own living room rock band. People can play games alone, with a
family member, or go online to play with tens of thousands of others in
a single, massive fantasy or sci-fi world. PCs can also serve as media
centers, storing music, videos, and movies for on-demand playback on
other computers, consoles, and televisions throughout the home.
- Creativity: Poetry, music, painting, essays on the state of the world,
funny stories—these once required publishers and marketing efforts to
produce. Now, with blogs, personal Web pages, and Web sites for
sharing pictures and video clips, people can create anything to their
hearts’ content and share it with an audience.
- Finances and Shopping: Home users rely on their PCs for bill paying,
investing, and other financial chores. They also use computers to
spend what they earn, shopping online for everything from cars to
collectibles. Many of the users now rely on Internet to sell their old cars,
used mobiles, etc.

Computers in Education:

- Computers provide an invaluable tool in education, primarily in the


acquisition and analysis of data used for research. Fields such as
science, writing composition, mathematics and history all benefit from
access to the Internet. Educational programs designed to stimulate
learning provide alternative ways for students to learn a subject.
- More and more schools are adding computer technology to their
curricula, not only teaching pure computer skills, but also incorporating
those skills into other classes. Students may be required to use a
drawing program or use spreadsheet software. Educators see
computer technology as an essential learning requirement for all
students, starting as early as preschool. Even now, basic computing
skills such as keyboarding are being taught in elementary schools, and
kids are taught how to search online for information at an early age.
- Computer technology has also brought more opportunities for
education to a large population. With Internet access available in small
towns and remote areas, students can join online classes taught at
universities around the world, learning new subjects and completing
classes without having to leave their hometowns.

20
Computers in Business:

- Small Business: Many of today’s successful small companies simply


could not exist without computer technology. Each year, hundreds of
thousands of individuals launch businesses based from their homes or
in small-office locations. They rely on inexpensive computers and
software not only to perform basic work functions but also to manage
and grow their companies.
- Industry: Computers are used to design and makes products. Freight
companies need computers to manage the thousands of ships, planes,
trains, and trucks that are moving goods at any given moment. In
addition to tracking vehicle locations and contents, computers can
manage maintenance, driver schedules, invoices and billing, and many
other activities. Furthermore, modern assembly lines can be massive,
complex systems, and a breakdown at one point can cause chaos
throughout a company. Sophisticated process-control systems can
oversee output, check the speed at which a machine runs, manage
conveyance systems, and look at parts inventories, with very little
human interaction.

Computers for Government: Not only are governments big consumers of


technology, but they help to develop it as well. For example, U.S.
government played a key role in developing the Internet. Today, computers
play a crucial part in every government agency. Computers are used in
military for tasks including everything from payroll management and
weapons control to games and simulations that teach combat skills.
Governments use computers to calculate and collect taxes. Computers are
used by police officers to search for information on criminals, crime scenes,
and procedures. Also, one of the most important uses of computers by
governments is making health care more efficient and accurate. Many
different health care procedures now involve computers, from ultrasound and
magnetic resonance imaging to laser eye surgery and fetal monitoring.
Surgeons now can use robotic surgical devices to perform delicate
operations and even to conduct surgeries remotely.

21
Chapter 2
Number Systems

By the end of the chapter, student should


be able to:

- Define Bit and Byte.


- List the relationships among bit, byte,
kilobyte, megabyte, gigabyte, …
- Discuss the different number systems
(Binary, Octal, Decimal, Hexadecimal).
- Convert a number from one system to
another
- Represent signed and unsigned numbers

22
Introduction
There are several kinds of data such as, numeric, text, date, graphics,
image, audio and video that need to be processed by a computer. The text
data usually consist of standard alphabetic, numeric, and special
characters. The graphics data consist of still pictures such as drawings and
photographs. Any type of sound, including music and voice, is considered
as audio data. Video data consist of motion pictures. The data has to be
converted into a format that the computer understands. Data can be
classified into two forms, analog data and digital data. Analog data can
have any value within a defined range and it is continuous. Sound waves,
telephone signals, temperatures and all other signals that are not broken
into bits are examples of analog data. Digital data can be represented by a
series of binary numbers and it is discrete.

The Arithmetic and Logic Unit (ALU) of the computer performs arithmetic
and logical operations on data. Computer arithmetic is commonly
performed on two different types of numbers, integer and floating point. As
the hardware required for arithmetic is much simpler for integers than
floating point numbers, these two types have entirely different
representations. An integer is a whole number and the floating-point
number has a fractional part. To understand about how computers store
data in the memory and how they handle them, one must know about bits
and bytes and the number systems.

Bits and bytes are common computer jargons. Both the main memory
(Random Access Memory or RAM) and the hard disk capacities are
measured in terms of bytes. The hard disk and memory capacity of a
computer and other specifications are described in terms of bits and bytes.
For instance, a computer may be described as having a 32-bit Pentium
processor with 128 Megabytes of RAM and hard disk capacity of 100
Gigabytes.

Bits and Bytes


A numbering system is a way of representing numbers. The most
commonly used numbering system is the decimal system. Computer
systems can perform computations and transmit data thousands of times

23
faster in binary form than they can use decimal representations. It is
important for every one studying computers to know how the binary system
and hexadecimal system work. A bit is small piece of data that is derived
from the words “binary digit”. Bits have only two possible values, 0 and 1. A
binary number contains a sequence of 0s and 1s like 10111. A collection of
8 bits is called as a byte. With 8 bits in a byte, we can represent 256 values
ranging from 0 to 255 as shown below:

0 = 0000 0000
1 = 0000 0001
2 = 0000 0010
3 = 0000 0011
………….
………….
………….
254 = 1111 1110
255 = 1111 1111

Bytes are used to represent characters in a text. Different types of coding


schemes are used to represent the character set and numbers. The most
commonly used coding scheme is the American Standard Code for
Information Interchange (ASCII). Each binary value between 0 and 127 is
used to represent a specific character. The ASCII value for a blank
character (blank space) is 32 and the ASCII value of numeric 0 is 48. The
range of ASCII values for lower case alphabets is from 97 to 122 and the
range of ASCII values for the upper case alphabets is 65 to 90.

Computer memory is normally represented in terms of Kilobytes,


Megabytes, or Gigabytes. In metric system, one Kilo represents 1000, that
is, 103. In binary system, one Kilobyte represents 1024 bytes, that is, 210.
The following table shows the representation of various memory sizes.

24
In a 2GB (Gigabytes) storage device (hard disk), totally 21,47,483,648
bytes can be stored. Nowadays, databases having size in Terabytes are
reported; Zetta and Yotta size databases are yet to come.

Decimal Number System

In our daily life, we use a system based on digits to represent numbers.


The system that uses the decimal numbers or digit symbols 0 to 9 is called
as the decimal number system. This system is said to have a base, or
radix, of ten. Sequence of digit symbols are used to represent numbers
greater than 9. When a number is written as a sequence of decimal digits,
its value can be interpreted using the positional value of each digit in the
number. The positional number system is a system of writing numbers
where the value of a digit depends not only on the digit, but also on its
placement within a number. In the positional number system, each decimal
digit is weighted relative to its position in the number. This means that each
digit in the number is multiplied by ten raised to a power corresponding to
that digit’s position. Thus the value of the decimal sequence 948 is:

25
(948)10 = 9 X 102 + 4 X 101 + 8 X 100

Fractional values are represented in the same manner, but the exponents
are negative for digits on the right side of the decimal point. Thus the value
of the fractional decimal sequence 948.23 is:
(948.23)10 = 9 X 102 + 4 X 101 + 8 X 100 + 2 X 10-1 + 3 X 10-2

Binary Number System


Ten different digits 0 – 9 are used to represent numbers in the decimal
system. There are only two digits in the binary system, namely, 0 and 1.
The numbers in the binary system are represented to the base two and the
positional multipliers are the powers of two. The leftmost bit in the binary
number is called as the most significant bit (MSB) and it has the largest
positional weight. The rightmost bit is the least significant bit (LSB) and has
the smallest positional weight. The binary sequence (10111)2 has the
decimal equivalent:
(10111)2 = 1 X 24 + 0 X 23 + 1 X 22 + 1 X 21 + 1 X 20
= 16 + 0 + 4 + 2 + 1
= (23)10

The decimal equivalent of the fractional binary sequence can be estimated


in the same manner. The exponents are negative powers of two for digits
on the right side of the binary point. The binary equivalent of the decimal
point is the binary point. Thus the decimal value of the fractional binary
sequence (0.1011)2 is:
(0.1011)2 = 1 X 2-1 + 0 X 2-2 + 1 X 2-3 + 1 X 2-4
= 0.5 + 0 + 0.125 + 0.0625
= (0.6875)10

26
Hexadecimal Number System
Hexadecimal representation of numbers is more efficient in digital
applications because it occupies less memory space for storing large
numbers. A hexadecimal number is represented using base 16.
Hexadecimal or Hex numbers are used as a shorthand form of binary
sequence. This system is used to represent data in a more compact
manner. In the hexadecimal number system, the binary digits are grouped
into sets of 4 and each possible combination of 4 binary digits is given a
symbol as follows:

Since 16 symbols are used, 0 to F, the notation is called hexadecimal. The


first ten symbols are the same as in the decimal system, 0 to 9 and the
remaining six symbols are taken from the first six letters of the alphabet
sequence, A to F. The hexadecimal sequence (2C)16 has the decimal
equivalent:

(2C)16 = 2 X 161 + C X 160


= 32 + 12
= (44)10

27
The hexadecimal representation is more compact than binary
representation. It is very easy to convert between binary and hexadecimal
systems. Each hexadecimal digit will correspond to four binary digits
because 24 = 16. The hexadecimal equivalent of the binary sequence
(110010011101)2 is:
1100 1001 1101 = (C9D)16
C 9 D

Decimal to Binary Conversion


To convert a binary number to a decimal number, it is required to multiply
each binary digit by the appropriate power of 2 and add the results. There
are two approaches for converting a decimal number into binary format.

Repeated Division by 2
Any decimal number divided by 2 will leave a remainder of 0 or 1.
Repeated division by 2 will leave a string of 0s and 1s that become the
binary equivalent of the decimal number. Suppose it is required to convert
the decimal number M into binary form, dividing M by 2 in the decimal
system, we will obtain a quotient M1 and a remainder r1, where r1 can have
a value of either 0 or 1.
M = 2 * M1 + r1 ; r1 = 0 or 1

Next divide the quotient M1 by 2. The new quotient will be M2 and the new
remainder r2.
M1 = 2 * M2 + r2; r2 = 0 or 1
so, M = 2 (2 * M2 + r2) + r1
= M2 X 22+ r2 X 21 + r1 X 20
Next divide the quotient M2 by 2. The new quotient will be M3 and the new
remainder r3.
M2 = 2 X M3 + r3
So, M = 2 (2 X (2 X M3 + r3) + r2) + r1
= 22(2 X M3 + r3) + r2 X 21 + r1 X 20
= M3 X 23+ r3 X 22 + r2 X 21 + r1 X 20
28
The above process is repeated until the quotient becomes 0, then
M = 1 X 2k + rk X 2k-1 + …. + r3 X 22 + r2 X 21 + r1 X 20

Example:
Convert (23)10 into its equivalent binary number.

To write the binary equivalent of the decimal number, read the remainders
from the bottom upward as:
(23)10 = (10111)2

The number of bits in the binary number is the exponent of the smallest
power of 2 that is larger than the decimal number. Consider a decimal
number 23. Find the exponent of the smallest power of 2 that is larger than
23.
16 < 23 < 32
24 < 23 < 25

Hence, the number 23 has 5 bits as 10111.

Example:
What is the number of bits in the binary representation of the decimal
number 36 without actually converting into its binary equivalent?
The next immediate large number than 36 that can be represented in
powers of 2 is 64.
32 < 36 < 64
25 < 36 < 26

29
Hence, the number 36 should have 6 bits in its binary representation.

Sum of Powers of 2
A decimal number can be converted into a binary number by adding up the
powers of 2 and then adding bits as needed to obtain the total value of the
number. For example, to convert (36)10 to binary:
- Find the largest power of 2 that is smaller than or equal to 36
(36)10 > (32)10
- Set the 32’s bit to 1 and subtract 32 from the original number.
[36 – 32 = 4]
- 16 is greater than the remaining total. Therefore, set the 16’s bit to 0
- 8 is greater than the remaining total. Hence, set the 8’s bit to 0
- As the remaining value is itself in powers of 2, set 4’s bit to 1 and
subtract 4. [4 – 4 = 0]

Conversion is complete when there is nothing left to subtract. Any


remaining bits should be set to 0. Hence:
(36)10 = (100100)2
The conversion steps can be given as follows:
32 16 8 4 2 1
1 36 – 32 = 4
32 16 8 4 2 1
1 0 0 1 4–4=0
32 16 8 4 2 1
1 0 0 1 0 0

Hence: (36)10 = (100100)2

Example:
Convert (91)10 to binary using the sum of powers of 2 method.
The largest power of 2 that is smaller than or equal to 91 is 64.

30
64 32 16 8 4 2 1
1 91- 64 = 27
64 32 16 8 4 2 1
1 0 1 91-(64+16) = 11
64 32 16 8 4 2 1
1 0 1 1 91-(64+16+8)= 3
64 32 16 8 4 2 1
1 0 1 1 0 1 91-(64+16+8+2) = 1
64 32 16 8 4 2 1
1 0 1 1 0 1 1 91-(64+16+8+2+1) = 0

Hence (91)10 = (1011011)2

Conversion of Fractional Decimal to Binary

The decimal fractions like 1/2, 1/4, 1/8 etc., can be converted into exact
binary fractions. Sum of powers method can be applied to these fractions.
(0.5)10 = 1 X 2-1 = (0.1)2
(0.25)10 = 0 X 2-1 + 1 X 2-2 = (0.01)2
(0.125)10 = 0 X 2-1 + 0 X 2-2 + 1 X 2-3 = (0.001)2

The fraction 5/8 = 4/8 + 1/8 = 1/2 + 1/8 has the binary equivalent:
5/8 = 1 X 2-1 + 0 X 2-2 + 1 X 2-3
= (0.101)2

Exact conversion is not possible for the decimal fractions that cannot be
represented in powers of 2. For example, (0.2)10 cannot be exactly
represented by a sum of negative powers of 2. A method of repeated
multiplication by 2 has to be used to convert such kind of decimal fractions.
The steps involved in the method of repeated multiplication by 2:

31
- Multiply the decimal fraction by 2 and note the integer part. The
integer part is either 0 or 1.
- Discard the integer part of the previous product. Multiply the fractional
part of the previous product by 2. Repeat the first step until the
fraction repeats or terminates.
The resulting integer part forms a string of 0s and 1s that become the
binary equivalent of the decimal fraction.

Example:

(Fraction repeats, the product is the same as in the first step)


Read the integer parts from top to bottom to obtain the equivalent fractional
binary number. Hence (0.2)10 = (0.00110011…)2

Conversion of Decimal to Hexadecimal

Decimal numbers’ conversion to hexadecimal is similar to binary


conversion. Decimal numbers can be converted into hexadecimal format by
the sum of weighted hex digits method and by repeated division by 16. The
sum of weighted hex digits method is suitable for small decimal numbers of
maximum 3 digits. The method of repeated division by 16 is preferable for
the conversion of larger numbers.
The exponent of the smallest power of 16 that is greater than the given
decimal number will indicate the number of hexadecimal digits that will be
present in the converted hexadecimal number. For example, the decimal

32
number 948, when converted into hexadecimal number has 3 hexadecimal
digits.
(163 = 4096) > 948 > (162 = 256)
Hence, the hexadecimal representation of 948 has 3 hex digits. The
conversion process is as follows:
162 161 160
3 948 – (3 X 256) = 180
162 161 160
3 B 948 – (3 X 256 + 11 X 16) = 4
162 161 160
3 B 4 948 – (3 X 256 + 11 X 16 + 4) = 0
Hence, (948)10 = (3B4)16

The steps involved in the repeated division by 16 to obtain the hexadecimal


equivalent are as follows:
- Divide the decimal number by 16 and note the remainder. Express
the remainder as a hex digit.
- Repeat the process until the quotient is zero

Example:

33
Decimal-Hexadecimal Conversion
Hexadecimal to decimal: expand using positional notation
Conversion steps:
1. Divide the number by 16.
2. Get the integer quotient for the next iteration.
3. Get the remainder for the hex digit.
4. Repeat the steps until the quotient is equal to 0.

Example 1;
Convert 756210 to hex:
Division Quotient Remainder Remainder
Digit #
by 16 (integer) (decimal) (hex)

7562/16 472 10 A 0

472/16 29 8 8 1

29/16 1 13 D 2

1/16 0 1 1 3
So 756210 = 1D8A16

Example 2:
Convert 3563110 to hex:
Division Remainder Remainder
Quotient Digit #
by 16 (decimal) (hex)

35631/16 2226 15 F 0

2226/16 139 2 2 1

139/16 8 11 B 2

8/16 0 8 8 3

34
So 3563110 = 8B2F16

How to convert from hex to decimal

Example 1:
3B in base 16 is equal to each digit multiplied with its corresponding 16n:
3B16 = 3×161+11×160 = 48+11 = 5910

Example 2:
E7A9 in base 16 is equal to each digit multiplied with its corresponding 16n:
E7A916 = 14×163+7×162+10×161+9×160 = 57344+1792+160+9 = 5930510

Example 3:
0.8 in base 16:
0.816 = 0×160+8×16-1 = 0+0.5 = 0.510

Binary-Hexadecimal Conversion

How to convert binary to hex


Convert every 4 binary digits (start from bit 0) to 1 hex digit, with this table:

Binary Hex
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5

35
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F

Example:
Convert binary 11011002 to hex:
Convert every 4 binary bits (from bit0) to hex digit:
11011002 = 110 1100 = 6 C = 6C16

How to convert hex to binary


Convert every hex digit (start lowest digit) to 4 binary digits, with this table:
Hex Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110

36
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Example;
Convert hex 6C16 to binary:
6C16 = 6 C = 110 1100 = 11011002

Octal Representation

An octal number is represented using base 8. Octal representation is just a


simple extension of binary and decimal representations but using only the
digits 0 to7. To convert an octal number to a decimal number, it is required
to multiply each octal digit by the appropriate power of 8 and add the
results.

Example: What is the decimal value of the octal number (711)8?


7 X 82 + 1 X 81 + 1 X 80 = (457)10
The steps involved in the repeated division by 8 to obtain the octal
equivalent are as follows:
- Divide the decimal number by 8 and note the remainder. Express the
remainder as an octal digit.
- Repeat the process until the quotient is zero
What is the octal representation of the decimal number (64)10?

37
Hence (64)10 = (100)8

Signed vs Unsigned Integers

Variables such as integers can be represented in two ways, i.e., signed


and unsigned. Signed numbers use sign flag or can distinguish between
negative values and positive values. Whereas unsigned numbers stored
only positive numbers but not negative numbers.
Number representation techniques like: Binary, Octal, Decimal and
Hexadecimal number representation techniques can represent numbers in
both signed and unsigned ways. Binary Number System is one the type of
Number Representation techniques. It is most popular and used in digital
systems. Binary system is used for representing binary quantities which
can be represented by any device that has only two operating states or
possible conditions. For example, a switch has only two states: open or
close.
In the Binary System, there are only two symbols or possible digit values,
i.e., 0 and 1. Represented by any device that only 2 operating states or
possible conditions. Binary numbers are indicated by the addition of either
an 0b prefix or an 2 suffix.

Representation of Binary Numbers:


Binary numbers can be represented in signed and unsigned way.
Unsigned binary numbers do not have sign bit, whereas signed binary
numbers uses signed bit as well or these can be distinguishable between
positive and negative numbers. A signed binary is a specific data type of a
signed variable.

38
Unsigned Numbers:

Unsigned numbers don’t have any sign, these can contain only magnitude
of the number. So, representation of unsigned binary numbers are all
positive numbers only. For example, representation of positive decimal
numbers are positive by default. We always assume that there is a positive
sign symbol in front of every number.

Representation of Unsigned Binary Numbers:


Since there is no sign bit in this unsigned binary number, so N bit binary
number represent its magnitude only. Zero (0) is also unsigned number.
This representation has only one zero (0), which is always positive. Every
number in unsigned number representation has only one unique binary
equivalent form, so this is unambiguous representation technique. The
range of unsigned binary number is from 0 to (2n-1).

Example-1: Represent decimal number 92 in unsigned binary number.


Simply convert it into Binary number, it contains only magnitude of the
given number.

39
= (92)10
= (1x26+0x25+1x24+1x23+1x22+0x21+0x20)10
= (1011100)2

It’s 7 bit binary magnitude of the decimal number 92.

Example-2: Find range of 5 bit unsigned binary numbers. Also, find


minimum and maximum value in this range.

Since, range of unsigned binary number is from 0 to (2n-1). Therefore,


range of 5 bit unsigned binary number is from 0 to (25-1) which is equal
from minimum value 0 (i.e., 00000) to maximum value 31 (i.e., 11111).

Signed Numbers:

Signed numbers contain sign flag, this representation distinguishes


positive and negative numbers. This technique contains both sign bit and
magnitude of a number. For example, in representation of negative
decimal numbers, we need to put negative symbol in front of given decimal
number.

Representation of Signed Binary Numbers:

There are three types of representations for signed binary numbers.


Because of extra signed bit, binary number zero has two representation,
either positive (0) or negative (1), so ambiguous representation. But 2’s
complementation representation is unambiguous representation because
of there is no double representation of number 0. These are: Sign-
Magnitude form, 1’s complement form, and 2’s complement form which are
explained as following below.

40
Sign-Magnitude form:

For n bit binary number, 1 bit is reserved for sign symbol. If the value of
sign bit is 0, then the given number will be positive, else if the value of sign
bit is 1, then the given number will be negative. Remaining (n-1) bits
represent magnitude of the number. Since magnitude of number zero (0) is
always 0, so there can be two representation of number zero (0), positive
(+0) and negative (-0), which depends on value of sign bit. Hence these
representations are ambiguous generally because of two representation of
number zero (0). Generally, sign bit is a most significant bit (MSB) of
representation. The range of Sign-Magnitude form is:
from (2(n-1)-1) to (2(n-1)-1).
For example, range of 6 bit Sign-Magnitude form binary number is
from (25-1) to (25-1) which is equal from minimum value -31 (i.e., 1 11111)
to maximum value +31 (i.e., 0 11111). And zero (0) has two
representation, -0 (i.e., 1 00000) and +0 (i.e., 0 00000).

1’s complement form:

Since, 1’s complement of a number is obtained by inverting each bit of


given number. So, we represent positive numbers in binary form and
negative numbers in 1’s complement form. There is extra bit for sign
representation. If value of sign bit is 0, then number is positive and you can
directly represent it in simple binary form, but if value of sign bit 1, then
number is negative and you have to take 1’s complement of given binary
number. You can get negative number by 1’s complement of a positive
number and positive number by using 1’s complement of a negative
number. Therefore, in this representation, zero (0) can have two
representation, that’s why 1’s complement form is also ambiguous form.
The range of 1’s complement form is from (2(n-1)-1) to (2(n-1)-1) .

For example, range of 6 bit 1’s complement form binary number is


from (25-1) to (25-1) which is equal from minimum value -31 (i.e., 1 00000)
to maximum value +31 (i.e., 0 11111). And zero (0) has two
representation, -0 (i.e., 1 11111) and +0 (i.e., 0 00000).
41
2’s complement form:

Since, 2’s complement of a number is obtained by inverting each bit of


given number plus 1 to least significant bit (LSB). So, we represent positive
numbers in binary form and negative numbers in 2’s complement form.
There is extra bit for sign representation. If value of sign bit is 0, then
number is positive and you can directly represent it in simple binary form,
but if value of sign bit 1, then number is negative and you have to take 2’s
complement of given binary number. You can get negative number by 2’s
complement of a positive number and positive number by directly using
simple binary representation. If value of most significant bit (MSB) is 1,
then take 2’s complement from, else not. Therefore, in this representation,
zero (0) has only one (unique) representation which is always positive. The
range of 2’s complement form is from (2(n-1)) to (2(n-1)-1).

For example, range of 6 bit 2’s complement form binary number is


from (25) to (25-1) which is equal from minimum value -32 (i.e., 1 00000)
to maximum value +31 (i.e., 0 11111). And zero (0) has two
representation, -0 (i.e., 1 11111) and +0 (i.e., 0 00000).

Coding Systems for Text-Based Data

ASCII (American Standard Code for Information Interchange) – Coding


system traditionally used with personal computers.

EBCDIC (Extended Binary-Coded Decimal Interchange Code) – Developed


by IBM, primarily for mainframes.

42
Unicode – Newer code (32 bits per character is common) – Universal
coding standard designed to represent textbased data written in any
ancient or modern language – Replacing ASCII as the primary text-coding
system.

Coding Systems for Other Types of Data

Graphics Data (still images such as photos or drawings)


– Bitmapped images
• Image made of up of a grid of small dots called pixels
• Monochrome graphic can only be one of two colors
– Requires just one bit for color storage
• Images with more than two colors
– Can use 4, 8, or 24 bits to store the color data for each
pixel

43
– More bits = more colors

Audio Data:

– Must be in digital form in order to be stored on or processed by a


computer
– Often compressed when sent over the Internet
• MP3 files are 10 times smaller than their uncompressed digital
versions
• Download more quickly and take up less storage space

Video Data

– Displayed using a collection of frames, each frame contains a still


image
44
– Amount of data can be substantial, but can be compressed

Representing Software Programs

Machine language:

– Binary-based language for representing computer programs the


computer can execute directly
– Early programs were written in machine language
– Today’s programs still need to be translated into machine language
in order to be understood by the computer

45
Chapter 3
Computer Hardware

By the end of the chapter, student should


be able to:
- List and identify computer hardware.
- Discuss how CPU does work.
- List and Discuss input/output devices.
- Compare between memory and other storage devices
(speed and size).
- Compare among different storage devices (speed and size).

46
Electrical Safety
Before going ahead to discuss the details of the computer components, it is
important to know that electrical devices have certain power requirements.
For example, the AC adapter is manufactured for a specific laptop.
Exchanging the adapter with another different type of laptop may cause
damage to both the AC adapter and the laptop. It is important to check the
manual of any device to prevent electrical fires, injuries, and fatalities. Also,
when trying to open or fix the computer from inside, take care of the
Electrostatic discharge (ESD). ESD is occurred when there is a buildup of
an electric charge that exists on a surface which meets another differently
charged surface. It can cause damage to computer equipment if not
discharged properly. To prevent ESD damage, it is important to follow the
following main instructions:
▪ Keep all components in antistatic bags until you are ready to install
them.
▪ Use grounded mats on workbenches.
▪ Use grounded floor mats in work areas.
▪ Use antistatic wrist straps when working inside computers.

Computer Components – Functionality Viewpoint


Computers are often compared to human beings since both have the ability
to accept data, store, work with it, retrieve and provide information. The
main difference is that human beings have the ability to perform all of these
actions independently. Human beings also think and control their own
activities. The computer, however, requires a program (a predefined set of
instructions) to perform an assigned task. Human beings receive
information in different forms, such as eyes, ears, nose, mouth, and even
sensory nerves. The brain receives or accepts this information, works with
it in some manner, and then stores in the brain for future use. If information
at the time requires immediate attention, brain directs to respond with
actions. Likewise the Central Processing Unit (CPU) is called the brain of
the computer. It reads and executes program instructions, performs
calculations and makes decisions.
Basically any computer is supposed to carry out the following functions:
▪ Accept the data and program as input

47
▪ Store the data and program and retrieve as and when required.
▪ Process the data as per instructions given by the program and
convert it into useful information
▪ Communicate the information as output

Based on the functionalities of the computer, the hardware components


can be classified into four main units, namely:
▪ Input Unit
▪ Output Unit
▪ Central Processing Unit
▪ Memory Unit
These units are interconnected by minute electrical wires to permit
communication between them. This allows the computer to function as a
system. The block diagram is shown below.

Input Unit:
A computer uses input devices to accept the data and program. Input
devices are the tools that allow communication between the user and the
computer. In modern computers keyboard, mouse, light pen, touch screen
etc, are some of the input devices.

Output Unit:
Similar to input devices, output devices have an interface between the
computer and the user. These devices take machine coded output results
from the processor and convert them into a form that can be used by
human beings. In modern computers, monitors (display screens) and
printers are the commonly used output devices.

48
Central Processing Unit:

CPU is the brain of any computer system. It is just like the human brain that
takes all major decisions, makes all sorts of calculations and directs
different parts of the computer function by activating and controlling the
operation. It consists of arithmetic and logic units, control unit and internal
memory (registers). The control unit of the CPU coordinates the action of
the entire system. Programs (software) provide the CPU a set of
instructions to follow and perform a specific task. Between any two
components of the computer system, there is a pathway called a bus which
allows for the data transfer between them. Control unit controls all the
hardware operations, ie, those of input units, output units, memory unit and
the processor. The arithmetic and logic units in computers are capable of
performing addition, subtraction, division and multiplication as well as some
logical operations. The instructions and data are stored in the main memory
so that the processor can directly fetch and execute them.
The CPU speed, or processor speed, is the amount of cycles that a CPU
can perform per second. This is otherwise known as a Hertz. For example,
one Hertz means that one cycle can be completed in one second. A
megahertz means that one million cycles can be completed in a second. A
gigahertz, the most common form of processor speed, means that one
billion cycles can be completed per second.
Clock speeds are useful when comparing similar CPUs in the same family.
For example, let’s say you’re comparing two Intel Haswell Core i5 CPUs,
which only differ in their clock rate. One runs at 3.4 GHz, and one runs at
2.6 GHz. In this case, the 3.4 GHz processor will perform 30% faster when
they’re both running at their top speed. This is true because the processors
are otherwise the same. But you can’t compare the Haswell Core i5’s CPU
clock rate against another type of CPU, such as an AMD CPU, ARM CPU,
or even an older Intel CPU. Later, we shall give more details about CPU.

49
Memory Unit:
In the main memory, the computer stores the program and data that are
currently being used. In other words since the computers use the stored
program concept, it is necessary to store the program and data in the main
memory before processing. The main memory holds data and program only
temporarily. Hence there is a need for storage devices to provide backup
storage. They are called secondary storage devices or auxiliary memory
devices. Secondary storage devices can hold more storage than main
memory and is much less expensive.

Stored Program Concept:


John von Neumann and Alan Turing both proposed the stored program
concept in separate publications in 1945.
- A program must be resident in main memory to be executed
- Machine code instructions are fetched from main memory one-at-a-
time, decoded and executed in the processor.
In a von Neumann machine, a single store holds both instructions and the
data that they are carried out on.

Computer Components – Devices Viewpoint

Looking inside the System Unit, we found:


– The main case of a computer – Houses the processing hardware
for a computer
– Also, it contains storage devices, the power supply, and cooling
fans
– it, houses processor, memory, interfaces to connect to peripheral
devices (printers, etc), and other components
– With a desktop computer, usually looks like a rectangular box

50
Now, we shall discuss most of the components inside the system units
briefly as follows:

Case:
The case includes most (sometimes all) of the internal components such as
the power supply, motherboard, central processing unit (CPU), memory,
disk drives, and assorted adapter cards. Desktop computers have cases of
different forms:
➢ Full-Size Tower
➢ Horizontal case
➢ All-in-one

Power Supply:
A power supply is used to convert AC
power into a lower voltage DC power
required by internal components. The

51
power supply of a Desktop computer has different forms:

• Advanced Technology (AT) – original power supply for legacy


computer systems
• AT Extended (ATX) – updated version of the AT
• ATX12V – the most common power supply on the market today
• EPS12V – originally designed for network servers but is now
commonly used in high-end desktop models.

It produces different connectors that are used to power various internal


components such as the motherboard and disk drives.
• 20-pin or 24-pin slotted
connector
• SATA keyed connector
• Molex keyed connector
• Berg keyed connector
• 4-pin to 8-pin auxiliary power
connector
• 6/8-pin PCIe power
connector
The different connectors in a power supply also provide different voltages.
The most common voltages supplied are 3.3 volts, 5 volts, and 12 volts.
The 3.3 volt and 5 volt supplies are typically used by digital circuits, while
the 12 volt supply is used to run motors in disk drives and fans.

Drive Bays:
– Rectangular metal racks inside the system unit that house storage
devices such as:
• Hard drive, CD/DVD drive, flash memory card reader
• Connected to the motherboard with a cable

52
Motherboard:

– Computer Chip:
• Very small pieces of silicon or other semi-conducting material onto
which integrated circuits are embedded
– Circuit Board:
• A thin board containing computer chips and other electronic
components
– System Board:
• The main circuit board inside the system unit to which all devices
must connect

The motherboard is the backbone of the computer. It is a printed circuit


board (PCB) that contains buses that interconnect electronic components.
These components may be soldered directly to the motherboard, or added
using sockets, expansion slots, and ports. It is located inside the computer
case and is where most of the parts and computer peripherals connect.
With tower computers, the motherboard is on the left or right side of the
tower and is the biggest circuit board. Modern motherboards include:
• CPU sockets (CPU slots) in which one or more microprocessors may
be installed.

53
• Memory slots into which the system's main memory is to be installed,
typically in the form of DIMM modules containing DRAM chips can
be DDR3, DDR4 or DDR5.
• The chipset which forms an interface between the CPU, main
memory, and peripheral buses.
• Non-volatile memory chips (usually Flash ROM in modern
motherboards) containing the system's firmware or BIOS.
• The clock generator which produces the system clock signal to
synchronize the various components.
• Slots for expansion cards (the interface to the system via the buses
supported by the chipset).
• Power connectors, which receive electrical power from the
computer power supply and distribute it to the CPU, chipset, main
memory, and expansion cards.
• Connectors for hard disk drives, optical disc drives, or solid-state
drives, typically SATA and NVMe now.

The CPU (Central Processing Unit)

The CPU is the Circuitry and components packaged together and


connected directly to the motherboard. It does the vast majority of
processing for a computer. Also called a processor; called a
microprocessor when talking about personal computers.

A Dual-core CPU contains the processing components (cores) of two


separate processors on a single CPU. Quad-core CPU contains four cores.
Multi-core processors allow computers to work on more than one task at a
time. Typically, different CPUs for desktop computers, portable computers,
servers, mobile devices, consumer devices, etc. Personal computer CPU
often made by Intel or AMD. Media tablets and mobile phones use
processors made by other companies such as ARM.

54
The GPU (graphics processing unit)

A GPU takes care of the


processing needed to
display images (including
still images, animations) on
the screen. It can be
located on the
motherboard, on a video
graphics board, on in the
CPU package

Processing Speed:

CPU clock speed is one measurement of processing speed. Rated in


megahertz (MHz) or gigahertz (GHz). Higher CPU clock speed gives more
instructions processed per second. Alternate measure of processing speed
is the number of instructions a CPU can process per second.

Word Size: The amount of data that a CPU can manipulate at one time;
typically 32 or 64 bits.
55
Cache Memory: Special group of very fast memory chips located on or
close to the CPU. Level 1 is fastest, then Level 2, then Level 3. More cache
memory typically means faster processing. Usually internal cache (built into
the CPU).
Bus Width, Bus Speed, and Bandwidth: A bus is an electronic path over
which data can travel. It found inside the CPU and on the motherboard.
Bus width is the number of wires in the bus over which data can travel. A
wider bus allows more data to be transferred at one time

Bus width and speed determine the


throughput or bandwidth of the bus
which is the amount of data that
can be transferred by the bus in a
given time period.

Cooling Components

Fans:
– Fans used on most personal computers to help cool the CPU and
system unit
– Heat is an ongoing problem for CPU and computer manufacturers
• Can damage components
• Cooler chips run faster
Heat Sinks:

56
– Small components typically made out of aluminum with fins that
help to dissipate heat
Cooling Systems:
– Liquid cooling systems: Cool the computer with liquid-filled tubes
– Immersion cooling: Hardware is actually submerged into units filled
with a liquid cooling solution
– Notebook cooling stand: Cools the underside of a notebook
computer
– Other cooling methods, such as ion pump cooling systems, are
under development

Expansion

Expansion Slots, Expansion Cards, and ExpressCard Modules could be


briefly summarized as follows.

Expansion Slot:
• A location on the motherboard into which expansion cards are
inserted
Expansion Card:
• A circuit board inserted into an expansion slot
• Used to add additional functionality or to attach a peripheral device
ExpressCard Modules:
• Designed to add additional functionality to notebooks

57
Buses:
A Bus is an electronic path within a computer over which data travel. It is
located within the CPU and etched onto the motherboard.

Expansion Bus:
• Connects the CPU to peripheral (typically input and output) devices
Memory Bus:
• Connects CPU directly to RAM
Frontside Bus (FSB):
• Connects CPU to the chipset that connects the CPU to the rest of
the bus architecture
PCI and PCI Express (PCIe) Bus:
• PCI has been one of the most common types
• Today, PCI Express bus, which is extremely fast, has replaced the
PCI bus
Universal Serial Bus (USB):
• Extremely versatile
• Allows 127 different devices to connect to a computer via a single
USB port
FireWire Bus:
• Developed by Apple to connect multimedia devices to a computer

58
Ports and Connectors

Port is a connector on the exterior of a computer’s system unit to which a


device may be attached. Typical desktop computer ports include:
• Power connector, Firewire, VGA monitor, Network, USB, Audio, and
HDMI
Others include IrDA and Bluetooth ports, eSATA ports, Thunderbolt ports
(Apple devices). Most computers support the Plug and Play standard.
Portable computers have ports similar to desktop computers, but often not
as many.

Smartphones and mobile devices have more limited expansion capabilities:

• Usually have a USB port, HDMI port, and/or flash memory card slot
• Flash memory cards often use the Secure Digital (SD) format
• MiniSD and microSD cars are smaller than regular SD cards

59
How the CPU Does Work

CPU (Central Processing Unit):


– Consists of a variety of circuitry and components packaged together
– Transistor: The Key element of the microprocessor. It is made of semi-
conductor material that acts like a switch controlling the flow of electrons
inside a chip
– Today’s CPUs contain hundreds of millions of transistors; the number
doubles about every 18 months (Moore’s Law)

Moore’s Law:
– In 1965, Gordon Moore predicted that the number of transistors per
square inch on chips had doubled every two years and that trend would
continue
– Moore’s Law is still relevant today for processors as well as other
computer components

Typical CPU Components:


– Arithmetic/Logic Unit (ALU): It performs arithmetic involving integers
and logical operations

60
– Floating Point Unit (FPU): It performs decimal arithmetic
– Control Unit: It coordinates and controls activities within a CPU core
– Prefetch Unit: It attempts to retrieve data and instructions before
they are needed for processing in order to avoid delays
– Decode Unit: It translates instructions from the prefetch unit so they
are understood by the control unit, ALU, and FPU
– Registers and Internal Cache Memory: Store data and instructions
needed by the CPU
– Bus Interface Unit: It allows the core to communicate with other
CPU components

The System Clock and the Machine Cycle


System Clock:
– Small quartz crystal on the motherboard
– Timing mechanism within the computer system that synchronizes the
computer’s operations:
• Sends out a signal on a regular basis to all computer components
• Each signal is a cycle

61
• Number of cycles per second is measured in hertz (Hz)
• One megahertz = one million ticks of the system clock
• Many PC system clocks run at 200 MHz
• Computers can run at a multiple or fraction of the system clock
speed
• A CPU clock speed of 2 GHz means the CPU clock “ticks” 10 times
during each system clock tick • During each CPU clock tick, one or
more pieces of microcode are processed
• A CPU with a higher clock speed processes more instructions per
second than the same CPU with a lower CPU clock speed

Machine Cycle:
The series of operations involved in
the execution of a single machine
level instruction.

Execution of a Program: A program


is a sequence of instructions which
accepts data and makes a
processing on these data and then produces (stores) the results.

62
Instruction Cycle: is the time needed to execute only one instruction in a
program. It has two main steps:
• Fetch/Decode
• Execute
Therefore, executing a program means that iteratively executing the two
main steps until the program terminated.

Example: A High-Level Language statement such as:


Z=X+Y
Which has a corresponding (alternative) Assembly segment of code:

Where X, Y, and Z (with values 2, 3, and 0) located in memory at


addresses 10, 11, and 12, respectively. The following figure shows the
CPU components and memory before the above statement has started to
be executed.

63
The results of executing the first cycle (LOAD 10):

64
The results of executing the second cycle (ADD 11):

The results of executing the third cycle (STORE 12):

65
Memory Unit:
Memory units are the storage areas in a computer. The term “memory”
usually refers to the main memory of the computer, whereas, the word
“storage” is used for the memory that exists on disks, CDs, floppies or
tapes. The main memory is usually called a physical memory which refers
to the ‘chip’ (Integrated Circuit) capable of holding data and instruction.
There are different types of memory. They are Random Access Memory
(RAM), Read Only Memory (ROM), Programmable Read-Only Memory
(PROM), Erasable Programmable Read-Only Memory (EPROM),
Electrically Erasable Programmable Read-Only Memory (EEPROM).

Random Access Memory – RAM

RAM is the most common type of memory found in the modern computers.
This is really the main store and is the place where the program gets
stored. When the CPU runs a program, it fetches the program instructions
from the RAM and carries them out. If the CPU needs to store the results of
the calculations it can store them in RAM. When we switch off a computer,
whatever is stored in the RAM gets erased. It is a volatile form of memory.
Read Only Memory - ROM
In ROM, the information is burnt (pre-recorded) into the ROM chip at
manufacturing time. Once data has been written into a ROM chip, it cannot
be erased but you can read it. When we switch off the computer, the
contents of the ROM are not erased but remain stored permanently. ROM
is a non-volatile memory. ROM stores critical programs such as the
program that boots the computer. Types of Read-only Memory (ROM)
include:

66
• ROM chips.
• PROM chips.
• EPROM chips
• EEPROM chips.
The main memory must store many data items and have some way of
retrieving them when they are needed. The memory can be compared to
the boxes at a post office. Each box-holder has a box with a unique number
which is called its address. This address serves to identify the box. The
memory has a number of locations in its store. Each location in a memory
has a unique number called its memory address. This serves to identify it
for storage and retrieval. Operations on memories are called reads and
writes, defined from the perspective of a processor or other device that
uses a memory: a write instruction transfers information from other device
to memory and a read instruction transfers information from the memory to
other devices. A memory that performs both reads and writes is often
called a RAM, random access memory. Other types of memories
commonly used in systems are read-only memory.

Input and Output Devices


The main function of a computer system is to process data. The data to be
processed by the computer must be input to the system and the result must
be output back to the external world.

Input Devices
An input device is used to feed data into a computer. For example, a
keyboard is an input device. It is also defined as a device that provides
communication between the user and the computer. Input devices are
capable of converting data into a form which can be recognized by
computer. A computer can have several input devices.

Keyboard
The most common input
device is the keyboard.
Keyboard consists of a set
of typewriter like keys that
67
enable you to enter data into a computer. They have alphabetic keys to
enter letters, numeric keys to enter numbers, punctuation keys to enter
comma, period, semicolon, etc., and special keys to perform some specific
functions. The keyboard detects the key pressed and generates the
corresponding ASCII codes which can be recognized by the computer.

Mouse
Mouse is an input device that controls
the movement of the cursor on the
display screen. Mouse is a small device,
you can roll along a flat surface. In a
mouse, a small ball is kept inside and
touches the pad through a hole at the
bottom of the mouse. When the mouse is moved, the ball rolls. This
movement of the ball is converted into signals and sent to the computer.
You will need to click the button at the top of the mouse to select an option.
Mouse pad is a pad over which you can move a mouse. Mouse is very
popular in modern computers.

Scanner
Scanner is an input device that allows
information such as an image or text
to be input into a computer. It can
read image or text printed on a paper
and translate the information into a
form that the computer can use. That
is, it is used to convert images
(photos) and text into a stream of
data. They are useful for publishing
and multi-media applications.

Bar Code Reader


The barcode readers are used in
places like supermarket, bookshops,
etc. A bar code is a pattern printed in
lines of different thickness. The bar-code reader scans the information on

68
the barcodes and transmits to the computer for further processing. The
system gives fast and error-free entry of information into the computer.

Digital Camera
The digital camera is an input device
mainly used to capture images. The digital
camera takes a still photograph, stores it
and sends it as digital input to the
computer. It is a modern and popular input
device.

Touch Sensitive Screen


Touch Sensitive Screen is a type of display
screen that has a touch-sensitive panel. It
is a pointing device that enables the user
to interact with the computer by touching
the screen. You can use your fingers to
directly touch the objects on the screen.
The touch screen senses the touch on the
object (area pre-defined) and communicate
the object selection to the computer.

Light Pen
A light pen is a pointing device
shaped like a pen and is
connected to a monitor. The tip
of the light pen contains a light
sensitive element which, when
placed against the screen,
detects the light from the
screen enabling the computer
to identify the location of the pen on the screen. Light pens have the
advantage of ‘drawing’ directly onto the screen, but this can become
uncomfortable, and they are not accurate.

69
Magnetic Reader
Magnetic reader is an input device
which reads a magnetic strip on a
card. It is handy and data can be
stored and retrieved. It also provides
quick identification of the card’s
owner. All the credit cards, ATM
cards (banks), petro cards, etc. stores
data in a magnetic strip which can be
read easily by the magnetic reader.

Smart Cards
This input device stores data
in a microprocessor
embedded in the card. This
allows information, which can
be updated, to be stored on
the card. These data can be
read and given as input to the
computer for further
processing. Most of the identification cards use this method to store and
retrieve the vital information.

Microphone
Microphone serves as a voice input device.
It captures the voice data and input to the
computer. Using the microphone along with
speech recognition software can offer a
completely new approach to input
information into your computer. Speech
recognition programs, although not yet
completely exact, have made great strides
in accuracy as well as ease of use. The
voice-in or speech recognition approach can
almost fully replace the keyboard and mouse. Speech recognition can now
open the computer world to those who may have been restricted due to a

70
physical handicap. It can also be a boon for those who have never learned
to type.

Output Devices
Output is anything that comes out of a computer. An output device is
capable of presenting information from a computer. There are many output
devices attached with the computers. But the monitors and printers are
commonly used output devices.

Monitors
Monitor is a commonly used output
device, sometimes called as a display
screen. It provides a visual display of
data. Monitors are connected with the
computer and are similar in appearance
to a television set.

Initially there were only monochrome


monitors. But gradually, we have
monitors that display color. Monitors
display images and text. The smallest
dot that can be displayed is called a pixel (picture element). The resolution
of the screen improves as the number of pixels is increased. Most of the
monitors have a 4 : 3 width to height ratio. This is called ‘aspect ratio’. The
number of pixels that can be displayed vertically and horizontally gives the
resolution of the monitor. The resolution of the monitor determines the
quality of the display. Some popular resolutions are 640 x 480 pixels, 800 x
600 pixels and 1024 x 768 pixels. A resolution of 1024 x 768 pixels will
produce sharper image than 640 x 480 pixels.

Printers
Printer is an output device that prints text or images on paper or other
media (like transparencies). By printing you create what is known as a
‘hard copy’. There are different kinds of printers, which vary in their speed
and print quality. The two main types of printers are impact printers and
non-impact printers.
71
Impact printers include all printers that print by striking an ink ribbon.
Impact printers use a print head containing a number of metal pins which
strike an inked ribbon placed between the print head and the paper. Line
printers, dot matrix printers are some of the impact printers.

Characteristics of Impact Printers


In impact printers, there is physical contact with the paper to produce an
image. Due to being robust and low cost, they are useful for bulk printing.
Impact printers are ideal for printing multiple copies (that is, carbon copies)
because they can easily print through many layers of paper. Due to its
striking activity, impact printers are very noisy. Since they are mechanical
in nature, they tend to be slow. Impact printers do not support
transparencies.

Non-impact printers are much quieter than impact printers as their printing
heads do not strike the paper. Non-impact printers include laser printers,
inkjet printers and thermal printers.

Characteristics of Non-Impact Printers

Non-impact printers are faster than impact printers because they have
fewer moving parts. They are quiet than impact printers because there is
no striking mechanism involved. They posses the ability to change
typefaces automatically. These printers produce high-quality graphics.
These printers usually support the transparencies. These printers cannot
print multipart forms because no impact is being made on the paper.
72
Line Printer
Line printers are high-speed printers capable of printing an entire line at a
time. A line printer can print 150 lines to 3000 lines per minute. The
limitations of line printer are they can print only one font, they cannot print
graphics, the print quality is low and they are noisy to operate. But it can
print large volume of text data very fast compared to the other printers. It is
also used to print on multipart stationeries to prepare copies of a document.

Dot Matrix Printer


The most popular serial printer is the
dot matrix printer. It prints one line of
8 or 14 points at a time, with print
head moving across a line. They are
similar to typewriters. They are
normally slow. The printing speed is
around 300 characters per second. It
uses multipart stationeries to prepare
copies of a document.

Laser Printers
Laser printers use a laser beam
and dry powdered ink to produce
a fine dot matrix pattern. It can
produce very good quality of
graphic images. One of the chief
characteristics of laser printers is
their resolution – how many dots
per inch (dpi) they lay down. The
available resolutions range from
300 dpi at the low end to
around 1200 dpi at the high
end.
Inkjet Printers
Inkjet printers use color
cartridges which combine
73
magenta, yellow and cyan inks to create color tones. A black cartridge is
also used for crisp monochrome output. Inkjet printers work by spraying
ionizing ink at a sheet of paper. Magnetized plates in the ink’s path direct
the ink onto the paper in the described shape.

Speakers
The computer can also give produce voice
output(audio data). Speaker serves as a voice
output device. Using speakers along with speech
synthesizer software, the computer can provide
voice output. Voice output has become very
common in many places like airlines, banks,
automatic telephone enquiry system etc. Users
can also hear music/songs using the voice output
system.

Plotters
Apart from the output devices like printers,
plotters are also used to produce graphical
output. Although printer output is very
convenient for many purposes, the user
needs to present the information
graphically in order to understand its
significance.

Storage

The computer may need to store data, programs etc. in a computer


readable medium. This is called the secondary storage. Secondary storage
is also called backup storage. Secondary storage can be used to transmit
data to another computer either immediately or a latter time. This provides
a mechanism for storing a large amount of data for a long period of time.

74
Storage System Characteristics

Logical vs. Physical Representation: Data are stored as files and are
organized in different folders with a particular structure.
– File
• Anything stored on a storage medium, such as a program,
document, digital image, or song
– Filename
• Name given to a file by the user
– Folder
• Named place on a storage medium into which files can be
stored

– Logical file representation


• Individuals view a document stored as one complete unit in a
particular folder on a particular drive
– Physical file representation
• Computers access a particular document stored on a storage
medium using its physical location or locations

Some of the commonly used storage devices are hard disks, magnetic
tapes, floppy disks and CD-ROM. To understand the physical mechanism
of secondary storage devices one must have knowledge of magnetism,

75
electronics and electro mechanical systems. The average time required to
reach a storage location and obtain its contents is called its access time. In
electromechanical devices with moving parts such as disks and tapes, the
access time consists of a seek time required to position the read write head
to a location and transfer time required to transfer the data to or from the
device. Data storage devices can be classified according to the media on
which the data is stored:
• Magnetic – like hard disk drive, tape drive and Floppy disk drive
• Optical – like CD and DVD
• Electrons (flash memory media)

Hard Disk
Hard disk is a magnetic disk
on which you can store
computer data. The hard disk
is a direct-access storage
medium. This means you can
store and retrieve data
randomly. Disk storage
systems are essentially based
on magnetic properties. The
magnetic disk consists of high
speed rotating surfaces
coated with a magnetic
recording medium. The rotating surface of the disk is a round flat plate.
When writing data, a write head magnetizes the particles on the disk
surface as either north or south poles. When reading data, a read head
converts the magnetic polarizations on the disk surface to a sequence of
pulses. The read and write heads are generally combined into a single
head unit. There may be more than one read/write head. Data is arranged
as a series of concentric rings. Each ring (called a track) is subdivided into
a number of sectors, each sector holding a specific number of data
elements (bytes or characters).

76
The smallest unit that can be written to or read from the disk is a sector.
Once a read or write request has been received by the disk unit, there is a
delay involved until the required sector reaches the read/write head. This is
known as rotational latency, and on average is one half of the period of
revolution. The storage capacity of the disk is determined as (number of
tracks * number of sectors * bytes per sector * number of read/write heads)
Thus, the data is stored as magnetized spots arranged in concentric circles
(tracks) on the disk. Each track is divided into sectors. The arrangement of
tracks and sectors on a disk is known as its ‘format’. High data rates
demand that the disk rotates at a high speed (about 3,600 rpm). As the disk
rotates read/write heads move to the correct track and fetch the desired
data. The storage capacity of a hard disk can be Gigabytes (GB), i.e.
thousands of Megabytes of information.

Internal and External Hard Drives:

Internal hard drives


– Permanent storage devices located inside the system unit
– Removed only if a problem develops
External hard drives

77
– Commonly used to transport large amounts of data from one c
omputer to another
– Portable external hard drives are smaller and easier to transport
– Most connect with a USB connection although some may be
wireless

Hard Drive Speed, Disk Caching, and Hybrid Hard Drives:


Disk access time:
– Total time that it takes for a hard drive to read or write data
– Consists of seek time, rotational delay, and data movement time
• SSDs don’t require seek time or rotational delays
Disk cache:
– Memory used in conjunction with a magnetic hard drive to improve
system performance
– Typically consist of memory chips on a circuit board inside the hard
drive case
Hybrid Hard Drive
– Combination of flash memory and magnetic hard drive
– Uses flash memory for cache
– Allows encryption to be built into the drive

78
Hard Drive Partitioning and File Systems:
Partitioning:
– Divides the physical capacity of a single drive logically into separate
areas, called partitions
– Partitions function as independent hard drives
– Referred to as logical drives – Increases efficiency (smaller drives
use smaller clusters)
Partitions used to create:
– A recovery partition
– A new logical drive for data
– A dual boot system

Hard Drive Partitioning and File Systems:


File system
– Determines the partition size, cluster size, maximum drive size, and
maximum file size
• FAT, FAT32, and NTFS

79
Hard Drive Interface Standards:
• Determine how a drive connects to the computer
• Common standards
– Parallel ATA (PATA) - older, slower standard
– Serial ATA (SATA)
– eSATA – SCSI and the newer serial attached SCSI (SAS)
– Fibre Channel
– Fibre Channel over Ethernet (FCoE)
– Internet SCSI (iSCSI)

Magnetic Tape:
A recording medium consisting
of a thin tape with a coating of a
fine magnetic strip, used for
recording digital data. The tape
itself is a strip of plastic coated
with a magnetic recording
medium. Bits are recorded as
magnetic spots on the tape
along several tracks. Usually,
seven or nine bits are recorded
simultaneously to form a
character together with a parity bit. Read /write heads are mounted one in

80
each track so that data can be recorded and read as a sequence of
characters.
Data is stored in frames across the width of the tape. The frames are
grouped into blocks or records which are separated from other blocks by
gaps. Magnetic tape is a serial access medium, similar to an audio
cassette, and so data cannot be randomly located. This characteristic has
prompted its use in the regular backing up of hard disks.

Floppy Disk
The floppy drive uses a thin circular
disk for data storage. It is a soft
magnetic disk. It is a thin magnetic-
coated disk contained in a flexible or
semi-rigid protective jacket. The disk
rotates at 360rpm. A read/write head
makes physical contact with the disk
surface. Data is recorded as a series
of tracks subdivided into sectors. The
floppy disks are usually 3.5" in size.
However, older floppy disks may be in
use; these would be 5.25" in size or
even 8" in size. A 3.5" floppy disk can hold 1.44 MB of data. Once data is
stored on a floppy disk it can be ‘write protected’ by clicking a tab on the
disk. This prevents any new data being stored or any old data being
erased. Disk drives for floppy disks are called floppy drives. Floppy disks
are slower to access than hard disks and have less storage capacity. It is
less expensive and are portable. It can be accessed randomly.

Optical Disk
Optical disks are a storage medium
from which data is read and to
which it is written by lasers. The
optical disk is a random access
storage medium; information can
be easily read from any point on
the disk. CD-ROM stands for
Compact Disk - Read Only

81
Memory. It is now possible to have CD-ROMs where tracks of information
can be written onto them by the user. These are called read/write CD-
ROMs and these are becoming a popular and cheap method for storage.

Optical Discs and Drives:

Optical Disc Characteristics:


– A type of storage read from and written to using laser beams
– Today’s standard for software delivery
– Divided into sectors like magnetic discs but use a single spiral track
(groove)
– Have a relatively large capacity and are durable
– Used for backup purposes and for storing and transporting music,
photos, video, etc.

Representing Data on an Optical Disc:


– Read-only optical disc
• Surface of disc is molded or stamped
– Recordable or rewritable disc
• Optical drive is used and the reflectivity of the disc is changed
using a laser to represent the data
– Pits and lands are used to represent 1s and 0s
– The transition between a pit and a land represents a 1; no transition
represents a 0

82
Optical Drives:
– Three categories of discs: CD, DVD, or Blu-Ray Disc (BD)
– Can be read-only, recordable, or rewritable
– Almost always downward compatible – Can support single or dual
Layer discs:
– Recording data onto disc is called burning
– Can be internal or external drives
• External drives typically connect via USB port
Major advantage: large capacity:
– CD discs are normally single layer and hold 650 or 700 MB
– DVD discs hold 4.7 GB (single-layer) or 8.5 GB (dual-layer
– BD discs hold 25 GB (single-layer) or 50 GB (dual-layer
– Discs can also be double-sided

83
Flash Memory Storage Systems

Flash Memory:
– Chip-based storage medium that represents data using electrons
– Used in SSDs and hybrid hard drives
Embedded Flash Memory:
– Flash memory chips embedded into products, such as
• Portable digital media players, digital cameras
• Handheld gaming devices, GPS devices, mobile phones
• Sunglasses and wristwatches

Solid-state drives:
Solid-state drives (SSD) a solid-
state storage device that
uses integrated circuit assemblies
to store data persistently, typically
using flash memory, and
functioning as secondary
storage in the hierarchy of
computer storage. It is also
sometimes called a solid-state

84
device or a solid-state disk. This makes SSDs much faster than magnetic
HDDs. SSDs have no moving parts, make no noise, are more energy
efficient, and produce less heat than HDDs.

Other Types of Storage Systems

Network Storage and Cloud Storage Systems:


Remote storage:
• Using a storage device not directly connected to the computer
being used
• Accessed through the Internet or through a network
Network storage:
• Remote storage via local network

Network and Cloud Storage Systems:


Network attached storage (NAS):
– High performance storage systems connected individually to
a network
– Designed for small business and home use
Storage area network (SAN):
– Separate network of hard drives or other storage devices
which are attached to the main network

85
Cloud storage (online storage): It is accessed via the Internet.
• Via Web sites (Flickr, Facebook, Google Docs, etc.)
• Via online storage sites (Box, Dropbox, etc.)
• Growing in importance because more and more applications are
Web based
• Increasing being used for backup purposes
• Files can be synched between PC and cloud storage
• Many Web sites providing online storage offer it free
• Business cloud storage is available

86
87
Chapter 4
Computer Software

By the end of the chapter, student should


be able to:
- Define a software.
- List and discuss the types of computer software.
- Discuss the goal of Operating System (OS).
- List and discuss different utility programs
- Identify the OS on his/here machine (List of available OSs).
- Discuss the copyrighted, free, open source software.

88
Computer software, or simply software, is that part of a computer
system that consists of encoded information or computer instructions, in
contrast to the physical hardware from which the system is built. Computer
software includes computer programs, libraries and related non-
executable data, such as online documentation or digital media. Computer
hardware and software require each other and neither can be realistically
used on its own. The first software of computers in business were in the
early 1950s. At the lowest level, executable code consists of machine
language instructions specific to an individual processor—typically a central
processing unit (CPU). A machine language consists of groups of binary
values signifying processor instructions that change the state of the
computer from its preceding state. For example, an instruction may change
the value stored in a particular storage location in the computer—an effect
that is not directly observable to the user. An instruction may also
(indirectly) cause something to appear on a display of the computer
system—a state change which should be visible to the user. The processor
carries out the instructions in the order they are provided, unless it is
instructed to "jump" to a different instruction, or interrupted.
The majority of software is written in high-level programming
languages that are easier and more efficient for programmers, meaning
closer to a natural language. High-level languages are translated into
machine language using a compiler or an interpreter or a combination of
the two. Software may also be written in a low-level assembly language,
essentially, a vaguely mnemonic representation of a machine language
using a natural language alphabet, which is translated into machine
language using an assembler.
Types of software
The computer is able to do nothing
until it is instructed by software.
Although computer hardware is, by
design, general purpose, software
enables the user to instruct a
computer system to perform specific
functions that provide business
value. There are two major types of
software: systems software and
application software. The
relationship among hardware,

89
systems software, and application software is illustrated in the following
figure.

System Software:
– The operating system and utility programs that control a computer
system and allow you to use your computer
• Enables the boot process, launches applications, transfers files,
controls hardware configuration, manages files on the hard drive, and
protects from unauthorized use

Application Software:
– Programs that allow a user to perform specific tasks on a computer
• Word processing, playing games, browsing the Web, listening to
music, etc.

Systems Software
System software is the software that directly operates the computer
hardware, to provide basic functionality needed by users and other
software, and to provide a platform for running application software.
System Software is an intermediary between computer hardware and
application programs, and may also be directly manipulated by
knowledgeable users. Systems software provides important self-regulatory
functions for computer systems, such as loading itself when the computer
is first turned on, managing hardware resources such as secondary storage
for all applications, and providing commonly used sets of instructions for all
applications to use. System software includes:
- Operating systems
- Device drivers
- Utilities

Operating systems: are essential collections of software that manage


resources and provides common services for other software that runs "on
top" of them. In practice, an operating system comes bundled with
additional software (including application software) so that a user can

90
potentially do some work with a computer that only has an operating
system. The following are a list of common operating systems tasks:
1) Interfacing with Users (typically via a GUI)
2) Booting the Computer
– Loads essential part of operating system (kernel) into memory
– Reads opening batch of instructions
– Determines hardware connected to computer

3) Configuring Devices
– Device drivers are often needed; can be reinstalled if needed
– Plug and Play devices are recognized automatically
4) Managing Network Connections
– Manages wired connections to home or office network
– Manages wireless connections at home, school, work, or on
the go
5) Managing and Monitoring Resources and Jobs
– Makes resources available to devices and programs
– Monitors for problems and attempts to correct those that arise
– Schedules jobs
• Jobs to be printed
• Files to be retrieved from hard drive
6) File Management
– Keeps track of stored files on computer so they can be
retrieved when needed
• Files usually viewed in a hierarchical format
7) Security
– Passwords
– Biometric characteristics
– Firewalls

91
Processing Techniques for Increased Efficiency
1) Multitasking:
– The ability of an operating system to have more than one program
(task) open at one time
• CPU rotates between tasks
• Switching is done quickly
• Appears as though all programs executing at the same time
2) Multithreading:
– The ability to rotate between multiple threads so that processing is
completed faster and more efficiently

92
– Thread
• Sequence of instructions within a program that is independent
of other thread
3) Multiprocessing and Parallel Processing:
– Multiple processors (or multiple cores) are used in one computer
system to perform work more efficiently
– Tasks are performed sequentially

4) Memory Management:
– Optimizing the use of main memory (RAM)
– Virtual memory
• Memory-management technique that uses hard drive space
as additional RAM

93
5) Buffering and Spooling
– Buffer
• Area in RAM or on the hard drive designated to hold data that
is used by different hardware devices or programs
– Buffering or Spooling
• Placing items in a buffer so they can be retrieved by the
appropriate device when needed

Differences Among Operating Systems

• Command Line Interface


– Require users to input commands using the keyboard
• Graphical User Interface
– Graphics based interface
– Used by most operating systems

94
Categories of Operating Systems

– Personal (Desktop) Operating Systems


• Designed to be installed on a single computer
– Server (Network) Operating Systems
• Designed to be installed on a network server
• Client computers still use a personal operating system
• Server operating system controls access to network resources
– Mobile and embedded operating systems are also common

Operating Systems for Personal Computers and


Servers
DOS (Disk Operating System)
– DOS traditionally used a command-line interface
– Dominant operating system in the 1980s and early 1990s
– PC-DOS

95
• Created originally for IBM microcomputers
– MS-DOS
• Created for use with IBM-compatible computers
– Can enter DOS commands in Windows

Windows
– The predominant personal operating system developed by
Microsoft Corporation
– Windows 1.0 through Windows Vista
• Windows 1.0 released in 1985
– Windows 1.0 through Windows 3.x were operating
environments for DOS
• Windows 95, Windows 98, and Windows ME
• Designed for personal computers
• Windows NT (New Technology)
– First 32-bit version of Windows designed for highend
workstations and servers
– Replaced by Windows 2000
• Windows XP

96
– Replaced both Windows 2000 and Windows Me
• Windows Vista
– Replaced Windows XP
– Introduced the Aero interface and Sidebar feature
– Windows 7
• Released in late 2009
• Home Premium (primary version for home users)
• Professional (primary version for businesses)
• Libraries feature gives you virtual folders
– Windows 8
• Designed to be used with smartphones, desktop
computers, with or without a keyboard or mouse
• Supports multi-touch input
• Includes Start screen, tiles, and charms bar
Windows 11
• Current version of Windows. Windows 11 is built on the
same foundation as Windows 10.
– Windows Server
• The version of Windows designed for server use
Mac OS
– Proprietary operating system for computers made by Apple
Corporation
– Based on the UNIX operating system
– Originally set the standard for graphical user interfaces
– Mac OS X Family
• Mac OS X Mountain Lion and Mac OS X Mavericks
– Mac OS X Server • Server version of Mac OS X

97
UNIX
– Operating system developed in the late 1960s for midrange servers
– Multiuser, multitasking operating system
– More expensive, requires high level of technical knowledge; harder
to install, maintain, and upgrade
– “UNIX” initially referred to the original UNIX operating system, now
refers to a group of similar operating systems based on UNIX
– Single UNIX Specification
• A standardized UNIX environment
Linux
– Developed by Linus Torvalds in 1991—
resembles UNIX but was developed
independently
– Is open-source software; has been
collaboratively modified by volunteer
programmers all over the world
– Originally used a command line
interface, most recent versions use a
GUI
– Strong support from mainstream
companies, such as IBM, NVIDIA, HP, Dell, and Novell
– Individuals and organizations are switching to Linux and other open
source software because of cost

Chrome OS
– The first cloud operating system
– Essentially is the Chrome Web browser redesigned to run a
computer, in addition to accessing Web resources
– Replaces traditional desktop operating systems
– Is currently only available preinstalled on Chrome devices

98
Operating Systems for Mobile Devices
– Android
• Linux-based operating
system created with current
mobile device capabilities in
mind
• Can create applications that
take full advantage of all the
features a mobile device has to offer
• Open platform
• Devices support multitasking, multiple cores, NFC mobile
payment transactions, Internet phone calls

– iOS
• Designed for Apple Mobile
phones and mobile devices
• Supports multitasking
• Includes Safari Web browser,
the Siri intelligent assistant,
Facetime video calling, AirDrop
to send items to others, and
apps for email, messaging,
music, and search

Device drivers

Software that are used to operate or control a particular type of device


which is attached to a computer. Each device needs at least one
corresponding device driver; because a computer typically has at minimum
at least one input device and at least one output device, a computer
typically needs more than one device driver.

99
Utility Program
– Software that performs a specific task, usually related to managing or
maintaining the computer system
– Many utilities are built into operating systems (for finding files, viewing
images, backing up files, etc.)
– Utilities are also available as stand-alone products and as suites
File Management Programs:
• Enable the user to perform file management tasks, such as:
– Looking at the contents of a storage medium
– Copying, moving, and renaming files and folders
– Deleting files and folders
– File management program in Windows 8 is File Explorer
• To copy or move files, use the Home tab to copy (or cut)
and then paste
• To delete files, use the Delete key on the keyboard or
the Home tab

100
Search Tools:

– Designed to search for documents and other files on the user’s


hard drive
• Windows 8 has Search charm to search for files, apps, and
Store items
– Are often integrated into file management programs
– Third-party search tools are also available

Diagnostic and Disk Management Programs:


– Diagnostic programs evaluate your system and make
recommendations for fixing any errors found
– Disk management programs diagnose and repair problems related
to your hard drive

101
Uninstall and Cleanup Utilities:
– Uninstall utilities remove programs from your hard drive without
leaving bits and pieces behind
– Important to properly uninstall programs, not just delete them
– Cleanup utilities delete temporary files
• Files still in Recycle Bin
• Temporary Internet files
• Temporary installation files

File Compression Programs:


– Reduce the size of files to optimize storage space and transmission
time
– Both zip and unzip files
– WinZip (Windows users) and Stuffit (Mac users)

102
Backup and Recovery Utilities:

– Make the backup and restoration process easier


– Creating a backup means making a duplicate copy of important files
• Can use a recordable or rewritable CD or DVD disc, a USB
flash drive, or an external hard drive
– Good backup procedures are critical for everyone
• Individuals should back up important documents, e-mail,
photos, home video, etc.
• Performing a backup can include backing up an entire
computer (so it can be restored at a later date)
• Can do the backup manually or use backup utility programs
(stand alone or those built into operating systems)
• Can also backup individual files that they are modified

Antivirus, Antispyware, Firewalls, and Other Security Programs:


– Security Concerns
• Viruses, spyware, identity theft, phishing schemes

103
– Security programs protect computers and users and it is essential
that all computer users protect themselves and their computers
• Antivirus programs
• Antispyware programs
• Firewalls
• Many are included in Windows and other operating systems

Application software
Application software is the software that
uses the computer system to perform
special functions or provide entertainment
functions beyond the basic operation of
the computer itself. There are many
different types of application software,
because the range of tasks that can be
performed with a modern computer is so
large. General-purpose, off-the-shelf
application programs that support general
types of processing, rather than being
linked to any specific business function,
are referred to as personal application
software. This type of software consists of
nine widely used packages: spreadsheet,
data management, word processing,
desktop publishing, graphics, multimedia, communications, speech-
recognition software, and groupware. Personal application software is
designed to help individual users increase their productivity. Below is a
description of the nine main types.

Spreadsheets: Computer spreadsheet software transforms a computer


screen into a ledger sheet, or grid, of coded rows and columns. Users can
enter numeric or textual data into each grid location, called a cell. In
addition, a formula can be entered into a cell to obtain a calculated answer
displayed in that cell’s location.

104
Data management: Data management software supports the storage,
retrieval, and manipulation of related data. There are two basic types of
data management software: simple filing programs patterned after
traditional, manual data-filing techniques, and database management
programs that take advantage of a computer’s extremely fast and accurate
ability to store and retrieve data in primary and secondary storage. File-
based management software is typically very simple to use and is often
very fast, but it offers limited flexibility in how the data can be searched.
Database management software has the opposite strengths and
weaknesses. Microsoft’s Access is an example of popular database
management software.

Word processing: Word processing software allows the user to manipulate


text rather than just numbers. Modern word processors contain many
productive writing and editing features. A typical word processing software
package consists of an integrated set of programs including an editor
program, a formatting program, a print program, a dictionary, a thesaurus,
a grammar checker, a mailing list program, and integrated graphics,
charting, and drawing programs. WYSIWYG (an acronym for What You
See Is What You Get, pronounced “wiz-e-wig”) word processors have the
added advantage of displaying the text material on the screen exactly—or
almost exactly—as it will look on the final printed page (based on the type
of printer connected to the computer). Word processing software enables
users to be much more productive because the software makes it possible
to create and modify the document electronically in memory.

Desktop publishing: Desktop publishing software represents a level of


sophistication beyond regular word processing. In the past, newsletters,
announcements, advertising copy, and other specialized documents had to
be laid out by hand and then typeset. Desktop software allows
microcomputers to perform these tasks directly. Photographs, diagrams,
and other images can be combined with text, including several different
fonts, to produce a finished, camera-ready document.

Graphics: Graphics software allows the user to create, store, and display or
print charts, graphs, maps, and drawings. Graphics software enables users
to absorb more information more quickly and to spot relationships and
trends in data more easily. There are three basic categories of graphics
105
software packages: presentation graphics, analysis graphics, and
computer-aided design software. Presentation graphics software allows
users to create graphically rich presentations. Many packages have
extensive libraries of clip art—pictures that can be electronically “clipped
out” and “pasted” into the finished image. One of the most widely used
presentation graphics programs is Microsoft’s PowerPoint. Analysis
graphics applications additionally provide the ability to convert previously
analyzed data—such as statistical data—into graphic formats like bar
charts, line charts, pie charts, and scatter diagrams. Computer-aided
design (CAD) software, used for designing items for manufacturing, allows
designers to design and “build” production prototypes in software, test
them.

Multimedia: Multimedia software combines at least two media for input or


output of data. These media include audio (sound), voice, animation, video,
text, graphics, and images. Multimedia can also be thought of as the
combination of spatial-based media (text and images) with time-based
media (sound and video).

Communications: Computers are often interconnected in order to share or


relate information. To exchange information, computers utilize
communications software. This software allows computers, whether they
are located close together or far apart, to exchange data over dedicated or
public cables, telephone lines, satellite relay systems, or microwave
circuits. When communications software exists in both the sending and
receiving computers, they are able to establish and relinquish electronic
links, code and decode data transmissions, verify transmission errors (and
correct them automatically), and check for and handle transmission
interruptions or conflicting transmission priorities. E-mail and desktop video
conferencing rely on communications software.

Speech-recognition software: Two categories of speech-recognition


software are available today: discrete speech and continuous speech.
Discrete speech recognition can interpret only one word at a time, so users
must place distinct pauses between words. This type of voice recognition
can be used to control PC software (by using words such as “execute” or
“print”). But it is inadequate for dictating a memo, because users find it

106
difficult to speak with measurable pauses between every word and still
maintain trains of thought.

In summary, application programs primarily manipulate data or text to


produce or provide information. Systems programs primarily manipulate
computer hardware resources. The systems software available on a
computer system provides the capabilities and limitations within which the
application software can operate.

Software Licensing

Vendors spend a great deal of time and money developing their software
products. To protect this investment, they must protect their software from
being copied and distributed by individuals and other software companies.
A company can copyright its software, which means that the company got a
grant to exclusively reproduce, publish, and sell that software. A license is
permission granted under the law to engage in an activity otherwise
unlawful.

Open Systems

The concept of open systems refers to a model of computing products that


work together. Achieving this goal is possible through the use of the same
operating system with compatible software on all the different computers
that would interact with one another in an organization. A complementary
approach is to produce application software that will run across all
computer platforms. If hardware, operating systems, and application
software are designed as open systems, the user would be able to
purchase the best software for the job without worrying whether it will run
on particular hardware. As an example, much Apple MacIntosh application
software would not run on Wintel (Windows-Intel) PCs, and vice versa.
Neither of these would run on a mainframe. Certain operating systems, like
UNIX, will run on almost any machine. Therefore, to achieve an open-
systems goal, organizations frequently employ UNIX on their desktop and
larger machines so that software designed for UNIX will operate on any
machine. Recent advances toward the open-systems goal involve using the
107
Java language, which can be run on many types of computers, in place of a
traditional operating system. Programs written in Java can then be
executed by any machine.

Open Source Software

Open systems should not be confused with open source software. Open
source software is software made available in source code form at no cost
to developers. There are many examples of open-source software,
including the GNU (GNU’s Not UNIX) suite of software (gnu.org) developed
by the Free Software Foundation (fsf.org); the Linux operating system;
Apache Web server (apache.org); sendmail SMTP (Send Mail Transport
Protocol) e-mail server (sendmail.org); the Perl programming language
(perl.com), the Netscape Mozilla browser (mozilla.org); and Sun’s
StarOffice applications suite (sun.com). Open source software is, in many
cases, more reliable than commercial software. Because the code is
available to many developers, more bugs are discovered early and quickly,
and are fixed immediately. Support for open source software is also
available from companies that provide products derived from the software,
for example, Red Hat for Linux (redhat.com). These firms provide
education, training, and technical support for the software for a fee.

108
Chapter 5
Computer Networks

By the end of the chapter, student should


be able to:
- Define Network.
- Identify the different network types.
- Discuss network topology.
- Compare between WWW and Internet
- Identify the hardware required at home to connect to the
Internet.
- Identify the data transfer rate.

109
A large number of computers are interconnected by copper wire, fiber optic
cable, microwave and infrared or through satellite. A system consisting of
connected nodes made to share data, hardware and software is called a
Computer Network. Some Important Reasons for Networking are:

- Sharing of resources: Primary goal of a computer network is to share


resources. For example several PCs can be connected to a single
expensive line printer.
- Sharing information: Information on a single computer can be
accessed by other computers in the network. Duplication of data file
on separate PCs can be avoided.
- Communication: When several PCs are connected to each other,
messages can be sent and received. From a remote location, a
mobile salesman can relay important messages to the central office
regarding orders. Relevant databases are updated and the business
commitments are fulfilled.

Applications of Network

Several educational institutions, businesses and other organizations have


discovered the benefits of computer networks. Users can share data and
programs. They can co-operate on projects to maximize the usage of
available expertise and talent. The following are the areas where computer
networks are employed:

- Electronic data interchange


- Tele-conferencing
- Cellular telephone
- Cable Television
- Financial services, marketing and sales
- Reservation of Airlines, trains, Theatres and buses
- Telemedicine
- ATM
- Internet banking

110
Wired vs. Wireless Networks:
Wired:
• A network in which computers and other devices are physically
connected to the network with cables
• Found in schools, businesses, and government facilities
Wireless
• A network in which computers and other devices are connected to
the network without physical cables
• Data is typically sent via radio waves
• Found in homes, schools, and businesses

Benefits of Network

- Effective handling of personal communications.


- Allowing several users to access simultaneously important programs
and data.
- Making it easy for the users to keep all critical data on shared storage
device and safeguard the data.
- Allowing people to share costly equipment.
The computer communication should ensure safe, secure and reliable data
transfer.
- Safe: The data received is the same as the data sent.
- Secure: The data being transferred cannot be damaged either will
fully or accidentally.
- Reliable: Both the sender and the receiver knows the status of the
data sent. Thus the sender knows whether the receiver got the
correct data or not.

Types of Network

As shown in the following figure,


the general types of networks used
today are:

111
- Local Area Network (LAN)
- Metropolitan Area Network (MAN)
- Wide Area Network (WAN)

A network connecting systems and devices inside a single building or


buildings close to each other is called Local Area Network (LAN). Generally
LANs do not use the telephone network. They are connected either by wire
or wireless. Wired connection may be using twisted pairs, coaxial cables or
Fiber Optic cables. In a wireless LAN, connections may be using infrared or
radio waves. Wireless networks are useful when computers are portable.
However, wireless network communicates slowly than a wired network. The
number of Computers in the network is between two to several hundreds.
LAN is generally used to share hardware, software and data. A computer
sharing software package and hard disk is called a file server or network
server.
A Network that spans a geographical area covering a Metropolitan city is
called Metropolitan Area Network (MAN). A WAN is typically two or more
LANs connected together across a wide geographical area. The individual
LANs separated by large distances may be connected by dedicated links,
fiber optic cables or satellite links.

Network Topology

The network topology is the structure or layout of the communication


channels that connects the various computers on the network. Each
computer in the network is called a node. There are a number of factors
that determine the topology suitable for a given situation. Some of the
important consideration is the type of nodes, the expected performance,
type of wiring (physical link) used and the cost. Network can be laid out in
different ways. The three common topologies are star, ring and bus.

Star Network: In a star network all computers and other communication


devices are connected to a central hub. Such as a file server or host
computer usually by a Unshielded Twisted Pair (UTP) cables.

112
Ring Network: In a ring network
computers and other communication
devices are connected in a
continuous loop. Electronic data are
passed around the ring in one
direction, with each node serving as
a repeater until it reaches the right
destination. There is no central host
computer or server.

Bus Network: In a bus network all


communication devices are
connected to a common cable called
bus. There is no central computer or
server. The data transmission is
bidirectional.

113
Network Architectures

Client-Server Networks:
• Client
– Computer or other device on the network that requests and
utilizes network resources
• Server
– Computer dedicated to processing client requests

Peer-to-Peer (P2P) Networks:


• Central server is not used
• All computers on the network work at the same functional level

114
• Users have direct access to the computers and devices attached to
the network
• Less complicated and less expensive to implement than client-
server networks
• Internet P2P Computing: Content is exchanged over the Internet
directly between users
Basics of Networking

All networks require the following three elements:

1) Network services: Network services are provided by numerous


combinations of computer hardware and software.

o File Services
o Print services
o Message services
o Application Services

2) Transmission media: Transmission media is the pathway for


contacting each computer with other. Transmission media include
cables and wireless technologies that allow networked devices to
contact each other. This provides a message delivery path.

Bandwidth:
– The amount of data that can be transferred in a given period
of time
– Measured in bits per second (bps), Kbps (thousands), Mbps
(millions ), or GFbps (billions)

Analog vs. Digital Signals:


– Data represented by two discrete states: 0s and 1s
– Conventional telephone systems use analog signals:
Represent data with continuous waves

115
Delivery Method:
– Circuit-Switching
• Dedicated path over a network is established between
sender and receiver; all data follows that path
– Packet-Switching
• Messages are separated into small units called packets
and travel along the network separately; packets are
reassembled once destination is reached
– Broadcasting
• Data is sent out to all other nodes on the network and
retrieved only by the intended recipient; primarily used
with LANs

Wired Networking Media:


– Twisted-Pair Cable
• Pairs of insulated wires twisted together
• Used for telephone and network connections (LANs)
– Coaxial Cable
• Thick center wire surrounded by insulation
• Used for computer networks and cable television delivery
116
– Fiber-Optic Cable
• Utilizes hundreds of thin transparent clear glass or plastic
fibers over which lasers transmit data as light
• Used for high-speed communications

3) Protocols: A protocol can be one rule or a set of rules and standards


that allow different devices to hold conversations.

TCP/IP and Other Communications Protocols:

TCP/IP:
– Most widely used communications protocol
– Consists of two protocols

117
• Transmission Control Protocols (TCP): Responsible for
delivery of data
• Internet Protocols (IP): Provides addresses and routing
information. It uses packet switching to transmit data
– TCP/IP support is built into almost all operating systems and IP
addresses are used to identify computers and devices on networks

Other Protocols:
– HTTP (Hypertext Transfer Protocol) and HTTPS (Secure Hypertext
Transfer Protocol)
• Used to display Web pages
– FTP (File Transfer Protocol)
• Used to transfer files over the Internet

118
– SMTP (Simple Mail Transfer Protocol and POP3 (Post Office
Protocol)
• Used to deliver e-mail over the Internet

Internet

Several networks, small and big all over the world, are connected together
to form a Global network called the Internet. Today’s Internet is a network
of about 50 million or more computers spread across 200 countries.
Anyone connected to the Internet can reach, communicate and access
information from any other computer connected to it. Some of the Internet
users are:
1) Students
2) Faculty members
3) Scientists
4) Executives and Corporate members
5) Government employees
6) Kids
7) Others
The Internet protocol (IP) addressing system is used to keep track of the
million of users. Each computer on net is called a host. The IP addressing
system uses the letter addressing system and number addressing systems.

119
Communication Protocol:
Internet is a packet-switching network. Here is how packet switching works:
A sending computer breaks an electronic message into packets. The
various packets are sent through a communication network-often by
different routes, at different speeds and sandwiched in between packets
from other messages. Once the packets arrive at the destination, the
receiving computer reassembles the packets in proper sequence. The
packet switching is suitable for data transmission. The software that is
responsible for making the Internet function efficiently is TCP/IP.

Who Governs the Internet?


The Internet as a whole does not have a single controller. But the Internet
society, which is a voluntary membership organization, takes the
responsibility to promote global information exchange through the Internet
technology. Internet Corporation for Assigned Names and Numbers
(ICANN) administers the domain name registration. It helps to avoid a
name which is already registered.

World Wide Web (WWW):

Web is a multimedia portion of the Internet. It consists of an interconnection


system of sites or servers all over the world that can store information in
120
the multimedia form. The Multimedia sites include text, animated graph,
voice and images. The World Wide Web is the most graphically inviting and
easily navigable section of the Internet. It contains several millions of pages
of information. Each page is called a web page. A group of related web
pages linked together forms a web site. The first page of the website is
called a Home page (named index.html). The Home page usually contains
information about the site and links to other pages on that site. Every web
page has a unique address called the Uniform Resource Locator or URL.
The URL locates the pages on the Internet. An example of URL is
http://www.country-watch.com/India where http stands for Hypertext
Transfer Protocol (HTTP). This protocol is meant for transferring the web
files. The www portion of the address stands for “world wide web” and the
next part country “watch.com” is the domain name. Generally, the domain
name will be followed by directory path and the specific document address
separated by slashes. Looking for information on the Internet is called
surfing or browsing. To browse the Internet, a software called web browser
is used. Web browser translates HTML documents of the website and
allows to view it on the screen.

Examples of web browsers are


Internet Explorer and Netscape
Navigator. The mouse pointer
moves over a underlined or
highlighted words and images
hange to a hand icon. This is
called an hyperlink. This
indicates the link to other sites.
To go to one of the linked sites,
just click the mouse on the
hyperlink.

E-mail: The World Wide Web is


getting a lot of attention due to
its main attraction of Electronic mail. Electronic mail is usually used to
exchange messages and data files. Each user is assigned an electronic
mail box. Using mail services, one can scan a list of messages that can be
sent to anyone who has the proper email identification. The message sent

121
to any one resides in the mailbox till it is opened. Many other features of
standard mail delivery are implemented in email.

FTP: File Transfer Protocol, abbreviated as FTP is used for the net user for
transferring files around the world. The transfer includes software, games,
photos, maps, music and such other relevant materials.

Home Network Hardware

Network Adapter:
– Used to connect a computer to a network
– Also called network interface card (NIC) when in the form of an
expansion card

Modem:
– Device that enables a computer to communicate over analog
networking media
– Term is often used interchangeably with network adapter

122
– Most computers and mobile devices today come with a built-in
network adapter and/or modem

Switch:
– Central device that connects devices in a wired network but only
sends data to the intended recipient
– Hub – similar but sends data to all recipients

Router:

– Connects multiple
networks: two LANs, two
WANS, LAN and the
Internet
– Passes data to intended
recipient only
– Routes traffic over the
Internet

Wireless Access Point:


– Device used to grant network access to wireless client devices
Wireless Router:
– Typically connects both wired and wireless devices to a network
and to connect the network to the Internet
– Often integrates a switch, router, and wireless access point
Bridge:
– Used to connect two LANs together
– In a home network, wirelessly connects a wired device to the
network

123
Repeaters:
– Amplify signals along a network
Range Extenders:
– Repeaters for a wireless network
Antennas:
– Devices used for receiving or sending radio signals
– Some network adapters can use an external antenna
– Can be directional or omnidirectional
– Strength measured in decibels (dB)
Multiplexer:
– Combines transmissions from several different devices to send
them as one message
Concentrator:
– Combines messages and sends them via a single transmission
medium in such a way that all of the messages are simultaneously

124
active

To summarize, the device connection order is outlined below:

- PC or wireless device
- Router
- Modem
- ISP
- Internet

125
While the router and modem are usually separate entities, in some cases,
the modem and router may be combined into a single device. This type of
hybrid device is sometimes offered by ISPs to simplify the setup process.

Data Transfer Rate:


The speed at which data travel over a communication channel is called the
communication rate. The rate at which the data are transferred is
expressed in terms of bits per second (bps).

126
Chapter 6
Computer Security

By the end of the chapter, student should


be able to:
- Define a Computer Security concept.
- Understand how data and programs are encrypted.
- Create a strong password.
- Protect his/here data/programs/computer from viruses.
- Save his/here data by making a backup.

127
The security of a system, application, or protocol is always relative to:

– A set of desired properties


– An adversary with specific capabilities

For example, standard file access permissions in Linux and Windows are
not effective against an adversary who can boot from a CD.

Security is the protection of information systems from theft or damage to


the hardware, the software, and to the information on them, as well as from
disruption or misdirection of the services they provide. It
includes controlling physical access to the hardware, as well as protecting
against harm that may come via network access, data and code
injection, and due to malpractice by operators, whether intentional,
accidental, or due to them being tricked into deviating from secure
procedures. The field is of growing importance due to the increasing
reliance on computer systems and the Internet in most societies, wireless
networks such as Bluetooth and Wi-Fi - and the growth of "smart" devices,
including smart phones, televisions and tiny devices. As shown in the
following figure, security goals are:

128
Confidentiality

The avoidance of the unauthorized disclosure of information. It involves the


protection of data, providing access for those who are allowed to see it
while disallowing others from learning anything about its content.

Tools for Confidentiality

Encryption: the transformation of information using a secret, called an


encryption key, so that the transformed information can only be read using
another secret, called the decryption key (which may, in some cases, be
the same as the encryption key).

Access control: rules and policies that limit access to confidential


information to those people and/or systems with a “need to know.” – This
need to know may be determined by identity, such as a person’s name or a

129
computer’s serial number, or by a role that a person has, such as being a
manager or a computer security specialist.

Authentication: the determination of the identity or role that someone has.


This determination can be done in a number of different ways, but it is
usually based on a combination of:
– something the person has (like a smart card or a radio key fob
storing secret keys), – something the person knows (like a
password),
– something the person is (like a human with a fingerprint).

Authorization: the determination if a person or system is allowed access


to resources, based on an access control policy. Such authorizations
should prevent an attacker from tricking the system into letting him have
access to protected resources.

Physical security: the establishment of physical barriers to limit access to


protected computational resources. Such barriers include locks on cabinets

130
and doors, the placement of computers in windowless rooms, the use of
sound dampening materials, and even the construction of buildings or
rooms with walls incorporating copper meshes (called Faraday cages) so
that electromagnetic signals cannot enter or exit the enclosure.

Integrity

Integrity is the property that information has not be altered in an


unauthorized way.

Tools:

Backups: the periodic archiving of data.

Checksums: the computation of a function that maps the contents of a file


to a numerical value. A checksum function depends on the entire contents
of a file and is designed in a way that even a small change to the input file
(such as flipping a single bit) is highly likely to result in a different output
value.

Data correcting codes: methods for storing data in such a way that small
changes can be easily detected and automatically corrected.

Availability

Availability is the property that information is accessible and modifiable in a


timely fashion by those authorized to do so.
Tools:

Physical protections: infrastructure meant to keep information available


even in the event of physical challenges.

131
Computational redundancies: computers and storage devices that serve
as fallbacks in the case of failures.

Other Security Concepts:

Assurance

Assurance refers to how trust is provided and managed in computer


systems. Trust management depends on:
– Policies, which specify behavioral expectations that people or
systems have for themselves and others. For example, the designers
of an online music system may specify policies that describe how
users can access and copy songs.

– Permissions, which describe the behaviors that are allowed by the


agents that interact with a person or system. For instance, an online

132
music store may provide permissions for limited access and copying
to people who have purchased certain songs.
– Protections, which describe mechanisms put in place to enforce
permissions and polices. We could imagine that an online music store
would build in protections to prevent people from unauthorized
access and copying of its songs.

Authenticity

Authenticity is the ability to determine that statements, policies, and


permissions issued by persons or systems are genuine. A primary tool is:

Digital signatures: These are cryptographic computations that allow


a person or system to commit to the authenticity of their documents in
a unique way that achieves nonrepudiation, which is the property that
authentic statements issued by some person or system cannot be
denied.

Anonymity

Anonymity is the property that certain records or transactions not to be


attributable to any individual.

Tools:

Aggregation: the combining of data from many individuals so that


disclosed sums or averages cannot be tied to any individual.

Mixing: the intertwining of transactions, information, or communications in


a way that cannot be traced to any individual.

133
Proxies: trusted agents that are willing to engage in actions for an
individual in a way that cannot be traced back to that person.

Pseudonyms: fictional identities that can fill in for real identities in


communications and transactions, but are otherwise known only to a
trusted entity.

Threats and Attacks

Eavesdropping: the interception of information intended for someone else


during its transmission over a communication channel.

Alteration: unauthorized modification of information. For example, the


man-in-the-middle attack, where a network stream is intercepted, modified,
and retransmitted.

134
Denial-of-service: the interruption or degradation of a data service or
information access. For example: email spam, to the degree that it is meant
to simply fill up a mail queue and slow down an email server.

Masquerading: the fabrication of


information that is purported to be from
someone who is not actually the author.

Repudiation: the denial of a commitment


or data receipt. This involves an attempt to
back out of a contract or a protocol that

135
requires the different parties to provide receipts acknowledging that data
has been received.

Correlation and traceback:


the integration of multiple data
sources and information flows
to determine the source of a
particular data stream or piece
of information.

Encryption

Encryption is the process of encoding messages or information in such a


way that only authorized parties can read it. Encryption does not of itself
prevent interception, but denies the message content to the interceptor. In
an encryption scheme, the intended communication information or
message, referred to as plaintext, is encrypted using an encryption
algorithm, generating ciphertext that can only be read if decrypted. For
technical reasons, an encryption scheme usually uses a pseudo-random
encryption key generated by an algorithm. It is in principle possible to
decrypt the message without possessing the key, but, for a well-designed
encryption scheme, large computational resources and skill are required.
An authorized recipient can easily decrypt the message with the key
provided by the originator to recipients, but not to unauthorized
interceptors. The purpose of encryption is to ensure that only somebody
who is authorized to access data (e.g. a text message or a file), will be able
to read it, using the decryption key. Somebody who is not authorized can
be excluded, because he or she does not have the required key, without
which it is impossible to read the encrypted information.

136
Passwords

The password is what makes an unknown person an authenticated user,


with all his privileges and his identity’s responsibilities. Law explicitly forbids
users from giving their password to other users, even when they are absent
from work. These are some, often underestimated, malign actions a
passwords’ thief can do:

- steal personal information: the thief can read the user’s emails and
personal information.
- steal privacy protected data: the thief can gain access to data about
other people protected by privacy, or read emails received from other
people. The legal responsible of this privacy violation is the thief as
well as the user who did not protect other people’s data.
- steal money: the thief can find the user’s bank account numbers and
passwords, sometimes directly from the user’s web browser’s history.
- delete and modify data: the thief can delete user’s important data, or
even worse he can modify these data without the user’s knowledge
(bank numbers, friend’s email addresses, degree thesis content, add
illegal pictures).
- steal identity: for the computer the thief is now the user, and therefore
he can act to the outside world exactly as if it were the user, for
example answering to emails, subscribing to websites, withdrawing
from exams.

137
- start illegal activities: anybody who wants to start an illegal Internet
activity will obviously use somebody else identity, so he will not get
into troubles when the activity is discovered.

Therefore it is absolutely necessary to keep passwords secret.


Unfortunately many people use very trivial passwords. This is the list of the
most common passwords in 2014: password, 123456, 12345678, 1234,
qwerty, dragon, pussy, baseball, football, letmein, monkey, 696969,
abc123, 12345.

There exist automatic programs which are able to try 4 billion passwords
each second, and they usually start trying combinations of words and
numbers (the complete set of all Italian, German and English words can be
tried in less than 1 second). Check on https://howsecureismypassword.net
how much time does it take to one of these programs to discover your easy
passwords.

The following features should be considered when creating a new


password:

- change the password often, at least every six months (3 if sensitive


data are handled);
- avoid words related to yourself, such as names, birth dates, birth
places and addresses;
- use minimum 8 characters.
- use as password a good mix of numbers, strange characters, small
caps and capital letters, avoiding any common word (other people’s
names or words which can be found in a dictionary);
- use different passwords for different purposes.
- beware of passwords stored in programs: mail readers, Internet
Explorer and many other programs

It is possible to either replace the password authentification with other


personal devices or with biometric identification or to simply add these
techniques to existing passwords. Usually biometric identification is
considered to be very secure and thus it is used to replace completely the

138
password system. It can be fingerprint recognition, hand palm blood
vessels recognition, eye’s retina scanning or voice identification.

Viruses

A computer virus is a type of malicious software program ("malware") that,


when executed, replicates by reproducing itself (copying its own source
code) or infecting other computer programs by modifying them. Infecting
computer programs can include as well, data files, or the "boot" sector of
the hard drive. When this replication succeeds, the affected areas are then
said to be "infected" with a computer virus.

While normal external attacks do not involve normal users, the virus is a
special attack which arrives directly on the user’s computer and must be
prevented and stopped by him. The virus is a little program which has this
name because its life cycle is the same of a biological organism: survive
and duplicate.

- It arrives on the computer through email attachments, downloaded


files, CDs and floppy disks or directly from the Intranet. It is often
hidden inside other good files or programs, which are called infected.
In the last years many free programs deliberately install small
advertisement programs without the user’s explicit consent; this kind
of behaviors is considered borderline between a virus and a way of
financing the program’s development.
- As soon as the user mistakenly runs it (often trying to run the good
program or to open the good file), the virus orders the computer to
run itself every time the computer is turned on, thus assuring its
survival.
- It starts duplicating itself, infecting other files, CDs and floppy disks,
and trying to send itself around by email or on the Intranet.
- Most viruses are programmed to do damage to the computer and to
the user, altering or deleting files, sending emails with user’s personal
data, preventing firewalls and anti-viruses from running, or turning the
computer off. No viruses are known to be able to damage hardware.

139
Many names are used for viruses’ types according to their different
behaviors:

- trojan horse is a virus which looks like a good program and, when
downloaded and run by the user, it performs the user’s wanted task
but at the same time does other actions;
- key logger is a virus which records keyboard’s activity and then sends
the keystrokes to its creator, mostly to get user’s passwords;
- back door is a virus which opens a port on the computer to let
external users in;
- adware is a virus which displays advertisement;
- spyware is a virus which spies user’s activity to get passwords or to
target the user with specific advertisement;

These types are not exclusive: for example a Trojan horse which is at the
same time a spyware and an adware. An infected computer can be
recognized by some symptoms. These are the most frequent ones:

- when the computer is turned on, unwanted programs start,


advertisement appears, and the desktop presents some new bars or
features which were not present nor installed before;
- the computer starts very slowly and unknown programs give strange
operating system errors;
- commercial or pornographic web pages appear on the web browser
without the user’s consent;
- the analogical modem makes typical connection noises even when
the computer is not connected or the operating system asks the user
to stop the current connection and start a new one to a strange
telephone number;
- the Task Manager window (see page 7) presents unknown programs.

Most of the time, a responsible user’s behavior it the best weapon against
viruses: it protects him from getting viruses, helps him removing them and
prevents him from diffusing them. Responsible behavior means:

140
- never open downloaded files and email attachments, especially when
they come from a friend with a text such as “please open it, urgent!”,
since simulating to be a user’s friend is a typical virus tactics. To open
these files, save them on the desktop, check them with an antivirus
and then open them;
- do not insert in your computer CDs, DVDs and USB pendrives
coming from other people or which were inserted in other computers,
unless you have an antivirus running or unless you scan them
immediately with an antivirus;
- avoid visiting strange websites, especially pornographic or hackers’
website, or websites which open a lot of pop-up windows;
- have an antivirus always running or at least run an updated antivirus
on your whole hard disks every week (while Italian law currently
prescribes minimum every 6 months); keep your antivirus always up
to date: more than 50 new viruses appear every week;
- keep communication programs and Microsoft products up to date.
Microsoft and most software companies offer free updates and
automatic updating tools;
- beware of free programs which often try to install adware programs,
asking the permission very quickly during installation’s steps, relying
on the novice user’s habit of clicking always “yes”.
To check the computer for viruses and to try to remove viruses from the
computer, the user can run a special program called antivirus. The antivirus
basically has three possible different actions:
- it can scan all the storage devices (hard disks, the floppy disk inside
the computer, the CD or DVD inside the reader) for viruses. If a virus
is found, it tries to remove it and to repair damaged files. Some files
can be unrecoverable. Complete devices scanning takes usually
some hours;
- it can scan a single file or an entire directory for viruses. If there is an
infected file, it tries to delete the virus and repair it. Some files can be
unrecoverable. Single file scanning takes some seconds;
- it can be always running. In this case, whenever a virus or a suspect
file is run, the antivirus prevents it from running and warns the user.
A lot of antivirus programs, free and commercial, exist. Their most
important feature is obviously the possibility to be constantly updated
through the Internet. Some common antivirus programs are:
- AVG

141
- Kaspersky
- Norton
- Avira
- Avast
- Clamwin
- Panda Cloud

Emails: For viruses, email attachments are a first class way of traveling,
since they are very often opened by users without any precaution.
Sometimes viruses hide inside files which were really sent by the sender,
unaware of having an infected computer. Other times a virus takes control
of the mail reader program and sends itself to the whole address book,
counterfeiting the sender address (often using an address taken from the
address book) in order to avoid that the real infected computer be identified
and to gain the thrust of the receiver, and writing in the email text smart
sentences pretending to be a regular friend of the receiver. The arrival of
this kind of email usually creates havoc, since the receiver is sure that the
fake sender has a virus, while the original infected computer is another
one.
The basic rule is never open any attachment from the mail reader program.
Save the attached files on the desktop and run an antivirus program to
check these files before opening them. Even when the email comes from a
friend: he cannot know that to have got a virus, or he can not be the real
sender.

Spam: Spam messages are unsolicited unwanted bulk emails. They are
unsolicited, meaning that the user did not ask to receive them, they are
unwanted, meaning that the user did not want to receive them, and they
are bulk, meaning that they are sent to millions of addresses. They are
used mainly for four different purposes:
- advertisement emails are the most innocuous version. The email
message contains commercial information usually on medicines,
pornography, software or investments. Sometimes these messages
are purposely written with orthographic mistakes or with strange
characters, to avoid being intercepted by anti-spam programs;
- chain letters are electronic versions of letters circulating in the XX
century. They promise good luck to anyone resending it and bad luck
to anyone trashing it, or they contain a sad story of an ill child desiring
142
postcards or an urgent warning about a terrible virus: their content is
probably false or too old, and a search on the WWW will reveal this
immediately. Sending it around will probably cause complains from
other users;
- frauds are usually long letters proposing the user a semi-legal
bargain or a big lottery prize. Their only aims are to get the user’s
bank coordinates for further illicit activities and to lure him into paying
small expenses hoping to get the promised imaginary money;

Navigation: Navigation is the second most dangerous Internet activity. It


has more or less the same dangers as emails: the user’s computer can get
viruses if he does not run an antivirus before opening downloaded files,
and the user can be lured into phishing websites if he does not type
personally the bank’s address in the web browser. Moreover, the computer
can get viruses even when simply visiting some websites, and therefore
two good suggestions are to avoid visiting strange (pornographic websites,
websites with a lot of pop-up windows and illegal websites) or
untrustworthy websites and to keep Internet Explorer and Windows
operating system always up to date.
The other security problem while navigating is data interception. When
connecting to a website, the user’s data travels long distances, passing
through a large number of computers (to connect from unibz.it to
www.athesia.it the data go to Padua, Milan and Bologna passing through at
least 13 computers). Data on the Internet travel without any protection, any
computer administrator can read them. Therefore, when sending
passwords and other private data to a website, the user should take special
care that the address in the address bar starts with https:// (instead of
http://) and on some browser a lock icon appears in the lower right part of
the windows, while on others the address bar becomes green with a lock:
these indications mean that the connection is secure (SSL) since data are
traveling encrypted. Beware that the SSL connection guarantees only that
data are not intercepted and that the user is connected to the same website
from which he started the connection, while it does not guaranteed this
website is the right one.

Attacks from outside: Any computer attached to the Internet, either


directly through a modem or indirectly inside a LAN, is subject to attacks
from the outside WAN. The typical attack consists in external computers
143
trying to gain access to the computer using operating system known
problems or hoping that the user is currently running programs which open
some computer’s parts to outside connections. From the user’s side, the
best defense is keeping the computer’s program always up-to-date,
especially the operating system and communication programs (as
suggested in section 4.5 on page 29).
The most famous attack from outside, and the one from which it is very
difficult to have an appropriate defense, is the DoS Denial of Service
attack. It is an attack which does not strike private users, but companies
offering services over the Internet. It consists in sending millions of
incoming connections which pretend to use the service but stay simply
connected, in such a way to overcrowd the server and drain all its
resources (bandwidth, speed, memory) until the server crashes. The
attacker clearly does not use his own computer to carry on a DoS attack,
otherwise his computer would probably crash before the server, but uses
computer of unaware users around the world, called zombies, which have
been hacked in the past days. In this way the attacker has the power of
several dozen computers connected from many different parts of the world
and at the same time it is difficult to trace the responsibility up to him.

Firewall: Often programs’ security breaches once discovered need some


days to be fixed and somebody can take benefit of them in this short time,
before the security update is installed on the user’s computer. Therefore on
every LAN, usually in the point where the LAN connects to the Internet, or
more often on every computer a special program called firewall is running.
The firewall examines all the incoming and outgoing traffic, using the
following analysis techniques:
- which internal program is originating/receiving the traffic,
- from/to which external address is the traffic originated/directed,
- what amount of traffic is passing from/to the same program to/from
the same external address,
- which kind of data are passing.
Making an analysis of these data clearly slows down the connection but
lets the firewall stop potential unauthorized connection, putting them in a
wait state until the user’s gives his approval or denial. Windows Seven
operating system comes with a firewall preinstalled, which lets the user
customize which kind of programs are allowed to make or receive

144
connections and determine rules to approve or deny automatically
connections.

Backup
Backup is the process of copying important data to another location to
prevent their loss. Sometimes programs and even entire operating systems
are copied, to be able to immediately continue working even when a
computer breaks. There are three very good reasons to do regular
backups:
- against the user, who can accidentally delete some files or who can
modify files and then change his mind. Having a recent backup handy
can often save hours of work;
- against the system, which can suddenly break due to hardware or
software problems. Even hard disks tend to be unreliable after some
years of continuous activity. A recent backup saves the user from
redoing all the work of the previous months;
- against viruses and other users, which can delete and alter files: a
backup can save a user coming back from vacations.
Usually the operating system’s and the programs’ backup are done by
system administrators. However, there are some files which should be
taken in charge by the user himself:
- personally created data files, including all documents and images
created by the user, and any other file which is a result of the user’s
personal work;
- in case emails are not handled with an online system: the contacts,
calendar and the emails (mail readers usually offer a way to save
them into files to be used for backup);
- some programs require a lot of configuration and store their
configuration in configuration files, which are usually in the program’s
directory;
- all the stuff which is difficult to find again, such as documents from
other people or downloaded from forgotten websites.
The place where the files are copied determines the reliability of the
backup. It should be a large, cheap and fast storage device. It should also
be handy, since the typical problem with backup is that the user does not
takes time to do it regularly and, when the backup is too old, it is worthless.
For home or simple office users, the Friday morning backup is a good
145
timing solution. A good storage device to be used is a second hard disk,
used only for backup, which is very fast and very large and always ready to
be used.

The Ten Security Principles

146

You might also like