Computer (ISS)
Computer (ISS)
COMPUTER ORGANISATION
AND ARCHITECTURE
different models, each representing a different type of organisation, depending on the cost, physical size
and technology used.
In this chapter, we shall discuss in detail the functioning of the central processor of a computer system,
how the processor communicates with the memory and input/output devices, and the instruction sets used
in the design of processors.
The function of any computer system revolves around a central component known as central processing
unit (CPU). The CPU, which is popularly referred to as the “brain” of the computer, is responsible for
processing the data inside the computer system. It is also responsible for controlling all other components of
the system. Figure 2.1 shows a typical block diagram of the computer system, illustrating the arrangement
of CPU with the input and output units as well as the memory of the computer system.
The CPU makes use of the following memory subsystems for carrying out its processing operations:
∑ Main Memory Unit
∑ Cache Memory
∑ Registers
2.2.6 Registers
Central processing unit contains a few special purpose, temporary storage units known as registers.
They are high-speed memory locations used for holding instructions, data and intermediate results that
are currently being processed. A processor can have different types of registers to hold different types of
information. They include, among others:
∑ Program Counter (PC) to keep track of the next instruction to be executed.
∑ Instruction Register (IR) to hold instructions to be decoded by the control unit.
∑ Memory Address Register (MAR) to hold the address of the next location in the memory to be
accessed.
∑ Memory Buffer Register (MBR) for storing data received from or sent to CPU.
∑ Memory Data Register (MDR) for storing operands and data.
∑ Accumulator (ACC) for storing the results produced by arithmetic and logic units.
Many computers employ additional registers for implementing various other requirements. The number
and sizes of registers therefore vary from processor to processor. An effective implementation of registers
can increase considerably the speed of the processor.
CPU of the computer system communicates with the memory and the I/O devices in order to transfer
data between them. However, the method of communication of the CPU with memory and I/O devices
is different. The CPU may communicate with the memory either directly or through the cache memory.
However, the communication between the CPU and I/O devices is usually implemented with the help of
interfaces. Therefore, the internal communication of a processor in the computer system can be divided into
two major categories:
∑ Processor to memory communication
∑ Processor to I/O devices communication
/////
MBR
Fig. 2.4 Processor to memory communication
The processor can interact with the memory of the computer system for reading data from the memory
as well as for writing data on to the memory. The MAR and MBR registers play a very important role in
Computer Organisation and Architecture 31
implementing this type of communication. These registers are the special-purpose registers of the processor.
MAR is used by the processor to keep track of the memory location where it needs to perform the reading
or writing operation. This register actually holds the address of the memory location. On the other hand, the
Memory Data Register (MDR) is used by the processor to store the data that needs to be transferred from/to
the memory of the computer system. The reading and writing operations performed by the processor are
called memory read and memory write operations.
Figure 2.5 illustrates the memory read operation performed by the processor of the computer system.
The processor performs the following steps to read the data from the desired memory location:
1. First, the processor loads the address of the memory location from where data is to be read into the
MAR register, using the address bus.
2. After loading the address of the memory location, the processor issues the READ control signal
through the control bus. The control bus is used to carry the commands issued by the processor, and
the status signals are generated by the various devices in response to these commands.
3. After receiving the READ control signal, the memory loads the data into the MDR register from the
location specified in the MAR register, using the data bus.
4. Finally, the data is transferred to the processor.
The memory write operation helps the processor to write the data at the desired memory location.
Figure 2.6 illustrates the memory write operation performed by the processor of the computer system.
The processor performs the following steps for writing the data at the desired memory location in the
computer system:
32 Fundamentals of Computers
1. First, the processor loads the address of the memory location where data is to be written in the MAR
register, using the address bus.
2. After loading the address of the memory location, the processor loads the desired data in the MDR
register, using the data bus.
3. After this, the processor issues the WRITE control signal to the memory, using the control bus.
4. Finally, the memory stores the data loaded in the MDR register at the desired memory location.
Fig. 2.7 Illustrating the communication process between the processor and I/O devices
Figure 2.8 illustrates how the data is transferred from an input device to the processor of the computer
system. The steps performed while transferring the data from an input device to the processor are:
1. The data to be transferred is placed on the data bus by the input device, which transfers single byte of
data at a time.
Computer Organisation and Architecture 33
2. The input device then issues the data valid signal through the device control bus to the data register,
indicating that the data is available on the data bus.
3. When the data register of the interface unit accepts the data, it issues a data accepted signal through
the device control bus as an acknowledgement to the input device, indicating that the data has been
received. The input device then disables the data valid signal.
4. As the data register now holds the data, the F or the flag bit of the status register is set to 1.
5. The processor now issues an I/O read signal to the data register in the interface unit.
6. The data register then places the data on the data bus connected to the processor of the computer
system. After receiving the data, the processor sends an appropriate acknowledgement signal to the
input device, indicating that the data has been received.
The I/O write operation helps the processor to write the data to an output device. Figure 2.9 illustrates
how the data is transferred from the processor to an output device. The steps performed while transferring
the data from the processor to the output device are:
1. The processor places the data that needs to be transferred on the data bus connected to the data
register of the interface unit.
2. The CPU also places the address of the output device on the device address bus.
3. After placing the address and data on the appropriate buses, CPU issues the I/O write signal, which
writes the data on the data register. The flag bit in the interface unit is set to 1, indicating that the data
register now holds the data.
34 Fundamentals of Computers
4. The data register of the interface unit issues a data accepted signal through the control bus to the
processor, indicating that the data has been received.
5. The interface unit then places the data stored in the data register on to the data bus connected to the
device controller of the output device.
6. The output device then receives the data and sends an acknowledgement signal to the processor of the
computer system through the interface unit, indicating that the desired data has been received.
The cycle during which a machine language instruction is executed by the processor of the computer system
is known as machine cycle. If a program consists of 10 machine language instructions, 10 separate machine
cycles would be executed for running the program. Figure 2.10 shows the typical machine cycle performed
by the CPU of a computer system. As shown, the machine cycle contains four phases, namely, fetching,
decoding, executing and storing.
The four phases of the machine cycle are usually grouped into two categories:
∑ Instruction cycle
∑ Execution cycle
bus. The address of the instruction is then stored by the CPU in its internal register known as Program
Counter (PC). After the address of the instruction is confirmed by the CPU, the actual instruction is
retrieved by the CPU form the main memory and stored in the Instruction Register (IR).
∑ Decoding This phase of instruction cycle is responsible for breaking down the instruction into
different parts, so that it can be easily understood before being processed by the CPU. The instruction
is usually decoded by the instruction decoder, which is a vital component of the CPU. The decoding
of an instruction is also known as interpreting. The instructions are interpreted to determine two key
attributes of an instruction, the opcode and the operands. The opcode specifies the operation to be
performed and the operands specify the data on which the operation is to be performed. The data is
transferred to the Data Register (DR).
control bus—also exists in the computer system. The control bus manages the transfer of data and addresses
among various components by transferring appropriate control signals. DAC
2.5.1 Data Bus
As the name suggests, the data bus in a computer
system is used to transfer data amongst the
different internal components. The speed of the
data bus also affects the overall processing power
of a computer system. Modern computer systems
use 32-bit data buses for data transfer. This means
that these buses are capable of transferring 32 bits
of data at a time. Figure 2.12 shows the data bus
implemented between the main memory and the
processor of a computer system.
The figure shows that a bidirectional data bus Fig. 2.12 The data bus
is implemented between the main memory and
the processor of the computer system. The bidirectional data bus allows the transfer of data in both the
directions. The data bus is generally bidirectional in nature in most computer systems.
An instruction set can be defined as a group of instructions that a processor can execute to perform different
operations. On the basis of complexity and the number of instructions used, the instruction set can be
classified as:
∑ Complex instruction set
∑ Reduced instruction set
are mostly memory-based instructions, which involve frequent references to the memory. The complex
instruction set makes use of a large number of addressing modes because of the frequent references
to registers as well as memory. The instructions in this instruction set have variable length instruction
format, which is not limited to only 32-bits. The execution of the instructions takes a lot of time because
the instructions are memory-based and accessing the memory is a time consuming process as compared to
accessing the registers.
The computer, which makes use of complex instruction set, is called Complex Instruction Set Computer
(CISC). The instruction set of CISC has a large number of instructions and for each instruction type, the
computer requires a separate circuitry, which makes the CPU design more complicated.
Some of the advantages of CISC are as follows:
∑ There is no need to invent an instruction set for each new design. A new processor can use the
instruction set of its predecessor.
∑ A program written in CISC requires less memory space, as the code is confined to less number of
instructions.
∑ CISC makes the job of a compiler easier by facilitating the implementation of high-level language
constructs.
Some of the disadvantages of a CISC are as follows:
∑ The inheritance of old instructions into new processors increases the complexity.
∑ Many CISC instructions are not frequently used.
∑ CISC commands are translated into a large number of lines of microcode, which makes the CPU
processing slower.
∑ CISC systems have a complex hardware, so they require more time for designing.
2.6.2 Reduced Instruction Set
The reduced instruction set refers to a set of instructions that contains very few instructions ranging from
0 to 100. It comprises of only those instructions, that are frequently used by the processor for the execution
of a program. These instructions are generally very simple to execute. The instructions used in this set are
mostly register-based, which means that the execution of the instruction involves frequent references to the
registers. The memory-based instructions, which involve frequent references to the memory locations, are
very few in this instruction set. The memory-based instructions include only load and store instructions.
The instructions in this instruction set have fixed length instruction format of 32 bits. An instruction format
divides the bits of instruction into small groups called fields. Generally, an instruction has the following fields:
∑ Opcode field. It represents the operation to be performed by the instruction.
∑ Operand field. It represents the data on which the operation is to be performed, or the memory
location or register where the data is stored.
∑ Mode field. It represents the method of fetching the operands stored at specified memory location or
registers.
The computer, which makes use of reduced instruction set, is called Reduced Instruction Set Computer
(RISC). As the instruction set of RISC has very few instructions, the design of hardware circuitry becomes
easier and also the speed of processing increases. The speed of RISC processors is measured in MIPS
(Millions of Instructions Per Second).
The comparison of RISC and CISC processors indicates that the RISC processors are always preferred
over the CISC processors because of their compact size and small instruction set. The other advantages of
the RISC processors over the CISC processors are as follows:
∑ In RISC processors, the instructions are executed by decoding, whereas in CISC processors, the
instructions are executed by first translating them into equivalent microcode instructions. The
38 Fundamentals of Computers
conversion of instructions into microcode consumes a lot of space in the memory, thereby reducing
the speed of execution.
∑ The RISC processors execute instructions in a single clock cycle, while the CISC processors require
multiple clock cycles for the execution of an instruction.
∑ The hardware of the RISC processors is very simple and can be designed easily, as compared to the
hardware of the CISC processors that is very complex, difficult to design and large in size.
The only disadvantage of RISC, in comparison to CISC, is that the number of instructions required to
perform an operation is comparatively large.
Chapter Summary
Computer organisation and architecture refers to the study of different functional components of the computer
system and the manner in which these components interact with each other to perform a specific operation. The
central and main component of a computer system is the CPU. CPU is the only component in the computer system
that is responsible for carrying out different operations. The major internal components of CPU are AU, LU, and
CU. The two major components of a computer system that communicate with the CPU to perform an operation
are main memory unit and cache memory. AU is responsible for performing arithmetic operations while LU is
responsible for performing logical operations. CU controls the functioning of the CPU.
The CPU also interacts with the memory unit for reading and writing the data in the computer system. Generally,
the communication between the memory and the CPU is direct. However, a computer system can also be provided
with a cache memory to speed up the process of CPU to memory communication. CPU can also interact with the
I/O devices through an interface unit to perform various input and output operations.
An instruction is executed by the CPU in two different phases, known as instruction cycle and execution cycle.
During the instruction cycle, the CPU fetches the instruction from the memory and decodes it. The execution
cycle executes the instruction and stores the result back to the main memory or sends it to the output device of the
computer system.
∑ Computer architecture: It refers to the definition of basic attributes of hardware components and their
interconnections, in order to achieve certain specified goals in terms of functions and performance.
∑ Computer organisation: It refers to the design and physical arrangement of various hardware units to work in
tandem, in an orderly manner, in order to achieve the goals specified in the architecture.
∑ CPU: It is referred to as the brain of the computer and is responsible for processing the data inside the computer
system.
∑ AU: It is a part of the CPU that performs arithmetic operations on the data.
∑ LU: It is a part of the CPU that performs logical operations on the data.
∑ CU: It is an important component of CPU that controls the flow of data and information.
∑ Opcode: It specifies the operation to be performed on data.
∑ Operand: It is the data on which the operation is to be performed.
∑ Main memory: It is referred to as the internal memory or primary memory of the computer and is a temporary
storage medium that holds the data only for a short period of time.
∑ Cache memory: It is a small, fast and expensive memory that stores the copies of the data that needs to be
accessed frequently from the main memory.
Computer Organisation and Architecture 39
∑ Primary cache: It is known as L1 cache or internal cache and is located inside the CPU.
∑ Secondary cache: It is also known as L2 cache or external cache and is located on the motherboard of a computer.
∑ Registers: They are high-speed memory locations used for holding instructions, data and intermediate results that
are currently being processed.
∑ PC: This register is used to keep track of the next instruction to be executed.
∑ IR: This register is used to hold instructions to be decoded by the control unit.
∑ MAR: This register is used to hold the address of the next location in the memory to be accessed.
∑ MBR: This register is used to store data received from or sent to CPU.
∑ MDR: This register is used to store operands and data.
∑ Accumulator: This register is used to store the results produced by arithmetic and logic units.
∑ Machine cycle: It refers to a cycle during which a machine language instruction is executed by the processor of
the computer system.
∑ Bus: It is a set of wires that is used to connect the different internal components of the computer system for the
purpose of transferring data as well addresses amongst them.
∑ Data bus: It is a bus used to transfer data among the different internal components.
∑ Address bus: It is a bus used to transfer the memory addresses for read and write memory operations.
∑ Control bus: It is a bus that manages the transfer of data and addresses among various components by transferring
appropriate control signals.
∑ Complex instruction set: It refers to a set of instructions that includes very complex and large number of
instructions.
∑ Reduced instruction set: It refers to a set of instructions that contains very few instructions ranging from
0 to 100.
∑ CISC: It refers to a computer that makes the use of complex instruction set.
∑ RISC: It refers to a computer that makes use of reduced instruction set.
Review Questions
1. The central processing unit of the computer system is popularly known as ________ of the computer system.
2. _________ unit is responsible for performing all the arithmetic operations in the computer system.
3. The _________ register keeps the track of the next instruction to be executed.
4. _____________ is called the main-memory of the computer.
5. The access time of _________ memory is faster as compared to that of main memory.
6. The group of wires used to connect the components of CPU to transfer the data is called ________________.
7. The time taken by the CPU to fetch an instruction and execute it is called ________________.
8. The group of instructions that a processor can execute is called ________________.
9. _________ bus is used to transfer data from the memory.
10. The instruction set can be classified as ________________ and ________________.
11. The _______ field represents the operation to be performed by the instruction.
40 Fundamentals of Computers
12. The instruction set of _________ has a few instructions compared to that of _________.
13. The direct communication between processor and memory of the computer system is implemented with the help
of two registers, __________ and __________.
14. The two important operations performed while communicating with the memory of the computer system are
_________ and _________.
15. The flag bit of the status register is ______, when the register holds the data.
16. The computer, which makes use of reduced instruction set, is called ________.
17. The speed of the RISC processors is measured in ________.
18. __________ bus transfers the memory addresses for reading or writing the data.
1. The definition of basic attributes of hardware components and their interconnections, in order to achieve certain
specific goals, in terms of functions and performance is known as:
A. Computer organisation B. Computer architecture
C. Computer management D. Computer arrangement
2. The design and physical arrangement of various hardware components to work in a tandem in an orderly manner,
so as to archive the goals specified in the architecture is known as:
A. Computer organisation B. Computer architecture
C. Computer management D. Computer arrangement
3. What does CPU stand for?
A. Center processing unit B. Central processing unit
C. Central programming unit D. Computer processing unit
4. Which one of the following is not an internal component of CPU?
A. Arithmetic unit B. Logic unit C. Interface unit D. Control unit
5. What is the main function of CPU in a computer system?
A. Storing the data B. Programming the computer
C. Transferring the data to an output device D. Processing the data
6. Which of the following memory locations are first referred by the CPU while searching for data?
A. Main memory B. Cache Memory C. ROM D. Secondary memory
7. Cache memory is used to transfer data between:
A. Main memory and secondary memory B. Processor and an input device
C. Main memory and processor D. Processor and an output device
8. Which one of the following cache memory is also known as internal cache?
A. L2 cache B. L1 cache C. L3 cache D. L4 cache
9. Which one of the following hardware components is normally used to accommodate secondary cache?
A. Motherboard B. Processor
C. RAM D. Any secondary storage device
Computer Organisation and Architecture 41
10. Which one of the following statement is not true about L1 cache?
A. L1 cache is a type of cache memory.
B. L1 cache stores the data from the main memory.
C. L1 cache is an expensive type of memory.
D. L1 cache is usually slower than L2 cache.
11. Which one of the following register is not a CPU register?
A. Memory control register B. Memory data register
C. Memory buffer register D. Instruction register
12. What is the purpose of memory address register?
A. Stores the address of the next location in the main memory
B. Stores the address of the next location in the secondary memory
C. Stores the address of the next location in the cache memory
D. Stores the address of an output device to which the data is to be sent
13. Which of the following registers is used to indicate whether the data register holds the data to be transferred
or not?
A. Status register B. MAR C. MBR D. MDR
14. Which of the following two registers are used by the CPU to transfer the data between processor and memory?
A. MDR and IR B. PC and IR C. IR and MAR D. MAR and MDR
15. Which of the following sequence of operations represents the machine cycle?
A. Fetch-Execute-Decode-Store B. Store-Execute-Fetch-Decode
C. Fetch-Decode-Execute-Store D. Store-Fetch-Decode-Execute
16. The decoding phase of the instruction cycle is also known as:
A. Translating B. Interpreting C. Analysing D. Breaking
17. Which of the following is not a type of bus used in the computer system?
A. Data bus B. Address bus C. Information bus D. Control bus
18. Which of the following is a characteristic of the CISC processor?
A. Number of instructions varying between 100 and 250
B. Large number of addressing modes
C. Variable length instruction format
D. All of the above
19. What is the fixed length of the instruction format used in RISC processors?
A. 30-bits B. 16-bits C. 32-bits D. 24-bits
Discussion Questions
1. What do you understand by computer architecture? Is it same as computer organisation? If no, explain the
difference between the two.
2. Draw the block diagram of a computer system and explain its main components.
3. How does the control unit assist the CPU in carrying out its operations?
4. What do you understand by CPU cycle? What are the main operations accomplished using the CPU cycle?
C HA PTE R 3
MEMORY AND STORAGE SYSTEMS
using the data and address buses. However, the information stored in the secondary memory is not directly
accessible to CPU. Firstly, the information has to be transferred to the primary memory using I/O channels
and then, to the CPU.
Computers also use a third type of storage location known as the internal process memory. This memory
is placed either inside the CPU or near the CPU (connected through special fast bus). Figure 3.1 illustrates
all the three categories of computer memory and their relative speed, storage capacity and cost.
Primary memory (also known as main memory) includes two types, namely, Random Access Memory (RAM)
and Read Only Memory (ROM). The data stored in RAM are lost when the power is switched off and
therefore, it is known as volatile memory. However, the data stored in ROM stay permanently even after the
power is switched off and therefore ROM is a non-volatile memory.
Secondary memory (also known as auxiliary memory) includes primarily magnetic disks and magnetic
tapes. These storage devices have much larger storage capacity than the primary memory. Information
stored on such devices remains permanent (until we remove it).
Internal process memory usually includes cache memory and registers both of which store data
temporarily and are accessible directly by the CPU. This memory is placed inside or near the CPU for the
fast access of data.
We have discussed briefly cache memory and various registers used in Chapter 2. In this chapter, we
shall discuss the various types of memory units, RAM and ROM and their functions. We shall also discuss
the classification of storage devices such as magnetic disks, magnetic tapes and optical disks and their
functions.
As we discussed earlier, data being worked on is stored in the computer memory. In the memory, values
are represented by sequences of binary digits, known as bits. Most computers use a group of eight bits,
Memory and Storage Systems 45
known as a byte, to represent a character. How does the computer know what any particular sequence of
bits represents? We can think of memory as a “bunch” of bytes or cells into which we can place data. Each
cell, known as a data item, is assigned a unique number known as address (which is like the index in an
array). The CPU can identify each cell by its address as shown in Fig. 3.2.
The byte is defined as the “smallest addressable unit” of memory. Most computers use groups of bytes,
usually 2 or 4, known as “words” to represent information.
Computer memories are often rated in terms of their capacity to store information. Typically, capacities
are described using the unit of byte as follows:
1 KB (Kilobyte) = 1,024 bytes
1 MB (Megabyte) = 1,048,576 bytes
1 GB (Gigabyte) = 1,073,741,824 bytes
1 TB (Terabyte) = 1,099,511,627,776 bytes
46 Fundamentals of Computers
Random Access Memory (RAM) is a volatile memory and loses all its data when the power is switched
off. It is the main memory of the computer system that stores the data temporarily and allows the data to be
accessed in any order. As compared to the secondary storage, the data can be accessed at a faster speed in
RAM because it is the internal memory of the computer. Figure 3.3 shows RAM with ICs.
In Fig. 3.6, b1 represents a bit line and Wx represents a word line. The DRAM can be divided into the
following types:
∑ Synchronous DRAM (SDRAM) SDRAM performs its operations in the synchronous mode, i.e.,
in association with the clock cycle of the processor bus. It consists of two internal memory banks
such that if the address lines are sent from the first bank, then the address can be read by using the
second bank. The internal banks are used because the row and the column address lines need to be
charged for reading an address. SDRAM provides a synchronous interface in which it waits for a clock
signal before responding to a control input. Generally, it is used with the processors for storing the
data in a continuous manner. The continuous form of data storage helps in processing more number of
instructions per unit time that increases the speed of data access.
∑ Rambus DRAM (RDRAM) RDRAM designed by Rambus Inc. works at a faster speed, as
compared to SDRRAM. It is compact in size and uses 16-bit address bus. It provides the facility to
transfer data at a maximum speed of 800 MHz. It contains multiple address and data lines that help in
increasing the speed of data access. These multiple address and data lines help in performing different
read and write operations simultaneously. It is not popular among the users because of its high cost and
low compatibility.
∑ Extended Data Out DRAM (EDODRAM) EDODRAM can access more than one bit of data at
one time which helps in achieving faster data access rates. It provides the facility to perform various
operations at one time such as reading, writing, etc. It starts accepting the next bit of data immediately
after getting the first bit of data for performing read or write operation.
∑ Fast Page Mode DRAM (FPMDRAM) FPMDRAM makes use of paging in which read or write
operation is performed by selecting the address of the data from the rows and the columns of a matrix.
Once the data is read, the address of the particular column is incremented, so that the user can read the
next part of the data. The use of paging concept in FPDRAM does not allow to work with the buses at
the memory speed more than 66 MHz. As a result, a lot of time is consumed in reading and writing the
data from the matrix.
Memory and Storage Systems 49
ROM is the memory that stores the data permanently, i.e., it can retain the data even when the power of
the computer system is switched off. The data can be easily read from this type of memory but cannot be
changed. ROM is most commonly used in devices such as calculators, laser printers, etc.
ROM does not allow the random access of data rather it allows sequential access of data. It is less
expensive as compared to RAM and other storage devices, such as magnetic disk, etc. ROM is divided into
four types, which are as follows:
∑ Programmable ROM (PROM)
∑ Erasable PROM (EPROM)
∑ Electrically Erasable PROM (EEPROM)
∑ Flash ROM
The memory cells of flash ROM are made up of floating-gate transistors. A Single-level Cell (SLC) can
store only one bit of data, whereas Multi-level Cell (MLC) provides the facility of storing more than one
byte. The two types of flash ROM memory are as follows:
∑ NAND flash In NAND flash or NAND gate flash memory, each cell behaves like a Metal Oxide
Semiconductor Field Effect Transistor (MOSFET), which has two gates for amplifying an electric
signal.
∑ NOR flash NOR gate flash or NOR flash memory provides the facility to write data or information,
with the help of tunnel injection. It can be defined as the process of inserting electrons to an electric
conductor using a layer of electric insulator. It also provides the facility to erase the instructions using
tunnel release.
Storage systems are the devices—such as hard disks, optical disks and magnetic disks—used for data
storage. The main objective of the storage system is to permanently store data—which can be of any type, such
as images, videos and text—for future use. The storage systems provide the facility to use the data at any time.
Different storage systems have varying storage capacities. For example, the normal storage capacity of
Compact Disk (CD) is 700 Megabytes (MB). The storage systems can be classified as shown in Fig. 3.7.
Magnetic storage systems can be defined as the storage systems that store the data on a magnetised medium,
with the help of magnetised particles. Magnetic tapes, magnetic disks, hard disks, floppy disks are examples
of magnetic storage systems. The magnetic storage systems are non-volatile and provide the facility to store
any type of data, such as text, audio, video, image, etc. In case of magnetic storage systems, data can be
accessed randomly as well as sequentially. For example, we can access data sequentially from a magnetic
Memory and Storage Systems 51
tape and randomly from a magnetic disk. When data is accessed sequentially, the access time is directly
proportional to the searching point. In other words, if the searching point is near, then the access time is
less, and if the searching point is far, then the access time is more. On the other hand, when data is accessed
randomly, the access time is less.
A magnetic tape usually consists of a tape of 1/2 or 1/4 inch wide, 600 to 3,000 feet long and is
wound on a spool in the form of a cartridge or a reel. A metal foil, called marker, is used to determine
the Beginning of Tape (BOT). When a write command is given, a block of data is written on the tape.
The next block is then written after a gap called Inter Block Gap (IBG). One block may contain one or
more records that are again separated by blank spaces known as Inter Record Gaps (IRG). A series of
blocks are written in this manner and the end-of-tape is described by the marker known as End of Tape
(EOT). After the data is written, the tape is rewound and kept ready for reading. The data is stored in
the form of tiny magnetised segments. A magnetised portion refers to the binary digit ‘1’ while the
non-magnetised portion refers to ‘0’.
Labelling can be done on a magnetic tape in order to retrieve any particular information when required.
Magnetic tape is easy to store and is less prone to damage as compared to the other storage devices, such as
hard disk, floppy disk, etc.
Generally 1/2 inch magnetic tape, consisting of either seven or nine tracks, is used for storing data.
These tracks are mainly decided by the read/write heads of the tape unit that helps in reading or writing the
data from or to the magnetic tape.
In magnetic tapes, the data is stored in the form of records and a set of different records is known as
file. The data of any size can be recorded on a magnetic tape but the length and the storage capacity of
the magnetic tape should be considered before storing the data. The speed of the magnetic tape should be
52 Fundamentals of Computers
predetermined for reading and writing data. When the magnetic tape moves at high speed, slows down or
stops, the data cannot be read or written to the tape.
Major advantages of magnetic tapes are:
∑ Low cost
∑ Large storage capacity
∑ Easily transportable
∑ Easy to handle and store
Major disadvantages of using magnetic tapes are:
∑ Low data transmission speed due to sequential access.
∑ Not suitable for random access.
∑ Require protected environment for storage.
∑ Updating, such as insertion or deletion is difficult.
∑ Fast wear-out.
Tracks are the concentric circles on the magnetic disk, having a common centre and containing a
block of recorded data. The thickness between two tracks affects the storage capacity of a magnetic disk.
If the thickness between the two tracks is less, then the magnetic disk can store a large amount of data. On
the other hand, if the thickness between the two tracks is more then less amount of data can be stored in the
Memory and Storage Systems 53
magnetic disk. The data is stored in a magnetic disk in the form of tiny dots on the tracks, which are known
as spots. The size of these spots should be small, in order to hold large amount of data and information.
The broken-up units of tracks are known as sectors. The data stored on the sectors is in the form of very
small unit, which can be read or written. The size of a sector in a magnetic disk is 512 bytes.
There are two popular types of magnetic disks:
∑ Hard disks
∑ Floppy disks
A hard disk, also known as a fixed disk, can hold a large volume of data and is used with large
computers. A floppy disk, a removable disk with relatively less storage capacity, is commonly used with
personal computers.
Major advantages of magnetic disks are:
∑ High storage capacity
∑ Easy, direct access to data
∑ Easily moveable from one place to another
∑ Better data transfer rate as compared to magnetic tapes
∑ Low cost compared to RAM
∑ Less prone to corruption of data as compared to tapes
The disadvantages of magnetic disks are:
∑ More expensive as compared to magnetic tapes.
∑ When used on-line, they are more susceptible to data corruption and data theft.
∑ Not ideally suitable, when the data files are to be read sequentially.
∑ Require dust-free environment.
The optical storage systems are used for the same purpose as the magnetic storage systems. However, like
magnetic storage systems, the optical storage systems do not employ the magnetism medium to read and
store data. The optical storage systems use the laser light as the optical medium to retrieve as well as record
data. The following are some of the examples of optical storage systems:
∑ Compact Disk—Read Only Memory (CD-ROM)
∑ Digital Video Disc (DVD)
∑ Compact Disc—Recordable (CD- R)
∑ Compact Disc—Rewritable (CD-WR)
∑ Digital Video Disc—Recordable (DVD-R)
∑ Digital Video Disc—Rewritable (DVD-WR)
Note: The DVD disks have much higher storage capacity than the CD disks.
Like other storage systems, the optical storage systems are non-volatile in nature. Also, the optical
storage systems are more reliable as compared to the magnetic storage systems because they are less prone
to mechanical damage. Unlike magnetic storage systems, which are fully read and write-capable storage
devices, the optical storage devices are either read-only or writable. Among the writable optical storage
devices, those devices that can be used for writing data multiple times are termed as rewritable optical
storage devices. Some examples of read-only optical storage devices are CD-ROM and DVD, while some
examples of writable optical storage devices are CD-R, CD-RW and DVD-R.
54 Fundamentals of Computers
The following are some of the significant properties of the optical storage devices:
∑ Storage capacity Storage capacity refers to the amount of data that can be stored in an optical
storage system. It is directly proportional to the spot size and the geometrical dimensions of disk.
∑ Data transfer rate Data transfer rate refers to the speed at which data can be read from the optical
storage system. It depends on the linear density and the rotational speed of the drive.
∑ Access time Access time defines the time taken to access the desired data from the optical storage
systems. It is directly proportional to the weight of head and the rotation speed of the disk.
Major advantages of optical disks are:
∑ Large storage capacity
∑ Longer life span as compared to magnetic disks
∑ Lost cost per bit of storage
∑ Easily portable and stored
The disadvantages of optical disks include:
∑ Low data access speed as compared to magnetic disks.
∑ Drive mechanism is more complicated compared to that of magnetic disks.
Magneto Optical (MO) storage systems include the features of both magnetic and optical disks. The main
objective of the MO system is to store the data used in personal computers for a long period of time. It
reads/writes data by making use of laser and optical technologies. It has a ferromagnetic material enclosed
in the plastic coating. The laser beam used for reading data gets reflected due to the magnetic surface of the
disk. The MO system is not popular among the users because its speed is slower and manufacturing cost is
higher than other storage devices. These optical storage systems are available in two standard forms:
∑ 3.5 inch form factor
∑ 5.5 inch form factor
The basic requirements of a material used for recording in MO system are as follows:
∑ It should have low thermal conductivity that provides the facility to limit lateral heating.
∑ It should have a smooth surface and domain boundaries to decrease the system’s noise.
∑ The coercivity of the material should be high at room temperature.
∑ The melting point of the material should be high enough to provide stability.
and amorphous metal. The anti-reflection layers are used to increase the light absorption. The quadrilayers
are used to decrease the reflection of light that provides the facility to decrease the requirement of laser
light. The amorphous metal is used as MO media. Figure 3.12 shows the design features of MO disks.
Solid-state Storage Devices (SSDs) were developed in 1978 by Storage Tek Company. In 1983, the Sharp-
5000 laptop computers developed by Sharp Corporation used SSD of 128 KB storage. In 1995, M-System
developed the SSD on flash based memory.
SSD can be defined as the device that contains all the properties of hard disk drives to store the data and
use solid-state memory, which has no moving parts. These devices do not use magnetic and optical medium
to store data. Rather, these devices use the semiconductor devices. The main objective of these devices is to
process the instructions electronically. SSDs have no mechanical parts due to which access time in case of
SSDs is less. This provides the facility of faster accessing of data as compared to any other storage devices.
The storage capacity of SSD is lower than that of the hard disk. The examples of SSD are flash memory
cards and Universal Serial Bus (USB) devices. These devices are widely used in laptops to store data. They
also prove to be of great use in the critical applications used in defence industry.
flash memory is non-volatile ,removable & portable ,slow write but fast read
memory
Memory and Storage Systems 57
to save data by copying all the data from the RAM to the backup storage, when the power is switched
off due to any reason. It also works as a buffer memory. Nowadays, in case of power problem,
lithium-iron batteries are being used as back-up.
Before selecting a memory device to store the data, we must evaluate critically the different characteristics
of storage systems. They primarily include:
∑ Access mode Access mode is used for accessing some specific data from the memory. The
different access modes include random access mode, sequential access mode and direct access mode.
In the random access mode, the data can be accessed randomly, i.e., without considering the location
of the required data. On the other hand, in the sequential access mode, the data and the information can
be accessed in a sequential manner, i.e., by specifying the location of the required data. In the direct
access mode, the data can be accessed by using both the random access mode and the sequential access
mode. Cassette player is an example of a device using sequential access mode because data is accessed
from it in a sequential manner only. On the other hand, CD player is an example of a device using
random access mode as well as direct access mode because data can be accessed from it randomly as
well as sequentially.
∑ Access time Access time refers to the time taken by the processor in completing the requests
made by the user for performing the read and write operations. The access time depends on the type of
storage device used and the access mode of the data. The access time of primary memory is faster than
that of the secondary memory.
∑ Storage capacity It refers to the storage space available in the computer system for holding the
data. In other words, storage capacity is defined as the size of the memory available for storing the data
in the system. The storage capacity is measured in terms of bytes and usually a large storage capacity is
desirable for storing the data. The storage capacity of the secondary memory devices is more than the
primary memory devices.
∑ Storage type It refers to the type of memory used to store the data. The storage type includes the
temporary and permanent memory. The temporary memory is also known as the volatile memory,
which is able to store the data only when the power or computer system is switched on. The permanent
memory is also known as the non-volatile memory, which is able to store the data, even when the
power or computer system is turned off.
∑ Cost It refers to the cost of the storage device used in the computer system for holding the data. It is
measured by determining the cost per bit of storage for a given storage capacity.
Chapter Summary
Computer systems use two types of memory, namely primary memory and secondary memory. Primary memory is
used to store data that is used by the CPU during processing. It consists of two types, RAM and ROM. RAM is a
volatile type of memory and stores data temporarily. On the other hand, ROM is a non-volatile memory and holds
data permanently.
Secondary memory includes magnetic disks, magnetic tapes and optical disks. Magnetic disks store data in
concentric circles known as tracks and these tracks are further divided into sectors. Magnetic tapes are used to store
data sequentially. Optical disks use an optical medium to store data and a laser diode to read data.
A hybrid version of magnetic and optical technologies known as magneto-optical disk is also available.
It employs a laser beam to read data and an electromagnetic head to write data. Storage systems developed using
solid-state technology have no mechanical moving parts, thus providing better data access speed.
Memory and Storage Systems 59
∑ Primary memory: It refers to the storage locations that are used to hold the programs and data temporarily in a
computer system. The primary memory is usually known as memory.
∑ Secondary memory: It refers to the storage locations that are used to hold the data and programs permanently.
The secondary memory of a computer system is popularly known as storage.
∑ Internal process memory: This type of memory is placed either inside or near the CPU. It is generally connected
to the CPU through special fast bus. Internal process memory usually includes the cache memory and the registers.
∑ RAM: It is a volatile memory in which data can be accessed in random fashion. Since it is a volatile memory, the
data and programs stored in it will be lost when the power is switched off.
∑ ROM: It is a non-volatile memory that is used to store data permanently.
∑ Byte: It is the smallest addressable unit of memory.
∑ Static RAM: It is a type of RAM in which data is stored till the power of the computer system is switched on.
Static RAM uses a number of transistors to store a single bit of digital information.
∑ Dynamic RAM: It is the RAM in which data is stored in a storage cell consisting of a transistor and a capacitor.
Unlike SRAM, the DRAM needs to be continuously refreshed with power supply because the capacitor has the
tendency to get discharged. DRAM retains the data for a very short span of time even after the power supply is
switched off.
∑ Programmable ROM: It is a memory chip on which the write operation of data can be performed only once.
∑ Erasable PROM: It is a type of ROM in which data can be erased or destroyed using ultraviolet light.
∑ Electrically Erasable PROM: It is a type of ROM in which data can be erased or destroyed by exposing it
to an electric charge. It has the ability to retain the data stored in it, even if the power of the computer system is
switched off.
∑ Flash ROM: It is a type of EEPROM that stores the information using floating-gate transistors.
∑ Magnetic storage systems: These are the storage systems that store the data on a magnetised medium with the
help of magnetised particles.
∑ Magnetic disk: It is a flat disk that is covered with magnetic coating for holding information.
∑ Magnetic tapes: These are the magnetic-coated plastic tapes, which are used for storing data and audio or
video files.
∑ Optical storage systems: It uses the laser light as the optical medium to retrieve as well as record data.
∑ Magneto Optical (MO) storage systems: These are the storage systems that include the features of both magnetic
and optical storage systems.
Review Questions
1. The data to be stored in the memory is assigned a unique number known as _________.
2. The permanent memory is also called _______ while temporary memory is called ________.
3. _________ and ________ belong to the primary memory of the computer system.
4. The ________ memory is kept near the CPU.
5. The data is stored in the memory by considering the _________ of the memory.
60 Fundamentals of Computers
9. In which memory, are the files and programs that are currently being used by a user, stored?
A. ROM B. RAM C. Cache D. Registers
10. Which of the following statement is not true about storage systems?
A. They are used to store data permanently.
B. They can store any type of data.
C. The data stored in these systems can be accessed at any time.
D. The data stored in these systems can be directly accessed by the CPU.
11. Which one of the following is not a type of magnetic storage system?
A. Magnetic tape B. Compact disk C. Hard disk D. Floppy disk
12. What does IBG stand for?
A. Inter bit gaps B. Intra byte gaps C. Intra block gaps D. Inter block gaps
13. Which of the following is a type of magnetic disk?
A. Hard disk B. Compact disk C. Digital video disk D. All the above
14. What is the medium used in optical storage systems for reading and recording data?
A. Ultraviolet light B. High-energy visible light
C. Laser light D. Black light
15. Which one of the following is not a type of optical disk?
A. Write-only optical disk B. Write once, read many optical disk
C. Read-only optical disk D. All of the above are optical disks
16. Which of the following temperature is used in MO systems as the recording medium?
A. Curie temperature B. Neel temperature
C. Room temperature D. Boiling point temperature
17. Which of the following is a solid-state memory?
A. Parallel serial bus B. Universal parallel bus C. Universal computer bus D. Universal serial bus
Discussion Questions
1. What do you understand by memory? List the two different categories of memory.
2. What is meant by internal processor memory? What is the advantage of having an internal process memory in a
computer system?
3. What is a RAM and why it is called so?
4. What is the difference between volatile and non-volatile memory? Is RAM a volatile or non-volatile memory?
5. What is the difference between primary memory and secondary memory of a computer system? List two
examples of secondary memory.
6. Differentiate between a bit, a byte and a word.
7. Describe the way of storing information in the memory of a computer system, with the help of a diagram.
8. What is the difference between static RAM and dynamic RAM? List different types of static and dynamic RAM.
9. Explain the concept of ROM by listing a few applications in which it is employed.
10. List different types of ROM with their key features.
11. What is meant by storage systems? What is the advantage of having storage systems in a computer system?
and audio. We can provide the input to a computer in two ways, either manually through devices such as
keyboard and mouse, or directly from documents using devices such as scanners. Depending upon the type
or method of input, the input device may belong to one of the following categories:
∑ Keyboard
∑ Pointing devices
∑ Scanning devices
∑ Optical recognition devices
∑ Digital camera
∑ Voice recognition devices
∑ Media input devices
We shall discuss in this chapter briefly the operation and applications of these devices.
4.2 KEYBOARD
Keyboard is the most commonly used input device. We can use a keyboard to type data and text and execute
commands. A standard keyboard, as shown in Fig. 4.1, consists of the following groups of keys:
∑ Alphanumeric keys The alphanumeric keys include the number keys and alphabet keys. These
keys are arranged in the same style as in the normal typewriters, popularly known as QWERTY layout.
∑ Function keys The function keys are arranged in a row on the top of the keyboard. These keys help
perform specific tasks, such as searching a file or refreshing a web page.
∑ Central keys The central keys are used for controlling the movement of cursor and screen display.
These include arrow keys (for moving the cursor) and modifier keys such as SHIFT, ALT and CTRL
(for modifying the input).
∑ Numeric keypad The numeric keypad is located on the right side of the keyboard. This looks like
a calculator’s keypad with its 10 digits and mathematical operators.
∑ Special purpose keys The special purpose keys help perform a certain kind of operation, like
exiting a program or deleting some characters in a document. The various special purpose keys in a
keyboard are Escape, Insert, Delete, Print Screen, Pause, Tab, Spacebar, etc.
A standard keyboard would include about 100 keys. However, many manufacturers add special buttons
to perform some special tasks.
Keyboards are attached to the computer system with the help of a cable. Each key of the keyboard, when
pressed, sends a different signal to the processor. However, today wireless keyboards are also available that
work with the help of batteries. We can also classify the keyboards on the basis of additional keys present
in them. For example, multimedia keyboard and gaming keyboard are the keyboards, which are classified
on the basis of the additional keys present in them.
Pointing devices are the input devices that are generally used for moving the cursor to a particular location
to point an object on the screen. With the help of pointing devices, we can easily select the icons, menus,
windows, etc on the Graphical User Interface (GUI). Thus, the users can easily interact with a computer
system by means of a pointing device. We can simply change the position of the objects displayed on the
screen by first pointing at the object and then dragging it to the desired position. Some of the commonly
used pointing devices are:
∑ Mouse
∑ Trackball
∑ Light pen
∑ Joystick
∑ Touchscreen
4.3.1 Mouse
Mouse is a small hand-held pointing device that basically controls the two-dimensional movement of
the cursor on the displayed screen. It is an important part of the Graphical User Interface (GUI) based
Operating Systems (OS) as it helps in selecting a portion of the screen and copying and pasting the text.
The mouse, on moving, also moves the pointer appearing on the display device. The most commonly used
types of mouse are as follows:
∑ Mechanical mouse A mechanical mouse consists of three buttons: left button, right button and
scroll button. Inside the plastic coating of the mouse, there is a ball, which is rolled over a flat surface
corresponding to which the cursor moves on the display screen. The left button on the mouse is the
most frequently used button as it helps in selecting the icons, folders and text on the display screen.
The right button on the mouse helps in displaying the short cut menu, whereas the scroll button helps
in moving the cursor up and down on the screen by scrolling it. Figure 4.2 shows the upper and the
lower portion of the mechanical mouse.
4.3.2 Trackball
Trackball is a pointing device that basically consists of a socket
containing the ball, which can be rolled manually to move the cursor
on the screen. The socket also contains sensors, which detect the
movement of the ball. With the help of the trackball, we can change
the position of the cursor on the screen by simply rotating the ball
with our fingers or thumb. On the basis of size, the trackballs are
classified into two types, small trackball and large trackball. The
small trackballs are commonly used in portable computers, whereas Fig. 4.4 The trackball on the desk
the large trackballs find their use in the desktop computer systems,
which are used for computer-aided designing. One of the most important advantages of the trackball is that
it can be placed on different surfaces, such as desk, mouse pad and even user’s hand. The trackball finds its
use as a game controller in games like Centipede, Golden Tee and Marble Madness. Figure 4.4 shows the
trackball placed on a desk.
4.3.4 Joystick
Joystick is a pointing device that usually consists of one or more
buttons and a stick, which controls the movement of the cursor
on the screen by pointing in all directions. It continues to point
in a particular direction until and unless it is brought back to the
vertical position. The trigger button, which is used to trigger some
kind of action like firing in game sequence, is made available
on a joystick. The joystick facilitates three types of control:
glide, direct and digital. The glide and the direct control allow
the movement of the joystick in all possible directions, i.e., left,
right, up and bottom. On the other hand, the digital control helps
in the movement of the joystick in limited directions. Earlier,
the joysticks could provide only 2D movements, but now, the
joysticks are capable of providing 3D movements as well. The
joystick is generally used in computer games, CAD systems,
industrial applications, etc. Figure 4.6 shows a joystick.
Fig. 4.6 Joystick
4.3.5 Touchscreen
Touchscreen is a pointing device that enables us to enter data such
as text, pictures and images by directly touching the screen. The
touchscreen is the display monitor with which the user can directly
interact with the computer system by touching the screen. These
devices do not make use of the keyboard and the mouse for inputting
the data in the computer system. The touchscreen is used in a variety
of applications, such as cell phones, ATM’s, PDA’s and games.
Figure 4.7 shows a touchscreen.
There are different types of touchscreen technologies used today.
They include:
Fig. 4.7 Touchscreen
∑ Surface wave technology This technology generally makes
use of ultrasonic waves, which are absorbed when they are passed through the touchscreen panel.
These waves are generally absorbed, when a user touches a point on the touchscreen pad. Then, these
absorbed waves are sent to the controller for further processing. This is greatly affected by elements
such as dust and water.
∑ Capacitive technology This technology makes use of indium tin oxide material, which is coated
on the touchscreen for providing continuous electric charge. In this, the touchscreen is provided with
circuits at each corner. When the user touches the screen, a small amount of charge is absorbed at
this point. This charge is then transferred by the circuits to the controller for further processing. The
touchscreens based on capacitive technology do not get damaged by elements such as dust or liquids.
∑ Resistive technology In this technology, the touchscreen panel generally consists of different
layers, which are coated with very thin electrically conductive metal and separated by some space.
When the user touches the panel at any point, the change in the electric current occurs that is passed
to the controller for further processing. The touchscreens based on resistive technology do not get
damaged by elements like dust or water.
68 Fundamentals of Computers
Scanning devices are the input devices that can electronically capture text and images, and convert them
into computer readable form. The basic task of a scanning device is to convert an image or the textual
data into digital data, i.e., in the form of boxes, where each box represents either zero or one. The resultant
matrix is known as bit map and is displayed on the screen. The scanning devices can be differentiated from
each other on the basis of the following characteristics:
∑ Resolution Resolution is the closeness of the pixels in the bit map. The resolution of scanning
devices can vary from 72 to 600 dots per inch (dpi), depending on the bit depth. Bit depth represents
the number of bits used to represent each pixel of an image or a text.
∑ Size Some scanning devices are very small in size, whereas others are very big. The small sized
scanning device can scan approximately two to five inches of the document, whereas the large sized
scanning device can scan approximately up to forty inches of the document. Therefore, it follows that
the small scanning devices are appropriate for scanning small documents, whereas the large scanning
devices are appropriate for scanning large documents.
∑ Scanning technology Some scanning devices use Charged Coupled Device (CCD) arrays,
whereas others use Photo Multiplier Tubes (PMT) technology. The CCD consists of a series of light
receptors, which are sensitive to the variation in the light frequency. As the frequency of light changes,
these scanning devices detect the change and the output obtained after scanning also gets accordingly
changed. The PMT consists of a photocathode, which is a photosensitive surface used for generating
the electrons. PMT is used for identifying the light emitted by the weak signals.
On the basis of these characteristics, the scanning devices can be categorised as follows:
∑ Hand-held scanners
∑ Flat-bed scanners
∑ Drum scanners
∑ Slide scanners
to capture the code. These devices are comparatively more complex, heavier and costlier than the contact
scanning device.
Optical recognition devices are used for recognising the characters optically. The optical recognition devices
basically make use of optical scanner for inputting data. Unlike keyboards, the optical recognition devices
do not enter the data by pressing the keys. Therefore, these devices help the user in saving a lot of time as
entering data through a keyboard is a time consuming task. The following are some of the commonly used
optical recognition devices:
∑ OCR devices
∑ OMR devices
∑ MICR devices
∑ Bar code reader
Figure 4.12 illustrates the basic function of an OCR system. The paper document is fed into the optical
scanner for scanning. The optical scanner typically scans the text and converts it into machine readable
form using the OCR software. The document displayed on the user’s computer is in the editable format.
The OCR devices basically make use of photoelectric cells for recording the patterns of the light reflected
by the printed text. These patterns are recognised for the identification of the characters represented by
them. The software program also recognises the character images and converts them into character code
data, if any color change exists in the image. The OCR devices are popularly used in telebanking and in the
processing of credit cards.
readable form and can be recognised, even if the cheque has become trampled or dirty. If a copy of the
cheque is made with the help of coloured photocopy scanning machine, then the characters written with the
magnetic ink will simply not respond. This provides an extra level of security in the banks for the protection
of the cheques from illegal copying.
Figure 4.14 illustrates the basic functioning of an MICR device. The bank cheque containing the
magnetic characters is fed into the MICR scanner for processing. The MICR scanner consists of MICR
toner, which produces magnetic charge for reading the MICR line. The MICR scanner scans the cheques at
a faster speed, and thus helps in saving a considerable amount of time while processing the cheques.
A digital camera is a handheld electronic device that is used to capture the image of an object electronically.
The digital camera consists of a built-in computer, which helps in recording the images electronically.
Whenever a user initiates the process of capturing an image by pressing the button available on the camera,
Input Devices 73
the image light enters the camera through the lens. This light gets stored on a microchip consisting of an
array of light sensitive sensors. The light sensitive sensors are the charge-coupled devices (CCD) that
consist of a number of light sensitive diodes known as photosites. These diodes convert light into electric
charges called electrons. These charges are in the analog form but are later converted into the digital form
using the analog to digital converter. The following are the main features of the digital camera:
∑ It is capable of capturing and storing thousands of images on a single memory chip.
∑ It is capable of editing as well as deleting the images.
∑ It is capable of recording the video clip with sound.
∑ It is capable of showing the just recorded video clip on the camera screen.
Figure 4.16 shows the front and the rear view of a digital camera.
The digital cameras can be classified into the following types:
∑ Video cameras Video cameras
are the digital cameras that capture an
image by converting it into horizontal
lines and then scanning each line from
top to bottom. The two main types of
video cameras include professional
video cameras and camcorders. The
professional video cameras are used
for recording the moving images and
are mostly used in film studios. On
the other hand, the camcorders are not
only used for capturing images but
Fig. 4.16 The front and the rear view of the digital camera
also help in recording audio. These
video cameras consist of a Liquid Crystal Display (LCD) for displaying the captured picture and the
built-in recorder for recording audio.
∑ Compact digital cameras Compact digital cameras are very small in size, and hence can
easily be carried by a person. These cameras do not contain advanced features for capturing an
image. Therefore, the quality of the picture produced by the compact digital cameras is not as good
as the pictures produced by the other cameras. The images are stored in these cameras in the Joint
Photographic Experts Group (JPEG) format.
∑ Digital single-lens reflex cameras Digital single-lens reflex cameras consist of a mirror
and a pentaprism that are used for capturing the image digitally. The light entering through the lens
is reflected by the mirror attached with the lens. It then passes through the pentaprism to reach the
eyepiece of the camera. These cameras have live preview feature, which helps in previewing the
captured image before taking the final photograph.
∑ Line-scan camera Line-scan camera consists of an array of image sensors. These cameras capture
the image in the form of lines and then scan the image line by line. These cameras capture the images
very quickly and their image resolution is also very high.
The image captured by a digital camera is in the digital format and can be easily downloaded on
a computer system. By using a digital camera, the photographs can be developed in a considerably less
amount of time and that too, at a very low price. The quality of the pictures captured by a digital camera
depends on the resolution factor. The more the resolution of a digital camera, the better is the image quality.
74 Fundamentals of Computers
The voice recognition devices generally record the voice of a person and transform it into electrical signals.
The electrical signals are then converted into the machine readable code. The voice recognition system only
recognises the voice of the speaking person rather than what he speaks. The following are the two methods,
which are used to identify the voice with the help of voice recognition system:
∑ Template matching This method of voice recognition is speaker dependent, i.e., this method
matches the words spoken by the users to the predefined templates. In this method of voice recognition,
a phrase or a word is spoken by the user into the microphone. This phrase or word is then converted
into the machine readable code by the analog to digital converter (A/D converter). The output of the
A/D converter is compared with the voice templates, which are the digitised entries stored in the
database. This comparison is performed by the voice recognition software. The biggest limitation of
this system is the availability of limited vocabulary that consists of only the words, which have been
used in the training sessions.
∑ Feature analysis This method of voice recognition is speaker independent as it does not match
the speaker’s voice with the predefined templates, rather just processes the voice input by means of
fourier analysis. It is the process of changing the frequency of the voice input. The output of the fourier
analysis is matched with the stored voice input template for finding the featuristic similarities between
the two. The major limitation of the feature analysis method is that it fails to match the accents,
volume, pitch and inflection of different users.
The voice recognition devices are used for various purposes such as dictation, training air-traffic
controllers, etc. These systems allow users to communicate with computers directly without using a
keyboard or mouse. They are ideal for people who are visually impaired.
Sensors are the devices that are used for detecting and measuring the physical quantities, such as heat
and temperature and converting them into electrical signals. The sensors are most commonly used in data
acquisition systems. The data acquisition system collects the electrical signals from various devices and
converts them into the digital signals for further assessment.
The data acquisition sensor is one of the most important components of the data acquisition system as
it helps in detecting the electrical properties of different signals such as resistance. The data acquisition
system simply accepts these signals and converts them into the digital format. The computer system, which
is used for communicating with the data acquisition system, helps in gathering the signals. As per the
requirements of the users, the data acquisition system can be constructed as a simple or a complex system.
The data acquisition system is generally portable, battery operated and easy to use.
The input devices, which are generally used in media for communicating with the mass audiences, are
known as media input devices. The following are the most popularly used media input devices:
∑ Microphone It is an input device that basically converts the sound waves into electrical signals
with the help of sensors. The sound wave pattern is converted into the electrical pattern, which is either
Input Devices 75
Chapter Summary
Input devices are the hardware devices that help in inputting the data from any outside source into the computer
system. There are various input devices, with the help of which a user can enter different types of data into the
computer system. Keyboard is one of the most widely used input devices for providing alphanumeric information
to the computer. A user simply presses these buttons for entering the data into the computer system. The user can
also input data into a computer system with the help of pointing devices such as mouse, trackball, light pen joystick
and touchscreen. The user can easily select the objects, menus and icons available on the screen using a pointing
device. These devices basically control the movement of the pointer on the screen. Apart from the pointing devices,
different scanning devices are also available, which are used for capturing the text and the images and converting
them into the graphical image. A variety of scanning devices are available for scanning the documents, such as
hand-held scanners, flatbed scanners, drum scanners and slide scanners.
Optical recognition devices are used for recognising the characters optically. These devices make use of optical
scanner for scanning documents and images. OCR device, OMR device, MICR device and bar code reader are the
various types of optical recognition devices. Voice recognition devices are used for recognising the voice of the
user. These devices generally record the voice of a person and transform it into electrical signals. Devices—such as
microphone, webcam and graphics tablet—generally used in media are known as media input devices. Apart from
these commonly used input devices, there are certain advanced devices—such as data acquisition sensors—that are
used for inputting the data.
∑ Input device: It is an electromechanical device that is generally used for entering information into a computer
system.
∑ Keyboard: It is a computer input device consisting of keys or buttons arranged in the similar fashion as they are
arranged in a typewriter.
∑ Pointing devices: These are the input devices used for moving the cursor to a particular location to point an object
on the screen.
∑ Mouse: It is a pointing device that basically controls the two-dimensional movement of the cursor on the displayed
screen.
∑ Trackball: It is a pointing device consisting of a socket containing the ball that can be rolled manually to move the
cursor on the screen.
∑ Light pen: It is a pointing device containing the light-sensitive element, which is used for selecting the objects
displayed on the screen.
∑ Joystick: It is a pointing device that consists of one or more buttons and a stick that controls the movement of the
cursor on the screen.
∑ Touchscreen: It is a pointing device that enables the users to enter data such as text, pictures and images by
directly touching the screen.
∑ Scanning devices: These are the input devices that electronically capture text and images and convert them into
computer readable form.
∑ Hand-held scanner: It is a scanning device used for digitising the images into bit map.
∑ Flatbed scanner: It is a scanning device that consists of a flat surface composing of glass pane on which the
documents are kept for scanning.
Input Devices 77
∑ Drun scanner: It is a scanning device consisting of a large drum that is used for scanning the documents.
∑ Slide scanner: It is a scanning device used for scanning slides as well as film negatives.
∑ OCR devices: These devices scan a document by recognising its individual characters optically and converting it
into the editable form.
∑ OMR devices: These are input devices are used for electronically recognising the characters written in the marked
fields only.
∑ MICR devices: These are input devices used for recognising the characters written with the help of magnetic ink.
∑ Bar code reader: It is a scanning device used to read bar codes labelled on different items.
∑ Digital camera: It is a handheld electronic device that is capable of capturing videos as well as graphical images
electronically.
∑ Video cameras: These are the digital cameras that capture an image by converting it into horizontal lines and then
scanning each line from top to bottom.
∑ Compact digital cameras: These are the small-sized digital cameras that lack some of the advanced image
capturing features.
∑ Digital single-lens reflex cameras: These cameras consist of a mirror and a pentaprism used for capturing the
image digitally.
∑ Light-scan cameras: These cameras consist of an array of image sensors and are used to capture an image in the
form of lines. After capturing an image, it scans the image line by line.
∑ Voice recognition system: It is a system that recognises the voice of an individual and converts it into the machine
readable code.
∑ Data acquisition sensors: These are the devices used for detecting and measuring the different physical quantities
and converting them into electrical signals.
∑ Media input devices: These are the input devices used in media for communicating with the mass audiences.
∑ Microphone: It is a media input device that converts the sound waves into the electrical signals with the help of
sensors.
∑ Webcam: It is a media input device that is attached with the computer for recording videos as well as images.
∑ Graphics tablet: It is a media input device that helps a user to enter pictorial information into the computer
system.
Review Questions
8. In case of trackball, ___________ is used for effecting the movement of the cursor on the screen.
9. ____________ device consists of a light- sensitive diode, which is used for pointing the objects on the screen.
10. The ___________, ____________ and ____________ are the different types of controls provided by joystick.
11. __________ devices are used for inputting data into a computer system with the help of human touch.
12. _____________devices are used for converting the images into machine-readable form.
13. Hand-held scanners are also called ______________.
14. ________________ scanners use red, green and blue filters.
15. Drum scanners make use of ________________ technology for scanning a particular document.
16. Slide scanners also known as _________scanners.
17. The OCR devices make use of_____________ for recognising the characters on the document.
18. _______________ devices are used for recognising the characters written only in the marked fields.
19. A MICR device basically recognises the numerals written with the ____________ ink.
20. ______________ is the computer readable code representing the vertical lines of different widths.
21. ___________ is the hand-held device used for capturing images and videos.
22. The methods used for recognising the voice of the users are ___________ and _____________.
23. ________________helps in detecting the electrical properties of different signals.
24. _____________ input device is used for converting the sound waves into the electrical waves.
25. Graphics tablet is the combination of ____________ and _________________.
Discussion Questions
1. What is meant by an input device? What is the importance of an input device in a computer system?
2. List different categories of input devices.
3. Explain all the categories of keys found on a typical keyboard with the help of a diagram.
4. What are pointing devices? List different types of pointing devices.
5. Explain the basic functioning of mechanical and optical mouses with the help of sketches.
6. How does light pen help in inputting data into a computer system?
C HA PTE R 5
OUTPUT DEVICES
While the printers and plotters provide the physical form of output known as hard copy, the display
monitors, voice output systems and projectors provide temporary output known as soft copy. Unlike hard
copy, soft copy is not a permanent form of output.
In this chapter, the principle of operation and application of some of the popular output devices will be
discussed briefly.
Display monitors are the most commonly used soft copy output devices. Earlier the display monitors were
capable of displaying the characters only in a single font and in a single colour. These characters were
arranged in a rectangular grid on the screen. The display screens, which are available today, support many
fonts and colours. Different types of display monitors use different technology for displaying the data. On
the basis of technology used display monitors may be classified into three categories:
1. Cathode Ray Tube Monitor
2. Liquid Crystal Display Monitor
3. Thin Film Transistor Monitor
A CRT monitor has many advantages, such as a high contrast ratio and colour depth because of which
many graphic designers prefer this type of display monitors. It also provides a change in the resolution
without affecting the clarity of the picture. Though CRT monitor has many advantages, there are some
Output Devices 83
disadvantages associated with it. It is very bulky and occupies a lot of space on the desk. It also consumes a
lot of power and produces a large amount of heat.
5.3 PRINTERS
Printers are the most widely used output devices in real life applications. A printer is a computer hardware
that generates the hard copy of the information processed by a computer system. The hard copy produced
by the printer can be in the form of a paper or any other physical printing medium. To produce a hard copy,
first the printer is connected to a computer with the help of a cable and then the print command is given by
the user through the user interface of the computer. The output on the hard copy produced by a printer can
be preserved for a long time as compared to the output displayed on the display monitors. Based on the
features, such as colour, resolution, memory and speed possessed by the printers, they are classified into
many types. Some printers have a very high printing speed, whereas others have a slow printing speed.
Moreover, all computers cannot produce multicoloured printouts. Some of them produce single colour
printouts only. On the basis of their working principles printers can be classified into two major categories,
namely impact and non-impact printers.
Impact printers are those printers in which there exists a mechanical contact between print head and paper.
Print head is the part of the printer that resembles a hammer and is responsible for transferring the ink to the
paper in the form of required characters. Impact printer contains an individual print head for each character.
The print head of a character strikes the ink ribbon, and the ink ribbon in turn strikes the paper, leaving an impression
of that particular character on the paper. Some of the most popular impact printers are as follows:
• Dot matrix printers
• Daisy wheel printers
• Drum printers
5.4.1 Dot Matrix Printer
A dot matrix printer is an impact printer in which a character is printed on the paper by the back and forth
movement of a print head against the ribbon drenched in ink. In dot matrix printer, the characters are
formed out of a matrix containing dots as shown Fig. 5.4. Each dot is produced with the help of a metal pin
brought forward by a small electromagnet. A small plate guides the pins to the ribbon and the pins strike the
ribbon to form an impression of a dot on the paper.
Dot matrix printer is capable of printing a complete line of characters at a time. It is very durable as it
does not wear out quickly; however, the circular channels on the guide plate get damaged due to frequent
striking of pins. This damage in the shape
of circular channels makes the guide plate
less accurate because of which the printed
characters become hazy.
The dot matrix printers are also capable of
producing carbon copies. They ensure reliable
printing and are best suitable for the fields
where the content of the printed data is more
important than the quality of printing. There is
no need of providing individual single sheets
to these printers again and again as they take
continuous papers. Figure 5.5 shows a dot Fig. 5.4 Matrix characters
matrix printer.
Output Devices 85
Non-impact printers are the printers in which there exists no mechanical contact between the print head and
paper. These printers spray ink on the paper with the help of a nozzle. Non-impact printers do not produce
much noise and are fast as compared to impact printers. The reason for the production of less noise is the
absence of mechanical moving parts in the printer. The most popular non-impact printers are:
1. Ink-jet printers
2. Laser printers
5.6 PLOTTERS
Plotter is a device used to print high quality graphics and images. It uses one or more pens to produce a
high quality drawing. These pens change their positions and draw continuous lines to produce an image.
The plotters were used as a substitute to the coloured printers when the printers were very expensive and
were also not capable of drawing bigger images such as graphs. The plotters provided cheap and efficient
drawing but required a separate pen for each colour. This affected the speed of plotters but later the plotters
started using four basic colours only, i.e., cyan, magenta, yellow and black. These are the primary colours,
which combine in different ratios to form other different colours. So, now the speed of plotters increased as
there was no need of changing the pens frequently. The plotters are further divided into the following four
categories on the basis of their working:
• Drum plotters
• Flat-bed plotters
• Ink-jet plotters
• Electrostatic plotters
Voice output systems are also known as voice response systems. These systems record the simple messages
in human speech form and then combine all these simple messages to form a single message. The voice
response system is of two types—one uses a reproduction of human voice and other sounds, and the other
uses speech synthesis.
The voice response system, which uses a reproduction of human voice takes the sound input in the
analog form and converts it into the digital form. It stores the converted data permanently on some storage
device. The digital sound produced as an output may be in the form of words, phrases or music. The digital
sound stored at the storage device is then sent to the speakers through which the output is made audible to
the users.
The voice response system, which uses speech synthesis, takes the sound input in analog form and
converts it into speech form. Besides sound expansion card and speech synthesiser, the written text to be
converted into the form of a speech requires special software. The speech synthesiser is a device used for
the conversion of written text into speech. The speech synthesiser combines approximately 50 to 60 basic
sounds to produce a single word. The different words formed by the combination of basic sounds then
combine to form a speech. The quality of the speech produced as an output depends on its resemblance to
the human voice and also on the ease with which a user can understand it.
The basic application of a voice output system is in Interactive Voice Response (IVR) systems, which are
used by the customer care or customer support departments of an organisation, such as telecommunication
companies, etc.
Output Devices 89
5.8 PROJECTORS
5.9 TERMINALS
A terminal is a combination of an input device and an output device that helps a computer in receiving as
well as transmitting data. The classification of computer terminals is done on the basis of the data handled
by them. A keyboard and a display monitor are respectively the input and the output devices, which are
paired together to form a common terminal. The display monitor used in the terminal can be of any of the
three types—a CRT, an LCD or a TFT. The terminals are broadly classified into three categories:
• Intelligent terminals
• Smart terminals
• Dumb terminals
An intelligent terminal is a terminal that possesses all the processing power, i.e., the logic required to
perform the operations, such as calculations and formatting. It does not require any processor but instead
performs all the tasks by itself. A smart terminal is a terminal that contains some logic. It requires the help
of a processor to perform complex operations such as performing calculations but is capable of performing
simple operations such as making the displayed data appear bold. A dumb terminal is a terminal that does
not contain any logic at all. It only displays the data received from the processor. It has the slowest speed as
compared to the other two terminals.
90 Fundamentals of Computers
Chapter Summary
An output device is the device that is used to pass on the processed data to the end users. The output produced can
be in the form of a soft copy or a hard copy. To display a soft copy of the text or graphical output, a display monitor
is required. The display monitor is of three types: CRT, LCD and TFT. These monitors differ in their appearance
as well as their working. The other commonly used output devices are printers and plotters. Printers are used to
produce a hard copy of text and image format output.
On the basis of their mechanism, printers are divided into two types, impact printers and non-impact printers.
In impact printers, print head has a mechanical contact between print head and paper, whereas in non-impact
printers, there’s no mechanical contact between print head and paper. The printers are capable of producing efficient
print-outs of text but they cannot produce very clear printouts of images. For image printing, another output device
called plotter is used. It is again divided into four categories: drum plotter, flat-bed plotter, ink-jet plotter and
electrostatic plotter.
Apart from text format, an output can also have an audio format. The audio format output requires speakers
and voice output systems so that it can be communicated to the users. The voice output system includes speech
synthesisers, which concatenate small sounds to produce a word of a speech.
Another example of output devices is the projector. Projectors allow the users to view the output on a big
screen. Projectors vary on the basis of their sizes such as portable projectors, conference room projectors and fixed
installation projectors.
∑ Monitor: Monitor is the most commonly used output device, which displays the soft copy output of text and
graphics to the users.
∑ CRT monitors: CRT monitors use a Cathode Ray Tube (CRT), including an electron beam and a phosphor coated
screen for producing an image on the screen.
∑ LCD monitors: LCD monitors use liquid crystals, which are activated by electric field to display the images of
high resolution.
∑ Printers: Printers are the output devices that are used to produce a hard copy output of the text or the documents
stored in a computer.
∑ Impact printers: Impact printers are the printers in which a mechanical contact exists between print head and
paper. The impression of characters is developed on the paper with the help of striking the ink ribbon by the print
head.
∑ Non-impact printers: Non-impact printers are the printers in which mechanical contact does not exist between
print head and paper and ink is sprayed on the paper with the help of a nozzle to form an impression of the
character.
∑ Plotters. Plotters are the output devices attached with computer to plot high quality graphs or images.
∑ Drum plotter: Drum plotter is the plotter that consists of a paper mounted on a drum and pens to plot the graph.
Both pens and paper on the drum are moved to produce images.
∑ Flat-bed plotter: Flat-bed plotter consists of a plain surface known as bed on which the paper is fixed and only the
pens are moved to produce an image or a graph.
∑ Speakers: Speakers are the output devices used to generate output in an audio format from the computer.
∑ Projectors: Projectors are the output devices that are used to project big picture of the data stored on some storage
device such as CD and DVD on a white screen.
Output Devices 91
∑ Terminal: A terminal is a collection of an input device and an output device that helps a computer in receiving as
well as transmitting data.
∑ Intelligent terminal: The terminal, which possesses all processing power, i.e., the logic required to perform
operations such as calculations and formatting, is known as intelligent terminal.
∑ Smart terminal: The terminal, which possesses small processing power, is known as smart terminal. It requires
the help of a processor to perform certain operations.
∑ Dumb terminal. The terminal, which possesses no processing power, is known as dumb terminal. It does not
perform any operation by itself.
Review Questions
1. ___________ devices are the devices, which help in communicating the processed data to the users.
2. ___________ is one of the most essential and commonly used output devices.
3. ___________, ___________ and __________ are the three main types of display monitors.
4. The screen in display monitors consists of a number of small dots like structures known as ___________.
5. ___________ printers do not have a mechanical contact between print head and paper.
6. ___________ printers contain an ink ribbon, which is hit by a print head to form an impression of a character on
the paper.
7. CRT is an abbreviation for ________ ________ _________.
8. ________ monitor consists of liquid molecules.
9. _________ printers are best suitable for the fields where the content of the printed data is more important than
the quality of printing.
10. __ _______ produce a high quality drawing as compared to printers.
11. _________ are used to generate a sound format output.
12. _________ helps the users to project a big picture of the generated output.
13. _________ terminals contain a built-in logic, which is capable of processing the data.
14. _________ terminals are not capable of processing the output.
15. ________ are the most expensive projectors.
16. The portable projectors are also known as _________ projectors.
17. ________ records the simple messages in human speech form and then combines them to form a single message.
18. In _________ plotters, both pen and paper are moved in opposite directions to plot a graph or an image.
19. ________ printers use a laser beam to produce an image on paper.
20. A daisy wheel printer is the impact printer that produces _________ type printouts.
21. A _______ monitor uses thin film transistor technology to improve the quality of image.
22. The power consumption by an LCD monitor is _________ as compared to a CRT monitor.
23. The quality of image of a _________ monitor is better than the LCD monitor.
24. Special purpose printers are primarily used by _________ .
Important printer characteristics include resolution (in dots per inch), speed (in sheets of paper
printed per minute), colour (full-colour or black-and-white), and cache memory (which affects the
speed at which a file can be printed).
92 Fundamentals of Computers
according to their requirements to communicate with the computer system. Therefore, before understanding
the various computer codes, we need to understand the concept of number systems. All the number systems
used by computer professionals to interact with computer systems come under the category of positional
number system. The positional number system is a number system in which numbers are represented using
some symbols called digits and the values of these numbers can be determined by taking the position of
digits into consideration. The different number systems, which come under the category of positional
number system, are as follows:
∑ Decimal system
∑ Binary system
∑ Hexadecimal system
∑ Octal system
The decimal system is the most common number system used by human beings. It is a positional number
system that uses 10 as a base to represent different values. Therefore, this number system is also known as
base10 number system. In this system, 10 symbols are available for representing the values. These symbols
include the digits from 0 to 9. The common operations performed in the decimal system are addition (+),
subtraction (–), multiplication (×) and division (/).
The decimal system can be used to represent both the integer as well as floating point values. The
floating point values are generally represented in this system by using a period called decimal point. The
decimal point is used to separate the integer part and the fraction part of the given floating point number.
However, there is no need to use a decimal point for representing integer values. The value of any number
represented in the decimal system can be determined by first multiplying the weight associated with each
digit in the given number with the digit itself and then adding all these values produced as a result of
multiplication operation. The weight associated with any digit depends upon the position of the digit itself
in the given number. The most common method to determine the weight of any digit in any number system
is to raise the base of the number system to a power that initially starts with a 0 and then increases by 1 as
we move from right to left in the given number. To understand this concept, let us consider the following
floating point number represented in the decimal system:
In the above example, the value 6543, which comes before the decimal point, is called integer value
and the value 124, which comes after the decimal point, is called fraction value. Table 6.1 lists the weights
associated with each digit in the given decimal number.
Table 6.1 Place values in decimal system
Digit 6 5 4 3 . 1 2 4
Weight 103 102 101 100 10-1 10-2 10-3
The above table shows that the powers to the base increases by 1 towards the left for the integer part
and decreases by 1 towards the right for the fraction part. Using the place values, the floating point number
6543.124 in decimal system can be computed as:
96 Fundamentals of Computers
Among all the positional number systems, the binary system is the most dominant number system that is
employed by almost all the modern digital computer systems. The binary system uses base 2 to represent
different values. Therefore, the binary system is also known as base-2 system. As this system uses base 2,
only two symbols are available for representing the different values in this system. These symbols are 0 and
1, which are also known as bits in computer terminology. Using binary system, the computer systems can
store and process each type of data in terms of 0s and 1s only.
The following are some of the technical terms used in binary system:
∑ Bit. It is the smallest unit of information used in a computer system. It can either have the value 0 or
1. Derived from the words Binary digIT.
∑ Nibble. It is a combination of 4 bits.
∑ Byte. It is a combination of 8 bits. Derived from words ‘by eight’.
∑ Word. It is a combination of 16 bits.
∑ Double word. It is a combination of 32 bits.
∑ Kilobyte (KB). It is used to represent the 1024 bytes of information.
∑ Megabyte (MB). It is used to represent the 1024 KBs of information.
∑ Gigabyte (GB). It is used to represent the 1024 MBs of information.
We can determine the weight associated with each bit in the given binary number in the similar manner
as we did in the decimal system. In the binary system, the weight of any bit can be determined by raising
2 to a power equivalent to the position of bit in the number. To understand this concept, let us consider the
following binary number:
In binary system, the point used to separate the integer and the fraction part of a number is known as
binary point. Table 6.2 lists the weights associated with each bit in the given binary number.
Table 6.2 Place values in binary system
Digit 1 0 1 0 0 1 . 0 1 0 1
Weight 25 24 23 22 21 20 2-1 2-2 2-3 2-4
Like the decimal system, the powers to the base increases by 1 towards the left for the integer part
and decreases by 1 towards the right for the fraction part. The value of the given binary number can be
determined as the sum of the products of the bits multiplied by the weight of the bit itself. Therefore, the
value of the binary number 101001.0101 can be obtained as:
1 ¥ 25 + 0 ¥ 24 + 1 ¥ 23 + 0 ¥ 22 + 0 ¥ 21 + 1 ¥ 20 + 0 ¥ 2–1 + 1 ¥ 2–2 + 0 ¥ 2–3 + 1 ¥ 2–4
= 32 + 8 + 1 + 0.25 + 0.0625
= 41.3125
The binary number 101001.0101 represents the decimal value 41.3125.
Computer Codes 97
Table 6.3 lists the 4-bit binary representation of decimal numbers 0 through 15.
Table 6.3 Binary representation of first 16 numbers
The hexadecimal system is a positional number system that uses base 16 to represent different values.
Therefore, this number system is known as base-16 system. As this system uses base 16, 16 symbols are
available for representing the values in this system. These symbols are the digits 0–9 and the letters A, B,
C, D, E and F. The digits 0–9 are used to represent the decimal values 0 through 9 and the letters A, B, C,
D, E and F are used to represent the decimal values 10 through 15.
The weight associated with each symbol in the given hexadecimal number can be determined by raising
16 to a power equivalent to the position of the digit in the number. To understand this concept, let us
consider the following hexadecimal number:
In hexadecimal system, the point used to separate the integer and the fraction part of a number is known as
hexadecimal point. Table 6.4 lists the weights associated with each digit in the given hexadecimal number.
98 Fundamentals of Computers
Digit 4 A 9 . 2 B
Weight 162 161 160 16–1 16–2
The value of the hexadecimal number can be computed as the sum of the products of the symbol
multiplied by the weight of the symbol itself. Therefore, the value of the given hexadecimal number is:
4 ¥ 162 + 10 ¥ 161 + 9 ¥ 160 + 2 ¥ 16–1 + 11 ¥ 16–2
= 1024 + 160 + 9 + 0.125 + 0.0429
= 1193 + 0.1679
= 1193.1679
The hexadecimal number 4A9. 2B represents the decimal value 1193.1679.
The octal system is the positional number system that uses base 8 to represent different values. Therefore,
this number system is also known as base-8 system. As this system uses base 8, eight symbols are available
for representing the values in this system. These symbols are the digits 0 to 7.
The weight associated with each digit in the given octal number can be determined by raising 8 to a
power equivalent to the position of digit in the number. To understand this concept, let us consider the
following octal number:
In octal system, the point used to separate the integer and the fraction part of a number is known as
octal point. Table 6.5 lists the weights associated with each digit in the given octal number.
Table 6.5 Place values in octal system
Digit 2 1 5 . 4 3
Weight 82 81 80 8–1 8–2
Using these place values, we can now determine the value of the given octal number as:
2 ¥ 82 + 1 ¥ 81 + 5 ¥ 80 + 4 ¥ 8–1 + 3 ¥ 8–2
= 128 + 8 + 5 + 0.5 + 0.0469
= 141 + 0.5469
= 141.5469
The octal number 215.43 represents the decimal value 141.5469.
Table 6.6 lists the octal representation of decimal numbers 0 through 15.
Computer Codes 99
The BCD system is employed by computer systems to encode the decimal number into its equivalent binary
number. This is generally accomplished by encoding each digit of the decimal number into its equivalent
binary sequence. The main advantage of BCD system is that it is a fast and efficient system to convert the
decimal numbers into binary numbers as compared to the pure binary system. However, the implementation
of this coding system requires a lot of circuits that makes the design of the computer systems very
complicated.
The 4-bit BCD system is usually employed by the computer systems to represent and process numerical
data only. In the 4-bit BCD system, each digit of the decimal number is encoded to its corresponding 4-bit
binary sequence. The two most popular 4-bit BCD systems are:
∑ Weighted 4-bit BCD code
∑ Excess – 3 (XS – 3) BCD code
Note: Apart from 8421, some other weighted BCD codes are 4221, 2421 and 5211.
Example 6.1 Represent the decimal number 5327 in 8421 BCD code.
Solution
The given decimal number is 5327.
The corresponding 4-bit 8421 BCD representation of decimal digit 5 is 0101.
The corresponding 4-bit 8421 BCD representation of decimal digit 3 is 0011.
The corresponding 4-bit 8421 BCD representation of decimal digit 2 is 0010.
The corresponding 4-bit 8421 BCD representation of decimal digit 7 is 0111.
Therefore, the 8421 BCD representation of decimal number 5327 is 0101 0011 0010 0111.
Example 6.2 Convert the decimal number 159 to 8421 BCD code.
Solution
The given decimal number is 159.
The corresponding 4-bit 8421 BCD representation of decimal digit 1 is 0001.
The corresponding 4-bit 8421 BCD representation of decimal digit 5 is 0101.
The corresponding 4-bit 8421 BCD representation of decimal digit 9 is 1001.
Therefore, the 8421 BCD representation of decimal number 159 is 0001 0101 1001.
Example 6.3 Convert the decimal number 87. 34 to 8421 BCD code.
Solution
The given decimal number is 87.34.
The corresponding 4-bit 8421 BCD representation of decimal digit 8 is 1000.
The corresponding 4-bit 8421 BCD representation of decimal digit 7 is 0111.
The corresponding 4-bit 8421 BCD representation of decimal digit 3 is 0011.
The corresponding 4-bit 8421 BCD representation of decimal digit 4 is 0100.
Therefore, the 8421 BCD representation of decimal number 87.34 is 1000 0111. 0011 0100.
Computer Codes 101
We can also transform a number represented in 8421 BCD code into its corresponding decimal
representation. To accomplish this, we first need to divide the BCD number into sets of 4-bit binary digits
starting from the Least Significant Bit (LSB) and then write the corresponding decimal number for each set.
To understand this concept, let us consider the following examples:
Example 6.4 Determine the decimal number corresponding to the 8421 BCD code 01001001.
Solution
The given 8421 BCD code is 01001001.
To determine the equivalent decimal number, simply divide the 8421 BCD code into sets of 4-bit binary
digits as:
0100 1001
The decimal number corresponding to the binary digits 0100 is 4.
The decimal number corresponding to the binary digits 1001 is 9.
Therefore, the decimal number equivalent to 8421 BCD code 0100 1001 is 49.
Example 6.5 Determine the decimal number corresponding to the 8421 BCD code
0111010000100110.
Solution
The given 8421 BCD code is 0111010000100110.
To determine the equivalent decimal number, simply divide the 8421 BCD code into sets of 4-bit binary
digits as:
0111 0100 0010 0110
The decimal number corresponding to binary digits 0111 is 7.
The decimal number corresponding to binary digits 0100 is 4.
The decimal number corresponding to binary digits 0010 is 2.
The decimal number corresponding to binary digits 0110 is 6.
Therefore, the decimal number equivalent to 8421 BCD code 0111010000100110 is 7426.
Example 6.6 Determine the decimal number corresponding to the 8421 BCD representation
010100100001.0110.
Solution
The given 8421 BCD code is 010100100001.0110.
To determine the equivalent decimal number, simply divide the 8421 BCD code into sets of 4-bit binary
digits as:
0101 0010 0001 . 0110
The decimal number corresponding to binary digits 0101 is 5.
The decimal number corresponding to binary digits 0010 is 2.
The decimal number corresponding to binary digits 0001 is 1.
The decimal number corresponding to binary digits 0110 is 6.
Therefore, the decimal number equivalent to 8421 BCD representation 010100100001.0110 is 521.6.
non-weighted BCD code. The function of XS-3 code is to transform the decimal numbers into their
corresponding 4-bit BCD code. In this code, the decimal number is transformed to the 4-bit BCD code by
first adding 3 to all the digits of the number and then converting the excess digits, so obtained, into their
corresponding 8421 BCD code. Therefore, we can say that the XS-3 code is strongly related with 8421
BCD code in its functioning. Table 6.8 lists the XS-3 BCD code for decimal digits 0 through 9.
Table 6.8 Excess-3 BCD codes
Note: Apart from XS-3 code, the other non-weighted BCD code is 4-bit Gray code.
Example 6.8 Represent the decimal number 173 in XS-3 BCD code.
Solution
The given decimal number is 173.
Now, add 3 to each digit of the given decimal number as:
1+3=4
7 + 3 =10
3+3=6
The corresponding 4-bit 8421 BCD representation of the decimal digit 4 is 0100.
The corresponding 4-bit 8421 BCD representation of the decimal digit 10 is 1010.
The corresponding 4-bit 8421 BCD representation of the decimal digit 6 is 0110.
Therefore, the XS-3 BCD representation of the decimal number 173 is 0100 1010 0110.
Computer Codes 103
Example 6.9 Convert the decimal number 3456 into XS-3 BCD code.
Solution
The given decimal number is 3456.
Now, add 3 to each digit of the given decimal number as:
3+3=6
4+3=7
5+3=8
6+3=9
The corresponding 4-bit 8421 BCD representation of decimal digit 6 is 0110.
The corresponding 4-bit 8421 BCD representation of decimal digit 7 is 0111.
The corresponding 4-bit 8421 BCD representation of decimal digit 8 is 1000.
The corresponding 4-bit 8421 BCD representation of decimal digit 9 is 1001.
Therefore, the XS – 3 BCD representation of decimal number 3456 is 0110 0111 1000 1001.
Note: 4-bit BCD systems are inadequate for representing and handling non-numeric data. For this
purpose, 6-bit BCD and 8-bit BCD systems have been developed.
The 8-bit BCD systems were developed to overcome the limitations of 6-bit BCD systems. The 6-bit BCD
systems can handle numeric as well as non-numeric data but with few special characters. The 8-bit BCD
systems can handle numeric as well as nonnumeric data with almost all the special characters such as
+, - , *, /, @, $, etc. Therefore, the various codes under the category of 8-bit BCD systems are also known
as alphanumeric codes. The three most popular 8-bit BCD codes are:
∑ Extended Binary Coded Decimal Interchange Code (EBCDIC)
∑ American Standard Code for Information Interchange (ASCII)
∑ Gray code
We can convert the Gray coded number to its binary equivalent by remembering the following two major
rules:
∑ The Most Significant Bit (MSB) of the Gray coded number and the equivalent binary number is
always the same.
∑ The next-to-most significant bit of the binary number can be determined by adding the MSB of the
binary number to the next-to-most significant bit of the gray coded number.
Example 6.10 Convert the Gray coded number 11010011 to its binary equivalent.
Solution
The given Gray coded number is 11010011.
The following table lists the steps showing the conversion of the Gray coded number into its binary
equivalent:
Computer Codes 107
Example 6.11 Convert the Gray coded number 10101110 to its binary equivalent.
Solution
The given Gray coded number is 10101110.
The following table lists the steps showing the conversion of the Gray coded number into its binary
equivalent:
Example 6.12 Convert the binary number 10100011 to its equivalent Gray coded number.
Solution
The given binary number is 10100011.
108 Fundamentals of Computers
The following table lists the steps showing the conversion of binary number to its equivalent Gray coded
number:
Hence, the Gray coded equivalent of the binary number 10100011 is 11110010.
Example 6.13 Convert the binary number 01010010 to its equivalent Gray coded number.
Solution
The given binary number is 01010010.
The following table lists the steps showing the conversion of binary number to its equivalent Gray coded
number:
S.No. Binary digit Binary addition operation Gray coded digit
1 0 0
2 1 0+1 1
3 0 1+0 1
4 1 0+1 1
5 0 1+0 1
6 0 0+0 0
7 1 0+1 1
8 0 1+0 1
Hence, the Gray coded equivalent of the binary number 01010010 is 01111011.
The computer systems can only understand data in the form of numbers. Therefore, each character should
be first coded into a specific number before being processed by the computer systems. Many 7-bit and 8-
bit character codes are developed to encode only the well-known characters, such as letters a–z in lower as
well as upper case, digits 0–9 and some special symbols. These character sets can represent a maximum of
256 different characters only. These 7-bit and 8-bit character codes are confined to represent the characters
used by the popular languages around the globe. Therefore, there was always a need of a character code that
could contain all the characters used by almost all the languages in the world.
Computer Codes 109
The 16-bit Unicode is an International 16-bit character set that contains a maximum of 216 = 65,536
different characters. These characters are sufficient to represent almost all the technical and special symbols
used by the major languages of the world. The 16-bit Unicode, (also called 16-bit universal character set),
encodes the different characters by assigning them a unique value. In computer terminology, this unique
value is referred as code point. The code assigned to each character of different languages is universal and
can be used on any platform without any modification. Therefore, we can say that the 16-bit Unicode allows
the computer systems to deal with almost all the characters belonging to different languages used in the
world.
The 16-bit Unicode is a character code that is supported by almost all the operating systems such as
MS Windows, Linux and Mac OS X. For example, MS Windows operating system allows the use of all the
Unicode characters through an accessory called Character Map. Figure 6.1 shows the user interface of the
character map.
Using the Character Map window, we can select any of the Unicode character and copy it to the
clipboard. After copying it to the clipboard, we can use the selected Unicode character in any application
running under MS Windows operating system.
110 Fundamentals of Computers
The computer systems accept the data in decimal form, whereas they store and process the data in binary
form. Therefore, it becomes necessary to convert the numbers represented in one system into the numbers
represented in another system. The different types of number system conversions can be divided into the
following major categories:
∑ Non-decimal to decimal
∑ Decimal to non-decimal
∑ Octal to hexadecimal
Example 6.14 Convert the binary number 10101101 into its corresponding decimal number.
Solution
The given binary number is 10101101.
Now, calculate the sum of the products of each bit multiplied by its place value as :
(1 ¥ 27) + (0 ¥ 26) + (1 ¥ 25) + (0 ¥ 24) + (1 ¥ 23) + (1 ¥ 22) + (1 ¥ 21) + (1 ¥ 20)
= 128 + 0 + 32 + 0 + 8 + 4 + 0 + 1
= 173
Therefore, the binary number 10101101 is equivalent to 173 in the decimal system.
Example 6.15 Convert the binary number 1101 into its equivalent in decimal system.
Solution
The given binary number is 1101.
Now, calculate the sum of the products of each bit multiplied by its place value as:
(1 ¥ 23) + (1 ¥ 22) + (1 ¥ 21) + (1 ¥ 20)
=8+4+1
= 13
Therefore, the binary number 1101 is equivalent to 13 in the decimal system.
Example 6.16 Convert the binary number 10110001 into its equivalent in decimal system.
Solution
The given binary number is 10110001.
Now, calculate the sum of the products of each bit multiplied by its place value as:
(1 ¥ 27) + (1 ¥ 26) + (1 ¥ 25) + (1 ¥ 24) + (0 ¥ 23) + (0 ¥ 22) + (0 ¥ 21) + (0 ¥ 20)
Computer Codes 111
= 128 + 0 + 32 + 16 + 0 + 0 + 0 + 1
= 177
Therefore, the binary number 10110001 is equivalent to 177 in the decimal system.
Example 6.17 Convert the binary number 1011.010 into its equivalent in decimal system.
Solution
The given binary number is 1011.010.
Now, calculate the sum of the products of each bit multiplied by its place value as:
(1 ¥ 23) + (0 ¥ 22) + (1 ¥ 21) + (1 ¥ 20) + (0 ¥ 2–1) + (1 ¥ 2–2) + (0 ¥ 2–3)
1
= 8 + 2 +1+
4
= 11 + 0.25
= 11.25
Therefore, the binary number 1011.010 is equivalent to 11.25 in the decimal system.
Example 6.18 Convert the binary number 11011.0110 to its equivalent in decimal system.
Solution
The given binary number is 11011.0110.
Now, calculate the sum of the products of each bit multiplied by its place value as:
(1 ¥ 24) + (1 ¥ 23) + (0 ¥ 22) + (1 ¥ 21) + (1 ¥ 20) + (0 ¥ 2–1) + (1 ¥ 2–2) + (1 ¥ 2–3) + (0 ¥ 2–4)
1 1
= 16 + 8 + 1 + +
4 8
= 27 + 0.25 + 0.125
= 27.375
Therefore, the binary number 11011.0110 is equivalent to 27.375 in the decimal system.
Hexadecimal to decimal conversion A hexadecimal number can be converted into its equivalent
number in decimal system by calculating the sum of the products of each symbol multiplied by its
corresponding place value.
Example 6.19 Convert the hexadecimal number A53 into its equivalent in decimal system.
Solution
The given hexadecimal number is A53.
Now, calculate the sum of the products of each symbol multiplied by its place value as:
(10 ¥ 162) + (5 ¥ 161) + (3 ¥ 160)
= 2560 + 80 + 3
= 2643
Therefore, the hexadecimal number A53 is equivalent to 2643 in the decimal system.
Example 6.20 Convert the hexadecimal number 6B39 into its equivalent in the decimal system.
Solution
The given hexadecimal number is 6B39.
Now, calculate the sum of the products of each symbol multiplied by its place value as:
(6 ¥ 163) + (11 ¥ 162) + (3 ¥ 161) + (9 ¥ 160)
112 Fundamentals of Computers
= 24576 + 2816 + 48 + 9
= 27449
Therefore, the hexadecimal number 6B39 is equivalent to 27449 in the decimal system.
Example 6.21 Convert the hexadecimal number 5A6D into its equivalent in the decimal system.
Solution
The given hexadecimal number is 5A6D.
Now, calculate the sum of the products of each symbol multiplied by its place value as:
(5 ¥ 163) + (10 ¥ 162) + (6 ¥ 161) + (13 ¥ 160)
= 20480 + 2560 + 96 + 13
= 23149.
Therefore, the hexadecimal number 5A6D is equivalent to 23149 in the decimal system.
Example 6.22 Convert the hexadecimal number AB21.34 into its equivalent in the decimal system.
Solution
The given hexadecimal number is AB21.34.
Now, calculate the sum of the products of each symbol multiplied by its place value as:
(10 ¥ 163) + (11 ¥ 162) + (2 ¥ 161) + (1 ¥ 160) + (3 ¥ 16–1) + (4 ¥ 16–2)
3 4
= 40960 + 2816 + 32 + 1 + +
16 256
= 43809 + 0.1875 + 0.015625
= 43809.203
Therefore, the hexadecimal number AB21.34 is equivalent to 43809.203 in the decimal system.
Example 6.23 Convert the hexadecimal number 6A11.3B into its equivalent in the decimal system.
Solution
The given hexadecimal number is 6A11.3B.
Now, calculate the sum of the products of each symbol multiplied by its place value as:
(6 ¥ 163) + (10 ¥ 162) + (1 ¥ 16–1) + (1 ¥ 160) + (3 ¥ 16–1) + (11 ¥ 16–2)
3 11
= 24576 + 2560 + 16 + 1 + +
16 256
= 27153 + 0.1875 + 0.043
= 27153.2305
Therefore, the hexadecimal number 6A11.3B is equivalent to 27153.2305 in the decimal system.
Octal to decimal conversion An octal number can be converted into its equivalent number in decimal
system by calculating the sum of the products of each digit multiplied by its corresponding place value.
Example 6.24 Convert the octal number 5324 into its equivalent in decimal system.
Solution
The given octal number is 5324.
Now, calculate the sum of the products of each digit multiplied by its place value as:
(5 ¥ 83) + (3 ¥ 82) + (2 ¥ 81) + (4 ¥ 80)
Computer Codes 113
= 2560 + 192 + 16 + 4
= 2772
Therefore, the octal number 5324 is equivalent to 2772 in the decimal system.
Example 6.25 Convert the octal number 13256 into its equivalent in decimal system.
Solution
The given octal number is 13256.
Now, calculate the sum of the products of each digit multiplied by its place value as:
(1 ¥ 84) + (3 ¥ 83) + (2 ¥ 82) + (5 ¥ 81) + (6 ¥ 80)
= 4096 + 1536 + 128 + 40 + 6
= 5806
Therefore, the octal number 13256 is equivalent to 5806 in the decimal system.
Example 6.26 Convert the octal number 4567 into its equivalent in decimal system.
Solution
The given octal number is 4567.
Now, calculate the sum of the products of each digit multiplied by its place value as:
(4 ¥ 83) + (5 ¥ 82) + (6 ¥ 81) + (7 ¥ 80)
= 2048 + 320 + 48 + 7
= 2423
Therefore, the octal number 4567 is equivalent to 2423 in the decimal system.
Example 6.27 Convert the octal number 325.12 into its equivalent in decimal system.
Solution
The given octal number is 325.12.
Now, calculate the sum of the products of each digit multiplied by its place value as:
(3 ¥ 82) + (2 ¥ 81) + (5 ¥ 80) + (1 ¥ 8–1) + (2 ¥ 8–2)
1 2
= 192 + 16 + 5 + +
8 64
= 213 + 0.125 + 0.03125
= 213.15625
Therefore, the octal number 325.12 is equivalent to 213.15625 in the decimal system.
Example 6.28 Convert the octal number 7652.01 into its equivalent in decimal system.
Solution
The given octal number is 7652.01.
Now, calculate the sum of the products of each digit multiplied by its place value as:
(7 ¥ 83) + (6 ¥ 82) + (5 ¥ 81) + (2 ¥ 80) + (0 ¥ 8–1) + (1 ¥ 8–2)
1
= 3584 + 384 + 40 + 2 +
64
= 4010 + 0.015625
= 4010.0156
Therefore, the octal number 7652.01 is equivalent to 4010.0156 in the decimal system.
114 Fundamentals of Computers
Example 6.29 Convert the decimal number 30 into its equivalent binary number.
Solution
The given decimal number is 30.
The following table lists the steps showing the conversion of the given decimal number to its binary
equivalent:
Now, read the remainders calculated in the above table in upward direction to obtain the binary
equivalent, which is 11110.
Therefore, the binary equivalent of the decimal number 30 is 11110.
Example 6.30 Convert the decimal number 111 into its equivalent binary number.
Solution
The given decimal number is 111.
The following table lists the steps showing the conversion of the given decimal number to its binary
equivalent:
Computer Codes 115
Now, read the remainders calculated in the above table in upward direction to obtain the binary
equivalent, which is 1101111.
Therefore, the binary equivalent of the decimal number 111 is 1101111.
Example 6.31 Convert the decimal number 215 into its equivalent binary number.
Solution
The given decimal number is 215.
The following table lists the steps showing the conversion of the given decimal number to its binary
equivalent:
Now, read the remainders calculated in the above table in upward direction to obtain the binary
equivalent, which is 11010111.
Therefore, the binary equivalent of the decimal number 215 is 11010111.
The procedure of converting the fractional part of the given decimal number to its binary equivalent is
different. In this procedure, we need to continually multiply the fractional part by 2 and then note down the
whole number part of the result. The multiplication process will terminate when the fractional part becomes
zero or when we have achieved the desired number of bits.
Example 6.32 Convert the decimal number 45796 to its equivalent octal number.
Solution
The given decimal number is 45796.
The following table lists the steps showing the conversion of the given decimal number to its octal
equivalent:
116 Fundamentals of Computers
Now, read the remainders calculated in the above table in upward direction to obtain the octal equivalent,
which is 131344.
Therefore, the corresponding octal equivalent of 45796 is 131344.
Example 6.33 Convert the decimal number 9547 into its equivalent octal number.
Solution
The given decimal number is 9547.
The following table lists the steps showing the conversion of the given decimal number to its octal
equivalent:
Now, read the remainders calculated in the above table in upward direction to obtain the octal equivalent,
which is 22513.
Therefore, the corresponding octal equivalent of 9547 is 22513.
Example 6.34 Convert the decimal number 1567 into its equivalent hexadecimal number.
Solution
The given decimal number is 1567.
The following table lists the steps showing the conversion of the given decimal number to its
hexadecimal equivalent:
Now, read the remainders calculated in the above table in upward direction to obtain the hexadecimal
equivalent, which is 61F.
Therefore, the hexadecimal equivalent of the given decimal number is 61F.
Computer Codes 117
Example 6.35 Convert the decimal number 9463 into its equivalent hexadecimal number.
Solution
The given decimal number is 9463.
The following table lists the steps showing the conversion of the given decimal number to its
hexadecimal equivalent:
Now, read the remainders calculated in the above table in upward direction to obtain the hexadecimal
equivalent, which is 24F7.
Therefore, the hexadecimal equivalent of the given decimal number is 24F7.
Decimal to octal conversion The decimal to octal conversion is performed by repeatedly dividing
the decimal number by 8 till the decimal number becomes zero and reading the remainders from last to first
to obtain the octal equivalent of the given decimal number. The following examples illustrate the method of
converting decimal number to its octal equivalent:
Example 6.36 Convert the decimal number 45796 to its equivalent octal number.
Solution
The given decimal number is 45796.
The following table lists the steps showing the conversion of the given decimal number to its octal
equivalent:
45796 8 5724 4
5724 8 715 4
715 8 89 3
89 8 11 1
11 8 1 3
1 8 0 1
Now, read the remainders calculated in the above table in upward direction to obtain the octal equivalent,
which is 131344.
Therefore, the corresponding octal equivalent of 45796 is 131344.
118 Fundamentals of Computers
Example 6.37 Convert the decimal number 9547 into its equivalent octal number.
Solution
The given decimal number is 9547.
The following table lists the steps showing the conversion of the given decimal number to its octal
equivalent:
Now, read the remainders calculated in the above table in upward direction to obtain the octal equivalent,
which is 22513.
Therefore, the corresponding octal equivalent of 9547 is 22513.
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
Computer Codes 119
Example 6.38 Convert the octal number 365 into its equivalent hexadecimal number.
Solution
Octal number: 3 6 5
Ø Ø Ø Ø
Binary equivalent: 011 110 101 Step 1
Ø
Regrouping into 4-bit sections: 0000 1111 0101 Step 2
Ø Ø Ø Ø
Hexadecimal equivalent: 0 F 5 Step 3
Hexadecimal number is F5
Example 6.39 Convert the octal number 6251 into its equivalent hexadecimal number.
Solution
Octal number: 6 2 5 1
Ø Ø Ø Ø Ø
Binary equivalent: 110 010 101 001 Step 1
Ø
4-bits grouping: 1100 1010 1001 Step 2
Ø Ø Ø Ø
Hexadecimal equivalent: C A 9 Step 3
Hexadecimal number is CA9
Chapter Summary
Computer systems represent and process the data in binary form only. However, they can accept the data in many
forms. Therefore, it is very necessary to implement a mechanism in the computer system that can convert the data
from the accepted form to the binary form. Computer codes help the computer system to convert the data received in
a different number system to the data in the binary form so that it can be stored and processed in an efficient manner.
In computer terminology, the number system used to represent data is generally known as positional number system.
It is called positional number system because the value of the number represented in this system depends upon the
position of the digits in the given number. The positional number system can be of four different types, namely,
decimal system, binary system, hexadecimal system and octal system. We can easily convert the number represented
in one system to its equivalent in another system. The major number system conversions are non-decimal to decimal,
decimal to non-decimal and octal to hexadecimal.
The different computer codes usually come under the category of BCD systems, which are mainly of 4-bit or
8-bit. The 4-bit BCD systems include the weighted 4-bit BCD code and XS-3 BCD code. On the other hand, the
8-bit BCD system includes the EBCDIC code, ASCII code and Gray code.
∑ Computer codes: The computer codes are the codes that help in converting the data entered by the users into the
binary form.
∑ Positional number system: The positional number system is a system in which numbers are represented using certain
symbols called digits and the values of these numbers is determined by taking the position of digits into consideration.
120 Fundamentals of Computers
∑ Decimal system: The decimal system is a positional number system that uses base 10 to represent different values.
∑ Binary system: The binary system is a positional number system that uses base 2 to represent different values.
∑ Bit: Bit is the smallest unit of information used in a computer system. It can have either have 0 or 1 as its value.
∑ Byte: Byte is the combination of 8 bits.
∑ Hexadecimal system: The hexadecimal system is a positional number system that uses base 16 to represent
different values.
∑ Octal system: The octal system is a positional number system that uses base 8 to represent different values.
∑ BCD system: The BCD system is used to encode decimal number into its equivalent binary number.
∑ Weighted 4-bit BCD code: The weighted 4-bit BCD code is used to encode the decimal digits into binary sequence
by specifying the weights 8, 4, 2, and 1 respectively to the bits from left to right.
∑ Digital codes: Digital codes allow the computer to handle numeric as well as non-numeric data in an efficient manner.
∑ EBCDIC code: The EBCDIC code is an 8-bit alphanumeric code that was developed by IBM to represent alphabets,
decimal digits and special characters including control characters.
∑ ASCII code: The ASCII code is also used to represent alphabets, decimal digits and some special characters.
However, this code is usually implemented by the non-IBM computer systems.
∑ 16-bit Unicode: The 16-bit Unicode is an International 16-bit character set that can represent a maximum of
216 = 65,536 different characters.
Review Questions
1. Human beings generally employ the _________ number system to carry out their routine computations.
2. The most common system used by computer systems is _________.
3. The weight of any digit in the number system generally depends upon its _________ in the given number.
4. The binary system represents each type of data in the form of _________ and _________.
5. The digits in binary system are referred as _________.
6. The base of any number system depends upon the number of _________ in the system.
7. Computer designers and professionals generally deal with _________ number system.
8. The octal system is also known as _________ system.
9. The octal number 5624 is equivalent to _________ in decimal system.
10. The binary number 1001010 represents a decimal value of _________.
11. The hexadecimal system consists of _________ symbols.
12. Human beings usually supply data to the computer system in the _________ form.
13. Computer codes help computer systems convert the decimal data into _________ data.
14. BCD stands for _________.
15. _________ and _________ are the two most popular 4-bit BCD codes.
16. The 8421 BCD representation of the decimal number 3569 is _________.
17. The 4-bit BCD systems are suitable for handling _________ data only.
18. The 16-bit __________ is an international standard for representing characters from various languages.
19. The hexadecimal number B45A is equivalent to _________ in decimal system.
20. The hexadecimal representation of the octal number 2564 is _________.
Computer Codes 121
arithmetic operations, but by following a predefined set of rules. Each binary arithmetic operation has an
associated set of rules that should be adhered to while carrying out that operation. The binary arithmetic
operations are usually simpler to carry out as compared to the decimal operations because one needs to deal
with only two digits, 0 and 1, in the binary operations. The different binary arithmetic operations performed
in a computer system are:
∑ Binary addition
∑ Binary multiplication
∑ Binary subtraction
∑ Binary division
Binary addition is the simplest arithmetic operation performed in the computer system. Like decimal
system, we can start the addition of two binary numbers column-wise from the right most bit and move
towards the left most bit of the given numbers. However, we need to follow certain rules while carrying out
the binary addition of the given numbers. Table 7.1 lists the rules for binary addition.
Table 7.1 Binary addition rules
A B A+B Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
In the above table, the first three entries do not generate any carry. However, a carry would be generated
when both A and B contain the value, 1. The carry, if it is generated, while performing the binary addition
in a column would be forwarded to the next most significant column.
Example 7.1 Perform the binary addition operation on the following binary numbers:
0010
0111
Solution
The given binary numbers are 0010 and 0111.
Now, perform the binary addition of the given numbers as:
Binary number Decimal value
0 0 1 0 2
0 1 1 1 7
1 0 0 1 9
Therefore, the result of the binary addition performed on 0010 and 0111 is 1001.
Note: In the above example, a carry is generated in the 2nd and the 3rd column only.
Computer Arithmetic 125
Example 7.2 Perform the binary addition of the following binary numbers:
1 0 1 0 1 0
0 1 0 0 1 1
Solution
The given binary numbers are 101010 and 010011.
Now, perform the binary addition of the given numbers as:
Binary number Decimal value
1 0 1 0 1 0 42
0 1 0 0 1 1 19
1 1 1 1 0 1 61
Therefore, the result of the binary addition performed on 101010 and 010011 is 111101.
Note: In the above example, a carry is generated in the 2nd column only.
A B C A+B+C Carry
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
126 Fundamentals of Computers
To understand the concept of triple binary addition, let us consider the following examples:
Example 7.4 Perform the binary addition operation on the following three numbers:
0 0 1 0
0 0 0 1
0 1 1 1
Solution
The given binary numbers are 0010, 0001 and 0111.
Now, perform the binary addition of the given numbers as:
Binary number Decimal value
0 0 1 0 2
0 0 0 1 1
0 1 1 1 7
1 0 1 0 10
Therefore, the result of the binary addition performed on 0010, 0001 and 0111 is 1010.
Note: In the above example, a carry is generated in the 1st and the 2nd column only.
The multiplication of two binary numbers can be carried out in the same manner as the decimal
multiplication. However, unlike decimal multiplication, only two values are generated as the outcome
of multiplying the multiplicand bit by 0 or 1 in the binary multiplication. These values are either 0 or
1. The binary multiplication can also be considered as repeated binary addition. For instance, when we
are multiplying 7 with 3, it simply means that we are adding 7 to itself 3 times. Therefore, the binary
Computer Arithmetic 127
multiplication is performed in conjunction with the binary addition operation. Table 7.3 lists the rules for
binary multiplication.
Table 7.3 Binary multiplication rules
A B A¥B
0 0 0
0 1 0
1 0 0
1 1 1
The above table clearly shows that binary multiplication does not involve the concept of carry. To
understand the concept of binary multiplication, let us consider the following examples:
Example 7.6 Perform the binary multiplication of the decimal numbers 12 and 10.
Solution
The equivalent binary representation of the decimal number 12 is 1100.
The equivalent binary representation of the decimal number 10 is 1010.
Now, perform the binary multiplication of the given numbers as:
1 1 0 0 Multiplicand
1 0 1 0 Multiplier
0 0 0 0 First partial product
1 1 0 0
0 0 0 0
1 1 0 0
1 1 1 1 0 0 0 Final product
Therefore, the result of the binary multiplication performed on the decimal numbers 12 and 10 is
1111000.
Example 7.7 Evaluate the binary product of the decimal numbers 15 and 14.
Solution
The equivalent binary representation of the decimal number 15 is 1111.
The equivalent binary representation of the decimal number 14 is 1110.
Now, perform the binary multiplication of the given numbers as:
1 1 1 1 Multiplicand
1 1 1 0 Multiplier
0 0 0 0 First partial product
1 1 1 1
1 1 1 1
1 1 1 1
1 1 0 1 0 0 1 0 Final product
128 Fundamentals of Computers
Therefore, the result of the binary multiplication performed on the decimal numbers 15 and 14 is
11010010.
The binary subtraction is performed in the same way as the decimal subtraction. Like binary addition and
binary multiplication, binary subtraction is also associated with a set of rules that need to be followed while
carrying out the operation. Table 7.4 lists the rules for binary subtraction.
Computer Arithmetic 129
A B A–B Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
The above table shows that the binary subtraction like the decimal subtraction uses the borrow method
to subtract one number from another. To understand the concept of binary subtraction, let us consider the
following examples:
Binary division is also performed in the same way as we perform decimal division. Like decimal division,
we also need to follow the binary subtraction rules while performing the binary division. The dividend
involved in binary division should be greater than the divisor. The following are the two important points,
which need to be remembered while performing the binary division:
∑ If the remainder obtained by the division process is greater than or equal to the divisor, put 1 in the
quotient and perform the binary subtraction.
∑ If the remainder obtained by the division process is less than the divisor, put 0 in the quotient and
append the next most significant digit from the dividend to the remainder.
Therefore, the result of the binary division performed on the decimal numbers 14 and 7 is 10.
Example 7.15 Perform the binary division of the decimal numbers 18 and 8.
Solution
The equivalent binary representation of the decimal number 18 is 10010.
The equivalent binary representation of the decimal number 8 is 1000.
Now, perform the binary division of the given numbers as:
1 0 0 0 ) 1 0 0 1 0 ( 1 0 (Quotient)
1 0 0 0
0 0 0 1 0
0 0 0 0 0
0 0 0 1 0 (Remainder)
Therefore, the result of the binary division performed on the decimal numbers 18 and 8 is 10 with a
remainder of 10.
Example 7.16 Perform the binary division of the decimal numbers 11011 and 1001.
Solution
The given binary numbers are 11011 and 1001.
Now, perform the binary division of the given binary numbers as:
1 0 0 1 ) 1 1 0 1 1 ( 1 1 (Quotient)
1 0 0 1
1 0 0 1
1 0 0 1
0 0 0 0
Therefore, the result of the binary division performed on the numbers 11011 and 1001 is 11.
Therefore, the result of the binary division performed on the decimal number 217 and 12 is 10010 with a
remainder of 1.
The unsigned binary number is the number with a magnitude of either zero or greater than zero.
The unsigned binary numbers are usually represented using the unsigned-magnitude representation.
The unsigned-magnitude representation only represents the magnitude of the numbers. This type of
representation does not take the sign of the binary numbers into consideration while representing these
numbers. Therefore, we can say that the unsigned-magnitude representation is used to represent the positive
numbers only.
The signed binary numbers are the numbers that are always associated with a sign. This sign helps in
identifying whether the given binary number is a positive quantity or a negative quantity. Signed-magnitude
representation is a method used in the computer system for representing the signed binary numbers. In this
method, an extra bit called sign bit is associated with the magnitude of the given number. This sign bit is
used to indicate whether the given binary number is positive or negative. The value of the sign bit is 0 for
the positive numbers and 1 for the negative numbers. The signed-magnitude representation method can be
used to represent both the positive and the negative numbers. However, the unsigned numbers or the positive
numbers in the computer system are usually represented with the help of unsigned-magnitude representation.
This is because the numbers represented in the unsigned-magnitude representation can be processed more
efficiently and rapidly by the computer system as compared to the signed-magnitude representation.
In the signed-magnitude representation, the number of bits assigned to the signed numbers depends upon
the word size of the microprocessor of the computer system. For instance, consider the 8-bit word size
computer system of representing integers. The 8-bit word size computer system can represent the numbers
between – (28 – 1) to (28 – 1), i.e., – 255 to 255. Figure 7.1 shows the storage system of an 8-bit word size
computer system.
8 7 0
Sign bit Magnitude bits
In Fig. 7.1, the first 7 bits of the 8-bit word size computer system are used to represent the magnitude of
the number and the last bit, is used to indicate the sign of the number. This bit is known as the sign bit.
Figure 7.2 shows the signed-magnitude representation of the decimal number 50 in an 8-bit word size
computer system. Here, the sign bit contains 0 indicating that the number is positive.
0 0 1 1 0 0 1 0
for n bits
unsigned numbers [0,2^(n)-1]
for a n bit multiplicant and n bit multiplier for signed ( 2 complement) numbers
the maximum bits to store the result is 2n
[-2^(n-1),2^(n-1)-1]
Computer Arithmetic 133
Figure 7.3 shows the signed-magnitude representation of –50 in an 8-bit word size computer system.
1 0 1 1 0 0 1 0
Sign bit
Here, the sign bit contains 1 indicating that the number is a negative number.
The following are some of the advantages of the signed-magnitude representation:
∑ The main advantage of the signed-magnitude representation is its simplicity. It is very easy to
represent and understand positive as well as negative numbers using this representation.
∑ The binary multiplication and the binary division of the signed binary numbers can be easily
performed.
∑ The signed-magnitude representation can represent equal number of positive and negative quantities
that makes it a very symmetrical method of representation.
The following are some of the disadvantages of the signed-magnitude representation:
∑ The implementation of the signed-magnitude representation in the computer system requires the
use additional digital circuits that make the internal architecture of the computer system little more
complicated.
∑ It is not an easy task to perform the binary addition and the binary subtraction using this
representation.
∑ It provides two different representations of zero, one for plus zero and another for negative zero
but actually they are the same values. This could lead to some confusion while performing various
arithmetic operations.
The complement system can also be used to represent the signed binary numbers apart from the signed-
magnitude representation method. In the complement system, the positive integers are represented in a
similar manner as they are represented in the signed-magnitude representation. The following are the two
most popular complement methods used in the computer system:
∑ One’s complement
∑ Two’s complement
1 1 1 1 0 0 0 0
Sign bit
Fig. 7.4 The one’s complement representation of –15
The one’s complement method also uses the left most bit as the sign bit to indicate the sign of the
number. Like the signed magnitude representation, the values, 0 and 1 indicate positive and negative
numbers respectively. In the above figure, the value of the sign bit is 1 which shows that the represented
number is a negative value.
Table 7.5 lists the one’s complement representation of the integers from – 7 to 7.
Table 7.5 One’s complement representation
Note: The one’s complement method of representing signed numbers also has two different
representations for the number, zero.
Example 7.18 Represent –25 in the one’s complement system in byte size.
Solution
The given number is –25.
The equivalent binary representation of 25 in byte size is 00011001.
Now, change all the zeros to ones and all the ones to zeros in order to obtain the one’s complement
representation as:
Computer Arithmetic 135
0 0 0 1 1 0 0 1
1 1 1 0 0 1 1 0
Therefore, the one’s complement representation of –25 is 11100110.
Example 7.19 Represent –32 in the one’s complement system in byte size.
Solution
The equivalent binary representation of 32 in byte size is 00100000.
Now, change all the zeros to ones and all the ones to zeros in order to obtain the one’s complement
representation as:
0 0 1 0 0 0 0 0
1 1 0 1 1 1 1 1
Therefore, the one’s complement representation of –32 is 11011111.
Example 7.20 Represent –32 in the one’s complement system in byte size.
Solution
The given number is –54.
The equivalent binary representation of 54 in byte size is 00110110.
Now, change all zeros to ones and all ones to zeros to obtain the one’s complement representation as:
0 0 1 1 0 1 1 0
1 1 0 0 1 0 0 1
Therefore, the one’s complement representation of -54 is 11001001.
1 1 1 1 0 0 0 1
Sign bit
Fig. 7.5 The two’s complement representation of –15
136 Fundamentals of Computers
Example 7.21 Represent –33 in the 2’s complement system in byte size.
Solution
The given number is –33.
The equivalent binary representation of 33 in a byte is 00100001.
Now, change all the zeros to ones and all the ones to zeros in order to obtain the one’s complement
representation as:
0 0 1 0 0 0 0 1
1 1 0 1 1 1 1 0
Therefore, the one’s complement representation of –33 is 11011110.
Now, add 1 to the one’s complement representation in order to obtain the two’s complement
representation of the given number as:
1 1 0 1 1 1 1 0
1
1 1 0 1 1 1 1 1
Therefore, the two’s complement representation of –33 is 11011111.
Computer Arithmetic 137
1 1 1 1 0 1 0 0
Therefore, the one’s complement representation of –11 is 11110100.
Now, add 1 to the one’s complement representation in order to obtain the two’s complement
representation of the given number as:
1 1 1 1 0 1 0 0
1
1 1 1 1 0 1 0 1
Therefore, the two’s complement representation of –11 is 11110101.
1 1 0 0 0 1 0 0
Therefore, the one’s complement representation of –59 is 11000100.
Now, add 1 to the one’s complement representation in order to obtain the two’s complement
representation of the given number as:
1 1 0 0 0 1 0 0
1
1 1 0 0 0 1 0 1
Therefore, the two’s complement representation of –59 is 11000101.
The complement methods can be used to perform the binary subtraction of the signed integers. The binary
subtraction of the signed integers can be divided into the three following categories:
138 Fundamentals of Computers
0 0 1 0
1
0 0 1 1
Therefore, the result of the binary subtraction performed on the given numbers using one’s complement
method is 0011.
Using two’s complement To subtract a smaller number from a larger number using the two’s
complement method, we need to perform the following steps:
1. Obtain the two’s complement of the smaller number.
2. Perform the binary addition of the two’s complement and the larger number.
3. Discard the carry to obtain the final answer.
Consider the following examples for understanding the method of subtracting a smaller number from a
larger number using two’s complement system:
Now, perform the binary addition on the two’s complement and the smaller number as:
1 0 1 0
0 1 0 0
1 1 1 0
Therefore, the result of the binary subtraction performed on the given numbers using two’s complement
method is 1110.
Therefore, the result of the binary subtraction performed on the given numbers using one’s complement
method is 101.
Example 7.33 Subtract 9 from –5 using the one’s complement method.
Solution
The one’s complement representation of –9 is 0110.
The one’s complement representation of –5 is 1010.
Now, perform the binary addition on the one’s complement representation of both the given numbers as:
0 1 1 0
1 0 1 0
1 0 0 0 0
Add the carry and add it to the calculated result as:
0 0 0 0
1
0 0 0 1
Therefore, the result of the binary subtraction performed on the given numbers using one’s complement
method is 0001.
Using two’s complement To subtract a positive number from a negative number using the two’s
complement method, we need to perform the following steps:
1. Obtain the two’s complement of both the numbers.
2. Perform the binary addition on the two’s complement representation of both the given numbers.
3. Discard the carry to obtain the final answer.
Consider the following examples for understanding the method of subtracting a positive number from a
negative number using two’s complement system:
1 1 0 1
0 1 0 0
1 0 0 0 1
Discard the carry to obtain the final answer, which is 0001.
Therefore, the result of the binary subtraction performed on the given numbers using two’s complement
method is 0001.
The numbers processed by the computer system are of two types, integer and floating-point. Therefore, the
number representations used in the computer system are also of two types. These are known as:
∑ Integer representation
∑ Floating-point representation
The floating-point numbers are also referred as real numbers. Some of the examples of the floating-point
numbers are 0.5, 3.8 and –102.8. A notation known as scientific notation is used to represent the real
numbers in the computer system. The scientific notation is usually applied for the real numbers, which are
either very small or very large. The scientific notation, also called exponential notation, represents the real
numbers in the following form:
m ¥ be
where,
m is the real value called mantissa
b is the base of the number system
e is the intger value called exponent
Therefore, in the scientific notation, the real numbers are expressed as the product of some real value and
the base of the number system, where the base is raised to some integer value. For example, the floating-
point representation for the real number 325.123 is 3.25123 ¥ 102. Similarly, the number 0.000000245 can
be represented using floating-point representation as 2.45 ¥ 10–7.
A binary number can be represented in the scientific notation by using base 2. For example, the binary
number 1000.0101 can be represented using scientific notation as 1.0000101 ¥ 23.
A given number can be stored in the scientific notation in different forms. For example, the number
4333.123 can be represented in the scientific notation in any one of the following forms:
4.333123 ¥ 103
43.33123 ¥ 102
433.3123 ¥ 101
The modern computer systems usually employ the normalized scientific notation to represent real
numbers. The following are some of the examples of the real numbers represented in the normalized
scientific notation:
0.324521 ¥ 102
0.523 ¥ 10–3
–0.5469 ¥ 105
The format used to store the binary numbers in the computer system is known as binary floating-point
format. In this format, the binary numbers are stored in the normalised scientific form. The binary floating-
point format stores the binary number by dividing it into the following three parts:
Sign The sign part is always 1-bit long and is used to store the information pertaining to the sign of the
number. This part stores either 0 or 1 value for the positive and negative numbers respectively.
Exponent The exponent part is always stored using excess-N notation. The value of N depends upon the
number of bits available for storing the exponent. For example, if the exponent is to be stored in 7 bits,
excess-64 notation would be used. If the exponent is to be stored in 8 bits, excess-127 notation would be
used. Therefore, if 6 is to be stored as the exponent value in a 7-bit word size, it would be stored using
excess-64 notation and its value would be 70. Therefore, the exponent value that is actually stored in the
computer system is determined by adding the value of N to the actual value of the exponent.
Mantissa The mantissa part of the binary number is always stored in the normalised scientific notation in
the computer system.
Figure 7.6 shows the storage layout of the 32-bit binary floating-point number in the computer system.
Computer Arithmetic 145
To understand the storage layout of the binary numbers, let us consider the following binary floating
point number:
1000100.1
Before storing the given binary floating-point number in the computer system, we need to normalise its
mantissa as:
0.10001001 ¥ 27
Now, the mantissa part of the given number is 0.10001001 and the exponent part of the given number is 7.
Suppose the number of bits available for storing the exponent is 7. In this case, the excess-64 notation
would be implemented by the computer system to store the exponent part of the given number.
The excess-64 notation for the decimal number 7 is 71.
The equivalent binary representation of the decimal number 71 is 1000111.
Therefore, the following are the binary values stored in the sign, the exponent and the mantissa parts in
the computer system:
∑ 0 in the sign part
∑ 1000111 in the exponent part
∑ .10001001 in the mantissa part
Figure 7.7 shows the storage layout of the binary floating point number 1000100.1 in the computer
system.
0 1000111 100010010000000000000000
The integer arithmetic involves a number of arithmetic operations, which are performed on the unsigned
and the signed binary numbers. We have already covered the binary addition, binary subtraction, binary
multiplication and binary division operations on the unsigned binary numbers. We can perform these
arithmetic operations on the signed binary numbers as well. The signed numbers can be represented in the
computer system using any one of the following systems:
∑ Signed-magnitude
∑ One’s complement
∑ Two’s complement
magnitude system, we need to take care of two additional rules related to the sign of the binary numbers.
These rules are as follows:
∑ If both the given numbers have the same sign bit, perform the binary addition on the magnitude of the
numbers and use the same sign bit in the final result.
∑ If the sign bits are opposite, instead of binary addition, binary subtraction would be performed on the
given numbers.
Consider the following examples for understanding the method of adding binary numbers in the signed-
magnitude system:
0 1 0 1
0 0 0 0
0 0 1 0 1 0 0 Final product
As the sign bits of both the given numbers are same, keep the sign bit in the final result as 0.
Therefore, the binary product of the given numbers in signed-magnitude system is 0 10100.
Example 7.41 Perform the binary multiplication of –6 and 2 using signed-magnitude system.
Solution
The signed-magnitude representation of –6 is 1 0110.
The signed-magnitude representation of 2 is 0 0010.
Now, perform the binary multiplication only on the magnitudes of the given numbers as:
0 1 1 0 Multiplicand
0 0 1 0 Multiplier
0 0 0 0 First partial product
0 1 1 0
0 0 0 0
0 0 0 0
0 0 0 1 1 0 0 Final product
As, the sign bits of both the given numbers are opposite, keep the sign bit in the final result as 1.
Therefore, the binary product of the given numbers in signed-magnitude system is 1 1100.
While performing the binary division in the signed-magnitude system, the following two considerations
about the sign bits should be kept in mind:
∑ If the both the numbers have same sign bits, perform the binary division on the magnitudes of the
numbers only. The sign bit to represent the positive result would always be zero.
∑ If both the numbers have opposite sign bits, perform the binary multiplication on the magnitudes of
the numbers only. The sign bit to represent the negative result would always be one.
Consider the following examples to understand the method of dividing the binary numbers in the
signed-magnitude system:
Example 7.42 Evaluate the binary division of the decimal numbers –18 and –9.
Solution
The signed-magnitude representation of –18 is 1 10010.
The signed-magnitude representation of –9 is 1 01001.
Now, perform the binary division only on the magnitudes of the given numbers as:
1 0 0 1) 1 0 0 1 0(1 0 (Quotient)
1 0 0 1
0 0 0 0 0 (Remainder)
As the sign bits of both the numbers are same, keep the sign bit in the final result as 0.
Therefore, the binary division output of the given numbers in the signed-magnitude system is 0 10.
Computer Arithmetic 149
Example 7.43 Evaluate the binary division of the decimal numbers 6 and –3.
Solution
The signed-magnitude representation of 6 is 0 0110.
The signed-magnitude representation of –3 is 1 0011.
Now, perform the binary division only on the magnitudes of the given numbers as:
0 1 1) 0 1 1 0(1 0 (Quotient)
0 1 1
0 0 0 0 (Remainder)
As the sign bits of both the numbers are opposite, keep the sign bit in the final result as 1.
Therefore, the binary division output of the given numbers in the signed-magnitude system is 1 10.
Example 7.44 Perform the binary addition of –2 and –4 using one’s complement system.
Solution
The one’s complement representation of –2 is 1101.
The one’s complement representation of –4 is 1011.
Now, perform the binary addition of the given numbers as:
1 1 0 1
1 0 1 1
1 1 0 0 0
Discard the carry by adding it to the final result as:
1 0 0 0
1
1 0 0 1
Therefore, the result of the binary addition performed on the given numbers in one’s complement system
is 1001.
Example 7.45 Perform the binary addition of 3 and –6 using one’s complement system.
Solution
The one’s complement representation of 3 is 0011.
The one’s complement representation of –6 is 1001.
Now, perform the binary addition of the given numbers as:
150 Fundamentals of Computers
0 0 1 1
1 0 0 1
1 1 0 0
Therefore, the result of the binary addition performed on the given numbers in one’s complement system
is 1100.
The binary multiplication in one’s complement system can be performed by using the concept of sign bit
extension. According to this concept, when the signed integer is to be represented in the larger bit system,
the additional bits on the left side of the number are filled with the sign bit value. We can use this concept
in one’s complement multiplication by extending the bits in the first partial product. The other binary
multiplication rules are the same as used with the unsigned integers.
Consider the following examples to understand the method of multiplying the binary numbers in the
one’s complement system:
Example 7.47 Perform the binary addition of 4 and –5 in two’s complement system.
Solution
The two’s complement representation of 4 is 0100.
Computer Arithmetic 151
Example 7.48 Perform the binary addition of –8 and –2 in two’s complement system.
Solution
The two’s complement representation of –8 is 1000.
The two’s complement representation of –2 is 1110.
Now, perform the binary addition as:
1 0 0 0
1 1 1 0
1 0 1 1 0
Discard the carry to obtain the final result, which is 0110.
Therefore, the result of binary addition performed on the given numbers in two’s complement system
is 0110.
The binary multiplication can also be performed in two’s complement system by using the concept of
sign bit extension. Consider the following examples for understanding the method of multiplying the binary
numbers in the two’s complement system:
The various floating-point arithmetic operations are performed in the computer system usually on the
numbers represented in the normalised floating-point notation. We can perform four basic arithmetic
operations: addition, subtraction, multiplication, and division, on the normalised binary floating-point
numbers.
7.11.1 Addition
The addition operation is performed on the normalised floating-point numbers by making the exponents of
both the numbers equal. This can be accomplished by shifting the mantissa of the smaller number to the
right by a number equal to the difference between the exponents of the given numbers.
Consider the following examples for understanding the method of adding binary numbers represented in
the normalized binary floating-point format:
Solution
The given binary floating-point numbers are 0.110110100E0100011 and 0.110001010E0100001.
As the difference between the exponents of both the numbers is 2, shift the mantissa of the second
number to the right by 2 places.
Now, the second number becomes:
0.001100010E0100011
Now, add the mantissa of both the given numbers as:
0.110110100 + 0.001100010 = 1.000010110
Therefore, the addition of the given numbers is 1.000010110E0100011
Transform this result into normalised binary floating-point form as:
0.100001011E0100100
Therefore, the result of the addition operation performed on the given numbers is
0.100001011E0100100.
7.11.2 Subtraction
The subtraction operation is also performed on the given numbers after making their exponent parts equal.
The subtraction operation is carried out by calculating the two’s complement of the subtrahend and adding
it to the minuend for obtaining the final result.
Consider the following examples for understanding the method of subtracting binary numbers
represented in the normalized binary floating-point format:
7.11.3 Multiplication
The multiplication operation can be performed on the normalised binary floating-point numbers by
multiplying the mantissa and adding the exponent parts. Consider the following example for understanding
the method of multiplying binary numbers represented in the normalised binary floating-point format:
154 Fundamentals of Computers
7.11.4 Division
The division operation can be performed on the normalised binary floating-point numbers by dividing the
mantissa of the first number by the mantissa of the second number and subtracting the exponent of the
second number from the exponent of the first number. Consider the following example for understanding
the method of dividing binary numbers represented in the normalised binary floating-point format:
Computer arithmetic errors can be divided into two categories, integer arithmetic errors and floating-point
arithmetic errors. The integer arithmetic errors are the errors generated by the computer system while
performing various integer arithmetic operations. On the other hand, the floating-point arithmetic errors
may arise in the computer system while performing various floating-point arithmetic operations.
The following are some important types of integer arithmetic errors in the computer system:
∑ Overflow The overflow error may occur when the computer system attempts to use a number in the
integer arithmetic that is too large to be handled. This type of error may also be generated as the
final result of the integer arithmetic operations. Therefore, the computer users should always use the
numbers only within the range that the computer system can handle.
Computer Arithmetic 155
∑ Underflow The underflow error may occur when the computer system attempts to use a number in
the integer arithmetic that is too small to be handled. The binary subtraction and the binary division
operations may generate this type of error in the computer system.
∑ Truncation The truncation errors may occur in the computer system when the computer system
attempts to convert an integer from one data type to another. If the value of the given integer is
beyond the range of the desired data type, the given integer would be truncated by preserving the
low-order bits only. The binary division operation may generate this kind of error in the computer
system.
∑ Sign The sign errors may occur in the computer system when the computer system attempts to
represent an unsigned number into signed representation and vice versa.
The floating-point arithmetic errors may also occur in the computer system while carrying out various
floating-point arithmetic operations. Overflow and underflow errors also come under the category of
floating-point arithmetic errors. Apart from overflow and underflow, the following are some other important
reasons that may cause floating-point arithmetic errors:
∑ The shifting of mantissa to the right for the purpose of representing the real number in the normalised
scientific floating-point form may alter the value of the number.
∑ The conversion of a floating-point decimal number to its equivalent floating-point binary form may
generate a binary number containing some repeated sequence of bits in the fraction part. This repeated
sequence may sometimes be truncated by the computer system resulting in the wrong output.
∑ The rounding-off of a very large fraction to the desired number of digits may also generate the
floating-point errors.
fy = 0.000000001
fz = 0.500000001 = 0.500000
z = 0.500000 E1
Note that the value of z is the same as that of x.
The different arithmetic laws hold true for addition as well multiplication operations. The arithmetic laws
can be divided into the following four major categories:
∑ Identity laws
∑ Commutative laws
∑ Associative laws
∑ Distributive laws
Chapter Summary
The main function of the computer system is to process the data. The processing of data by the computer system
involves a lot of arithmetic, which is usually of binary type. The basic arithmetic operations performed by the
computer system are binary addition, binary multiplication, binary subtraction and binary division.
The basic arithmetic operations can be performed on the integer data as well on floating-point data. The integers
in the computer system can be represented by using four different systems: unsigned, signed-magnitude, one’s
complement and two’s complement. The unsigned system is used to represent positive integers only. The other
systems can be used to represent positive as well negative integers. The complement system can also be used to
perform the binary subtraction in an efficient manner. The floating-point numbers can be represented in the computer
system using normalized binary floating-point form. The computer system can generate different types of errors
while performing different arithmetic operations. Therefore, a suitable mechanism should be adopted to prevent the
occurrence of these errors.
∑ ALU: ALU is an important component of CPU that is used to perform various arithmetic and logical operations in
the computer system.
∑ Integer arithmetic: Integer arithmetic refers to various arithmetic operations involving integer operands only.
∑ Floating-point arithmetic: Floating-point arithmetic refers to various arithmetic operations involving floating-point
operands only.
∑ Unsigned binary number: Unsigned binary number is the number with a magnitude of either zero or greater than
zero.
∑ Signed binary number: Signed binary number is the number that is always associated with a sign.
Computer Arithmetic 159
∑ Sign bit. Sign bit is an additional bit indicating the sign of the number. It has the value 0 for the positive integers
and value 1 for the negative integers.
∑ One’s complement: One’s complement is a system of representing negative integers. Any negative number can be
represented in this system by complementing the bits of its equivalent binary number.
∑ Two’s complement: Two’s complement is another system of representing negative integers. Any negative integer
can be represented in this system by first calculating the one’s complement of that number and then adding 1 to it.
Review Questions
1. The arithmetic operations are usually performed in the computer system by _________ and _________ unit of
the CPU.
2. The computer arithmetic is also referred to as the _________ arithmetic.
3. The binary multiplication can be considered as the _________ process of binary _________.
4. Unsigned binary number is a number with a magnitude of either _________ or _________.
5. The unsigned-magnitude representation only represents the _________ of the numbers.
6. The _________ most bit of the given signed number is used to represent the sign of that number.
7. The signed binary numbers always associate a _________ bit with them.
8. The signed-magnitude representation can represent _________ as well as _________ numbers.
9. _________ system can also be used for representing negative integers.
10. The two’s complement of any negative number can be obtained by adding _________ to the one’s complement
of that number.
11. The biased representation of integers uses the concept of a_________.
12. A bias is actually a _________ that is added to the given integer to obtain an unsigned value.
13. The bias value depends upon the number of _________ required to represent the number.
14. The floating-point numbers consist of two major parts, _________ and _________.
15. The floating-point representation is a _________ notation of representing real numbers in the computer system.
16. The scientific notation is usually applied for the real numbers, which are either very _________ or very _______.
17. The different arithmetic laws hold true for _________ as well _________ operations.
1. Which of the following unit performs the arithmetic operations in the computer system?
A. Control unit B. ALU C. Shift unit D. None of the above
2. Which of the following operation is not performed by the ALU of the computer system?
A. Binary addition B. AND operation C. Storing the data D. Binary division
3. Which of the following is not an appropriate operand for arithmetic operations?
A. Integers B. Strings C. Real D. None of the above
160 Fundamentals of Computers
understandable form and directs it to the operating system. Similarly, the device drivers of the output
devices translate the output generated by the computer into the user understandable format and display it
on the screen. In other words, a device driver is special software that enables a hardware device, such as
keyboard, monitor and printer to perform an operation according to the command given by the end user.
Whenever a program needs to use a
connected hardware device, it issues a
command to the operating system. The
operating system calls the respective
routine or process of the device driver,
which instructs the device to perform
the task. For providing instruction to the
devices, the device driver sends various
control and data signals through buses
and cables to the device. In order to
acknowledge the device driver’s signal,
the device sends the acknowledgment
signals to the device driver. After
performing the task, the device sends
a message to the device driver, which
returns the value to the calling program
of the operating system. In other words,
a device driver instructs a hardware
device the way it should accept the input
from the operating system and the way
in which it should communicate with
the other units of the computer system.
Fig. 10.6 Working of a device driver
Figure 10.6 illustrates the working of
the device driver.
System development programs known as programming software allow the users to develop programs
in different programming languages. The process of developing and executing a program involves the
following tasks:
∑ Debugging the program
∑ Linking the various variables and objects with the libraries files
∑ Translating the code from one language to another
∑ Running the machine code to perform the desired task
In order to carry out these tasks, we need the following system development tools:
∑ Language translators
∑ Linkers
∑ Debuggers
∑ Editors
218 Fundamentals of Computers
10.4.2 Linkers
Most of the high-level languages allow the developer to develop a large program containing multiple
modules. Linker arranges the object code of all the modules that have been generated by the language
translator into a single program. The execution unit of the computer system is incapable of linking all the
modules at the execution time and therefore, linker is regarded as one of the important software because of
its ability to combine all the modules into a single program. Linker assembles the various objects generated
by the compiler in such a manner that all the objects are accepted as a single program during execution.
Linker also includes the links of various objects, which are defined in the runtime libraries. In many cases,
linker inserts the symbolic address of the objects in place of their real address. Figure 10.8 illustrates the
working of a linker.
While debugging a program, the debugger performs a number of functions other than debugging, such as
inserting breakpoints in the original code, tracking the value of specific variables, etc. In order to debug the
program, a debugger helps us to perform the following tasks:
∑ Step-by-step execution of a program
∑ Back tracking for checking the previous steps
∑ Stopping the execution of the program until the errors are corrected
10.4.4 Editors
Editor is a special program that allows the user to work with text in the computer system. It is used for the
documentation purposes and enables us to edit the information present in an existing document or a file.
The editor enables us to perform the various editing operations such as copy, cut and paste while editing the
text. On the basis of the content edited by the editors, they are divided into the following categories:
∑ Text editor It is used to edit plain text. An operating system always includes a text editor for
updating the configuration files.
∑ Digital audio editor It is used to edit the information related to the audio components of a
multimedia application. These editors are used in audio applications where editing the music and the
sound signals is necessary.
∑ Graphics editor It is used to edit the information related to the graphical object. These editors
are generally used in the multimedia applications where the user is working with multiple animation
objects.
∑ Binary file editor It is used to edit the digital data or the binary data, i.e., data having strings of
0s and 1s.
∑ HTML editor It is used to edit the information included in the web pages.
220 Fundamentals of Computers
∑ Source code editor It is used to edit the source code of a program written in a programming
language such as C, C++ and Java.
Standard application programs, also known as general-purpose application programs, are programs that
perform certain common information processing tasks for the users. For example, preparing documents such
as letters and notes are common among almost all organisations as well as individuals. Similarly, creating
and managing databases of products and employees are very common activities in large organisations.
Ready-to-use programs for such applications are available from hardware or software vendors. These
programs would not only increase significantly the productivity of users but also decrease the investment in
terms of time and cost. Examples of standard application programs include:
∑ Word processor
∑ Spreadsheet
∑ Database Manager
∑ Desktop Publisher
∑ Web Browser
We shall briefly discuss some of these programs in this section.
10.5.2 Spreadsheet
Spreadsheet is an application software that enables the user to maintain a worksheet in which information
is stored in different cells. Each cell in the spreadsheet can contain numeric and alphanumeric data.
Spreadsheet is also used as a computational tool by applying formulas on the values of cells. If we change
the value of a cell in a spreadsheet, then all the values, which are dependent on that value, get automatically
updated according to the new value. As a result, the users, who need to store and maintain financial
information, always prefer a spreadsheet for storing the information.
MS Excel is the most common example of the spreadsheet software. Figure 10.10 shows the default
window of MS Excel.
columns. In the hierarchical model, records are arranged in the form of a tree where each record is attached
with one parent node and one or more child nodes. In the network model, data is arranged in the form of a
network where each node is connected with one or more parent nodes as well as child nodes. Figure 10.11
shows the arrangement of records in different data models of the DBMS.
DBMS comprises of different components, which are responsible for performing a specific task in the
database system. Some of the components of DBMS are as follows:
∑ Data structure Data structure refers to a storage mechanism that is used to store multiple values
as a single entity. In DBMS, different types of data structures are used to store the information related
to an entity. These data structures include:
❏ File It refers to a collection of multiple records.
❏ Record It refers to a collection of multiple values of different data types related to one entity.
❏ Field It refers to a set of different values having similar data type.
∑ Transaction mechanism DBMS always includes a transaction mechanism, which ensures that
the basic properties of the database system are not affected by the processing of the transactions.
A transaction mechanism included in a database system consists of the following properties:
❏ Atomicity The transaction mechanism should complete either all tasks included in a transaction
processing or none of them.
❏ Consistency The transaction mechanism should be capable of maintaining consistency in the
information stored in the multiple files of DBMS after the processing of a transaction.
❏ Isolation The transaction mechanism should not allow any sub process of the transaction to use
the intermediate data of another transaction.
❏ Durability The transaction mechanism should be capable of providing information related to
the transactions, which have been processed to change the information stored in the database.
∑ Database query language DBMS includes a query language system, which enables a user to
perform various operations such as searching and updating the information stored in the database.
There are situations where organisations need to develop their own programs to accomplish certain tasks
that are unique to their areas of operations. Similarly, individuals like scientists, engineers, accountants,
teachers and other professionals write their own programs to solve their problems. Such programs are
224 Fundamentals of Computers
known as unique application programs or application-specific programs. These programs are also referred
to as end-user application programs. Examples of unique applications include:
∑ Managing the inventory of a store
∑ Preparing pay-bills of employees in an organisation
∑ Processing examination results of students
∑ Reserving seats in trains or airlines
∑ Analysing mathematical models
∑ Computing personal income tax
∑ And many more
These programs are usually developed in one of the high-level languages, such as C, C++ or Java and
therefore, developing such programs in-house would require skilled programmers with deep knowledge not
only in programming languages but also in programming environment.
We will discuss below in this section two applications which are usually developed in-house to suit the
user’s unique requirements.
deduction, etc. A pay-roll system is an effective and efficient way of computing the salary of employees
as it eliminates the manual task of performing computations and automates most of the tasks related to
pay-roll processing.
A pay-roll system can be custom built or it can be an off-the-shelf application software. Several ERP
products include a dedicated module on pay-roll processing which is particularly used in enterprise-wise
implementation of pay-roll processing. A pay-roll system can also be used to print or e-mail the salary slips
of employees.
Problems that can be solved through a computer may range in size and complexity. Since computers do not
possess any common sense and cannot make any unplanned decisions, the problem, whether it is simple or
complex, has to be broken into a well-defined set of solution steps for the computer to implement.
Problem solving is the process of solving a problem in a computer system by following a sequence of
steps. The major steps that we need to follow for solving a problem are:
1. Preparing hierarchy chart A hierarchy chart shows the top-down solution of a problem. In case
of large problems, we can break them into parts representing small tasks, prepare several algorithms
and later combine them into one large algorithm.
2. Developing algorithm An algorithm is a sequence of steps written in the form of English phrases
that specify the tasks that are performed while solving a problem. It involves identifying the variable
names and types that would be used for solving the problem.
3. Drawing flowchart A flowchart is the graphical representation of the flow of control and logic in
the solution of a problem. The flowchart is a pictorial representation of an algorithm.
4. Writing Pseudocode Pseudocode is pretty much similar to algorithms. It uses generic syntax for
describing the steps that are to be performed for solving a problem. Along with the statements written
using generic syntax, pseudocode can also use English phrases for describing an action.
pay of an employee in an organisation. Since the chart graphically illustrates the structure of a program, it is
also known as a structure chart.
While developing a computer program, we may treat each subtask as a module and prepare computer
code for testing independently. This approach is popularly known as modular programming. Note that the
hierarchy chart does not provide any detail about program logic. We have to use the tools discussed below
to prepare logic for each task.
10.7.2 Algorithms
Algorithms help a programmer in breaking down the solution of a problem into a number of sequential
steps. Corresponding to each step a statement is written in a programming language; all these statements
are collectively termed as a program. The following is an example of an algorithm to add two integers and
display the result:
There is a time and space complexity associated with each algorithm. Time complexity specifies the
amount of time required by an algorithm for performing the desired task. Space complexity specifies the
amount of memory space required by an algorithm for performing the desired task. When solving a complex
problem, it is possible to have more than one algorithm to provide the required solution. The algorithm that
takes less time and requires less memory space is the best one.
10.7.3 Flowcharts
A flowchart can be defined as the pictorial representation of a process, which describes the sequence and
flow of the control and information in a process. The flow of information is represented in a flowchart in a
step-by-step form. This technique is mainly used for developing business workflows and solving problems
using computers.
Flowchart uses different symbols for depicting different activities, which are performed at different
stages of a process. The various symbols used in a flowchart are as follows:
∑ Start and end It is represented by an oval
or a rounded rectangle in a flowchart. It is used to
represent the starting and the ending of a process.
Every process starts and ends at some point so a
flowchart always contains one start as well as one Fig. 10.14 Start and end symbol
end point. Figure 10.14 shows the start and the end
symbols used in a flowchart.
∑ Input or output It is represented by a parallelogram in a
flowchart. It is used to represent the inputs given by the user
Fig. 10.15 Input or output symbol
to the process and the outputs given by the process to the user.
Figure 10.15 shows the input or output symbol.
Flowchart that outlines the main segments of a program
or that shows less details is a macro flowchart
10.7.4 Pseudocodes
Analysing a detailed algorithm before developing a program
is very time consuming. Hence, there arises a need of a
specification that only focuses on the logic of the program.
Pseudocodes serve this purpose by specifying only the
logic, which is used by the programmer for developing a
computer program.
Pseudocode is not written using specific syntax of
a programming language rather it is written with a
combination of generic syntax and normal English language. Fig. 10.20 Flowchart of addition of two numbers
228 Fundamentals of Computers
It helps the programmer understand the basic logic of the program after which it is the programmer’s choice
to write the final code in any programming language.
The example of a pseudocode to add two numbers and display the result is shown below:
After the pseudocode for a computer program has been written, it is used to develop the source code
for the computer program. The source code is developed using a programming language, which can be
an assembly language or a high level programming language. After the source code has been written, the
programmer detects and eliminates any errors in the program so that the program generates the desired
output after its execution.
While writing the pseudocode for a problem, it is necessary to define all the logics used in the pseudocode
for developing the program. Pseudocode of a problem should be able to describe the sequence of execution
of statements and procedures specified in the program. The sequence of the execution of instructions
determines the basic structure of a program or the logic used to solve a problem.
The basic structure of a program comprises of different sets of the statements, whose execution is
dependent on some conditions and decisions. These conditions and decision-making statements are
specified in a control structure. Depending upon the sequence of the execution of the statements, the control
structures are categorised into the following types:
• Sequence structure The execution of the statements in a sequence structure is done sequentially,
i.e., all the statements are executed in the same order as they are written in the program.
• Selection structure In the selection structure, two sets of statement blocks are written in a
program along with one or more conditions. The execution of a particular block’s statements occurs
only if the conditional statement specified at the beginning of the block is true. A selection structure is
also known as branching structure.
• Repetition structure In the repetition structure, a block of two or more instructions is specified
along with a conditional statement. The execution of these instructions is repeated many times if the
conditional statement is true. This structure is also known as looping structure.
We must incorporate these program constructs into the program design, whether as a flowchart or as a
pseudocode. We can also combine the constructs, if necessary. For example, a selection structure can be a
part of a looping structure.
simple computations, which do not require any decision-making. Figure 10.21 shows the representation of
statements in the sequence structure.
Figure 10.22 shows the representation of statements in the If-Then-Else selection structure.
Figure 10.23 shows the representation of statements in the Do-while repetition structure.
Whenever a user wants to use a computer for solving a problem, he/she has to perform various interrelated
tasks in a systematic manner. A user can not get the solution of a problem by simply providing input to the
computer without preparing the base for solving the problem. The working process of a computer is similar
to the human mind, which first analyses the complete situation of a problem, its causes and its parameters,
and then decides the way to solve the problem on the basis of available parameters. All the activities, which
have to be performed by a user in order to solve a problem using computer, are grouped into three phases:
∑ Understanding the problem
∑ Developing a program
∑ Executing the program
232 Fundamentals of Computers
1. Understanding the problem It is the first stage of problem solving using a computer. In this
stage, two basic activities are performed by the user. These activities are as follows:
❏ Identifying parameters and constraints A user has to identify the role of different
parameters in solving the problem, i.e., the user must have the knowledge about the relation
between the various parameters and the problem itself. After identifying the problem and its
parameters, the user has to identify the associated constraints that need to be considered in order
to generate an accurate solution of the problem. The identification of parameters and constraints
help in choosing the most appropriate method to solve the problem.
❏ Collecting information After analysing the problem and choosing the solution method, a
user has to collect the information related to the identified parameters of the problem. In order
to collect the information, a user can use the documents and reports pertaining to the previous
versions of the problem. The collected information helps in designing the layout of the output or
solution of the problem.
2. Developing a program After analysing the problem, a user has to plan for developing the
program, which will provide the solution of the program after execution. A program includes multiple
instructions having a specific syntax. For developing a program, a user has to perform the following
activities:
❏ Identifying the logical structure It is the most important activity in which a user prepares
the logical structure of the program by analysing the various tasks that need to be performed for
solving the problem. In order to prepare the logical structure of a program, a user performs the
following task:
(i) Writing algorithm to list the various steps.
(ii) Drawing flowchart to represent the flow of information.
(iii) Writing pseudocode to specify the programming specifications.
❏ Writing the computer program After preparing the logic, a user has to write the program
code in a particular programming language. The program code should be syntactically and
semantically correct in order to generate the desired result.
❏ Debugging the program After writing the complete program, a user has to apply the
debugging techniques for removing any possible errors in the program. Several programming
environments provide debugging tools that aid the users in effectively and efficiently remove the
errors in a program.
3. Executing the program After developing an error free program, it needs to be executed in order
to view the solution of the original problem.
Chapter Summary
Computer software is one of the most important components of a computer system. The other component of
a computer system is computer hardware. Computer software helps the computer hardware in carrying out their
functions in an effective manner. Computer software can be either system software or application software.
System software is responsible for managing and controlling the hardware resources of a computer system.
System software can be further divided into two major categories, which are system management programs and
system development programs. Operating system, utility programs and device drivers are some of the examples of
Computer Software 233
system management programs. Typical examples of system development programs include linkers, debuggers, and
editors.
Application software is specially designed to cater the information processing needs of end users. Like system
software, application software can be further divided into two major categories, which are standard application
programs and unique application programs. Word processor, spreadsheet, database manager, desktop publisher
and web browser are some of the standard application programs. The unique application programs are specially
developed by the users to meet their specific requirements. For examples, inventory management system and
pay-roll system comes under the category of unique application programs.
Computer based problem solving requires a series of steps such as preparing hierarchy charts, developing
algorithms, drawing flowcharts, writing pseudocodes, and developing and executing programs.
Review Questions
1. A computer system consists of two types of components, ______________ components and ______________
components.
2. Computer software is classified into two categories, namely, ______________ and ______________.
3. System software consists of two groups of programs: ______________ and ______________.
4. ______________ is responsible for managing the allocation of devices and resources to the various processes.
5. Device driver acts as a translator between the ______________ and the ______________ .
6. A computer system requires special software called ______________ in order to interact with the I/O devices.
7. Language translator converts the high-level language program into the low-level program called _____________.
8. Application software includes two types programs: ______________ and ______________ .
9. ______________ enables you to enter text in the document in a particular format.
10. Spreadsheet is generally used to calculate the values stored in a cell by applying ______________ on the values
of other cells.
11. Database refers to a set of records, which are stored in a ______________ in the computer system.
12. In the hierarchical model, records are arranged in form of a ______________ in which each record is attached
with one parent node and one or more children node.
13. Desktop publishing system is also known as ______________ .
14. Pseudocode is not written using any specific ______________ of a programming language.
15. ______________ is a pictorial representation of a process, which describes the sequence and flow of the control
and information in a process
16. In the ______________ structure, multiple statements are written in a simple sequence in the program.
7. A program in which multiple instructions of high-level language or assembly language instructions are written is
generally known as:
A. Psuedocode B. Source code C. Object code D. Machine code
8. A small program, which provides additional capabilities to the operating system, is known as:
A. Application program B. System development program
C. Utility program D. Translator program
9. A software, which links different elements of an object code with the library files, is known as:
A. Editor B. Linker C. Loader D. Debugger
10. Which of the following options is not a utility system?
A. Virus scanner B. System profiler C. Disk defragmenter D. Debugger
11. Which of the following is not a data structure?
A. Record B. Table C. File D. Field
12. Which of the following data models enables us to arrange data files in the tree structure?
A. Network model B. Relational model C. Hierarchical model D. None of the above
13. The software, which enables an end user to edit text and other components of a publishing document, is known
as:
A. Word processor B. Editor
C. Desktop publishing system D. Debugger
14. A control structure in which only a single set of instructions executes several times is known as:
A. Repetition structure B. Sequence structure C. Selection structure D. None of the above
15. Which of the following structure executes the set of instruction only when the given condition is false?
A. If-Then B. Do-While C. If-Then-Else D. Repeat-Untill
Discussion Questions
1. What do you know about the components of a computer system?
2. Explain the different types of computer software.
3. What do you understand by the term system software?
4. Explain the major functions of an operating system.
5. What is the purpose of translator programs?
6. List a few popular standard application programs.
7. Explain the application of system development programs.
8. What does utility program mean?
9. What are the basic functions of DBMS?
10. What do you know about inventory management system?
11. What is meant by unique application program?
12. What is a language translator?
13. Differentiate between a compiler, an assembler and an interpreter.
14. What is a debugger?
C HA PTE R 11
OPERATING SYSTEMS
Chapter Objectives
11.1 INTRODUCTION
An operating system (OS) is a software that makes the computer hardware to work. While the hardware
provides ‘raw computer power’ , the OS is responsible for making the computer power useful for the users.
As discussed in the previous chapter, the OS is the main component of system software and therefore must
be loaded and activated before we can accomplish any other task.
The operating system provides an interface for users to communicate with the computer. It also manages
the use of hardware resources and enables proper implementation of application programs. In short,
the operating system is the master control program of a computer. Figure 11.1 shows the different roles
performed by an operating system. The main functions include:
• Operates CPU of the computer.
• Controls input/output devices that provide the interface between the user and the computer.
• Handles the working of application programs with the hardware and other software systems.
• Manages the storage and retrieval of information using storage devices such as disks.
Every computer, irrespective of its size and application,
needs an operating system to make it functional and
useful. Operating systems are usually prewritten by
the manufacturers and supplied with the hardware and
are rarely developed in-house owing to its technical
complexity. There are many operating systems developed
during the last few decades but the popular among them
are MS-DOS, Windows 2000, Windows XP, Windows
Server 2003, UNIX and Linux.
In this chapter we shall discuss in detail the various
functions of operating systems, different types of operating
systems and their services, and the types of user interfaces
available. Fig. 11.1 The roles of an operating system
A series of developments in the computer architecture led to the evolution of the operating system during
the later half of the 20th century. During the 1940’s, there was no operating system and assembly language
was used to develop programs that could directly interact with the hardware. The computer systems during
this period were mainly used by the researchers, who were both the programmers as well as the end users of
the computer system.
During the 1950s, more number of people started using the computer systems. This led to a repetition of
tasks as everyone started developing their own programs and device drivers. Different people created device
drivers for the same input and output devices. To avoid this repetition of tasks, various batch processing
operating systems such as BKY, CAL and Chios were developed during this period. FORTRAN Monitor
System, General Motors Operating System and Input Output System are the other operating systems
developed in the 1950s. The operating systems developed during this period were capable of performing
only a single task at a time.
Operating Systems 239
During the 1960s, multi-tasking operating systems were developed. These operating systems ensured
better utilisation of resources by allowing the multiple tasks to be performed simultaneously. They also
allowed multiple programs to remain in memory at the same time. Central Processing Unit (CPU) executed
multiple processes at a single time and also handled the hardware devices attached to the computer
system. These operating systems used the concepts of spooling and time-sharing model for achieving the
multi-tasking functionality. The various operating systems developed during the 1960s include Admiral,
Basic Executive System, Input Output Control System and SABRE (Semi-Automatic Business Related
Environment).
During the 1970s, a major breakthrough was achieved in the development of operating system with the
introduction of UNIX by AT&T Bell Labs. UNIX supported a multi-user environment where multiple users
could work on a computer system. The core functionality of UNIX resided in a kernel that was responsible
for performing file, memory and process management. UNIX also came bundled with utility programs for
performing specific tasks. The other operating systems that were introduced in the 1970s include DOS/VS,
OS/VS1and OpenVMS.
During the 1980s, some key operating systems were developed including MS-DOS, HP-UX and
Macintosh. MS-DOS was developed by Microsoft and could be installed on desktop Personal Computers
(PCs), such as Intel 80x86 PCs. HP-UX was similar to UNIX and was developed by Hewlett Packard.
This operating system could be installed on the HP PA RISC computer systems. Macintosh was developed
by Apple computers and could be installed on the desktop PCs such as Motorola 680x0. MS DOS and
Macintosh became quite popular in the 1980’s and are still in use.
A number of operating systems were developed during the 1990s including Windows 95, Windows 98,
Windows NT, FreeBSD and OS/2. Windows 95, Windows 98 and Windows NT were GUI based operating
systems developed by Microsoft. FreeBSD was similar to UNIX and was available free of cost. OS/2 was
introduced by IBM and could be installed on Intel/AMD Pentium and Intel 80x86 based computer systems.
The decade of 1990 revolutionised the way of computing through robust GUI-based operating systems and
fast processing devices.
The first decade of 21st century has seen the development of operating systems such as MAC OS X,
Windows 2000, Windows Server 2003, Windows ME and Windows XP. With the advent of Internet,
security has been the prime focus of the operating systems of this era.
The main function of an operating system is to manage the resources such as memory and files of a
computer system. The operating system also resolves the conflicts that arise when two users or programs
request the same resource at the same time. Therefore, the operating system is also called the resource
manager of a computer system. The currently used operating systems such as Windows 2000, Windows
Server 2003 and Linux also support networking that allows the sharing of files and resources such as printer
and scanner. The following are some of the important functions of an operating system:
∑ Process management It manages the processes running in a computer system. A process is
basically a program that is being currently run by a user on a computer system. For example, a word
processor application program such as Microsoft Word runs as a process in a computer system.
∑ Memory management It manages the memory resources of a computer system. There are
various memory resources of a computer system including primary memory or Random Access
Memory (RAM) and secondary memory like hard disk and Compact Disk (CD). All the programs
240 Fundamentals of Computers
are loaded in the main memory before their execution. It is the function of the operating system to
determine how much memory should be provided to each process.
∑ File management It manages the files and directories of a computer system. A file can be defined
as a collection of information or data that is stored in the memory of a computer system. Every file
has a unique name associated with it. The organisation of files and directories in a computer system
is referred as file system. An operating system allows us to create, modify, save, or delete files in a
computer system.
∑ Device management This function of operating system deals with the management of peripheral
devices, such as printer, mouse and keyboard attached to a computer system. An operating system
interacts with the hardware devices through specific device drivers. The primary task of an operating
system is to manage the input/output operations performed by the end users.
∑ Security management It ensures security for a computer system from various threats such
as virus attacks and unauthorised access. An operating system uses various techniques, such as
authentication, authorisation, cryptography, etc for ensuring security of a computer system.
Figure 11.2 depicts the various functions of an operating system.
Process management involves the execution of various tasks such as creation of processes, scheduling of
processes, management of deadlocks and termination of processes. When a process runs in a computer
system, a number of resources such as memory and CPU of the computer system are utilised. It is the
responsibility of an operating system to manage the running processes by performing tasks such as resource
allocation and process scheduling. The operating system also has to synchronise the different processes
effectively in order to ensure consistency of shared data.
Generally, only a single process is allowed to access the CPU for its execution at a particular instant
of time. When one process is being processed by the CPU, the other processes have to wait until the
execution of that particular process is complete. After the CPU completes the execution of a process, the
resources being utilised by that process are made free and the execution of the next process is initiated. All
the processes that are waiting to be executed are said to be in a queue. In some cases, a computer system
supports parallel processing allowing a number of processes to be executed simultaneously.
A process consists of a set of instructions to be executed called process code. A process is also associated
with some data that is to be processed. The resources that a process requires for its execution are called
process components. There is also a state associated with a process at a particular instant of time called
Operating Systems 241
process state. Similar to these concepts, there are a number of concepts associated with the process
management function of an operating system. Some of these key concepts are:
∑ Process state
∑ Process Control Block (PCB)
∑ Process operations
∑ Process scheduling
∑ Process synchronisation
∑ Interprocess communication
∑ Deadlock
process before terminating. The child process can also be terminated by the parent process if the task
performed by the child process is no longer needed. In addition, when a parent process terminates, it has
to terminate the child process as well because a child process cannot run when its parent process has been
terminated.
The termination of a process when all its instructions have been executed successfully is called normal
termination. However, there are instances when a process terminates due to some error. This is called
abnormal termination of a process.
policy, processes are executed in first come first serve basis, which means the next process is executed only
when currently running process finishes its execution. The selection of the next process, however, may be
done considering the associated priorities. Operating systems perform the task of assigning priorities to
processes based on certain scheduling algorithms. Some of the key scheduling algorithms are:
∑ First Come First Served (FCFS) scheduling In this scheduling algorithm, the first process in
a queue is processed first.
∑ Shortest Job First (SJF) scheduling In this scheduling algorithm, the process that requires
shortest CPU time is executed first.
∑ Priority scheduling In this scheduling algorithm, a priority is assigned to all the processes and
the process with highest priority is executed first. Priority assignment of processes is done on the basis
of internal factors such as CPU and memory requirements or external factors such as user’s choice.
The priority scheduling algorithm can support either preemptive or non-preemptive scheduling
policy.
∑ Round Robin (RR) scheduling In this scheduling algorithm, a process is allocated the CPU for
a specific time period called time slice or time quantum, which is normally of 10 to 100 milliseconds.
If a process completes its execution within this time slice then it is removed from the queue otherwise
it has to wait until the next time slice.
Fig. 11. 6 The shared memory method Fig. 11.7 The message passing method for
of interprocess communication the interprocess communication
11.4.7 Deadlock
Deadlock is a condition that occurs when multiple processes wait for each other to free up resources and
as a result all the processes remain halted. Let us understand the concept of deadlock with the help of
an example. Suppose there are two processes P1 and P2 running in a computer system. P1 requests for a
resource, such as printer that is being utilised by the P2 process. As a result, the P1 process has to wait till
the time P2 completes its processing and frees the resource. At the same time, the P2 process requests for
246 Fundamentals of Computers
a resource, such as shared data that has been locked by the process P1. Thus, both the processes end up
waiting for each other to free up the required resources. This situation is called a deadlock.
The following are some of the reasons due to which a deadlock situation may arise.
∑ Mutual exclusion In mutual exclusion, processes are not allowed to share resources with each
other. This means that if one process has control over a resource, then that resource cannot be used by
another process until the first process releases the resource.
∑ Hold and wait In this condition, a process takes control of a resource and waits for some other
resource or activity to complete.
∑ No preemption In this condition, a process is not allowed to force some other process to release
a resource.
There are a number of methods through which the deadlock condition can be avoided. Some of these
methods are:
∑ Ignore deadlock In this method, it is assumed that a deadlock would never occur. There is a good
chance that a deadlock may not occur in a computer system for a long period of time. As a result, the
ignore deadlock method can be useful in some cases.
∑ Detect and recover from deadlock In this method, the deadlock is first detected using
allocation /request graph. This graph represents the allocation of resources to different processes.
After a deadlock has been detected, a number of methods can be used to recover from the deadlock.
One way is preemption in which a resource held by one process is provided to another process. The
second way is rollback in which the operating system keeps a record of the process states and makes
a process roll back to its previous state; thus eliminating the deadlock situation. The third way is to
kill one or more processes to overcome the deadlock situation.
∑ Avoid deadlock In this method, a process requesting a resource is allocated the resource only if
there is no possibility of deadlock occurrence.
Memory management function of an operating system helps in allocating the main memory space to the
processes and their data at the time of their execution. Along with the allocation of memory space, memory
management also perform the following activities:
∑ Upgrading the performance of the computer system
∑ Enabling the execution of multiple processes at the same time
∑ Sharing the same memory space among different processes
Memory management is one of the most important functions of operating system because it directly
affects the execution time of a process. The execution time of a process depends on the availability of data
in the main memory. Therefore, an operating system must perform the memory management in such a
manner that the essential data is always present in the main memory. An effective memory management
system ensures accuracy, availability and consistency of the data imported from the secondary memory to
the main memory.
Operating Systems 247
11.5.1 Segmentation
Segmentation refers to the technique of
dividing the physical memory space into
multiple blocks. Each block has a specific
length and is known as a segment. Each
segment has a starting address called the
base address. The length of a segment
determines the available memory spaces
in the segment. Figure 11.8 shows the
organisation of segments in a memory unit.
The location of data values stored in a
segment can be determined by the distance
of the actual position of data value from
the base address of the segment. The
distance between the actual position of data
and the base address of segment is known
as displacement or offset value. In other Fig. 11.8 Memory unit having segments
words, whenever it is required to obtain
data from the segmented memory then the
actual address of the data is calculated by adding the base address of the segment and with offset value.
The base address of the segment and the offset value is specified in a program instruction itself. Figure 11.9
shows how the actual position of an operand in a segment is obtained by adding the base address and the
offset value.
248 Fundamentals of Computers
11.5.2 Paging
Paging is a technique in which the main memory of the computer system is organised in the form of equal
sized blocks called pages. In this technique, the addresses of the occupied pages of the physical memory are
stored in a table, which is known as page table.
Paging enables the operating system to obtain data from the physical memory location without
specifying its lengthy memory address in the instruction. In this technique, a virtual address is used to
map the physical address of the data. The length of the virtual address is specified in the instruction and
is smaller than the physical address of the data. It consists of two different numbers, first number is the
address of a page called virtual page in the page table and second number is the offset value of the actual
data in the page. Figure 11.10 shows how the virtual address is used to obtain the physical address of an
occupied page of physical memory using a page table.
Fig. 11.10 Obtaining data from a page using the paging technique
Operating Systems 249
11.5.3 Swapping
Swapping is a technique used by an operating system for efficient management of memory space of a
computer system. Swapping involves performing two tasks called swapping in and swapping out. The task
of placing the pages or blocks of data from hard disk to the main memory is called swapping in. On the
other hand, the task of removing pages or blocks of data from main memory to hard disk is called swapping
out. The swapping technique is useful when a large program has to be executed or some operations have to
be performed on a large file.
The main memory in a computer system is limited.
Therefore, to run a large program or to perform some
operation on a large file, the operating system swaps
in certain pages or blocks of data from the hard disk.
To make space for these pages or blocks of data in
the main memory, the operating system swaps out the
pages or blocks of data that are no longer required
in the main memory. The operating system places
the swapped out pages or blocks of data in a swap
file. A swap file is the space in the hard disk that is
used as an extension to the main memory by the
operating system. Figure 11.11 shows the technique
of swapping used by the operating system for memory Fig. 11.11 Swapping of pages
management.
File management is defined as the process of manipulating files in a computer system. A file is a collection
of specific information stored in the memory of the computer system. File management includes the process
of creating, modifying and deleting the files. The
following are some of the tasks performed by the file
management function of operating system:
∑ It helps in creating new files and placing them at
a specific location.
∑ It helps in easily and quickly locating the files in
the computer system.
∑ It makes the process of sharing the files among
different users easy.
∑ It helps store the files in separate folders known
as directories that ensure better organisation of
data.
∑ It helps modify the content as well as the name
of the file as per the user’s requirement.
Figure 11.12 shows the general hierarchy of file
storage in an operating system.
In Fig. 11.12, the root directory is present at the Fig. 11.12 The general hierarchy of file
highest level in the hierarchical structure. It includes all storage in an operating system
250 Fundamentals of Computers
the subdirectories in which the files are stored. Subdirectory is a directory present inside another directory
in the file storage system. The directory based storage system ensures better organisation of files in the
memory of the computer system.
The file management function of OS is based on the following concepts:
∑ File attributes It specifies the characteristics, such as type and location that completely describe
a file.
∑ File operations It specifies the tasks that can be performed on a file such as opening and closing
a file.
∑ File access permissions It specifies the access permissions related to a file such as read
and write.
∑ File systems It specifies the logical method of file storage in a computer system. Some of the
commonly used file systems include FAT and NTFS.
Device management is another important function of the operating system. Device management is
responsible for managing all the hardware devices of the computer system. It may include the management
of the storages devices as well as the management of all the input/output devices of the computer system. It
is the responsibility of the operating system to keep a track of the status of all the devices in the computer
system. The status of any computer device, internal or external, may be either free or busy. If a device
requested by a process is free at a specific instant of time, the operating system allocates it to the process.
An operating system manages the devices in a computer system with the help of device controllers and
device drivers. Each device in the computer system is equipped with a corresponding device controller.
For example, the various device controllers in a computer system may be disk controller, printer controller,
tape-drive controller and memory controller. All these device controllers are connected with each other
through a system bus. The device controllers are actually the hardware components that contain some
buffer registers to store the data temporarily. The transfer of data between a running process and the various
devices of the computer system is accomplished only through these device controllers.
Apart from device controllers, device drivers also help the operating system to manage and allocate the
devices to different processes in an efficient manner. Device drivers are the software programs that are used
by the operating system to control the functioning of various devices in a uniform manner. An operating
system communicates with the device controllers with the help of device drivers while allocating the
devices to the various processes running on the computer system. The device drivers may also be regarded
as the software programs acting as an intermediary between the processes and the device controllers.
252 Fundamentals of Computers
Figure 11.13 shows the mechanism of allocating a device to a process by the operating system.
Figure 11.3 shows how a device or resource can be allocated to an application program by the operating
system. If an application program or process, during its execution, requires a device to perform a specific
task, it generates a request. This request is handled by the operating system through the corresponding
device driver and device controller.
The device controller used in the device management operation usually includes three different registers:
command, status and data. The command register is used to contain the information regarding the request
issued by an application program. It is the only register of device controller that specifies the type of service
requested by the application program. The status register is used to keep track of the status of the device.
It contains information about whether or not the device is free to service the request of an application
program. The data register holds the necessary data required to be transferred between the application
program and the corresponding device.
Apart from handling the commands issued by the application program, the other major responsibility of
the device management function is to implement the Application Programming Interface (API). API is the
only interface through which the application programs running on the computer system can communicate
with the kernel of the operating system to issue the various device-related requests. It can also be regarded
as the set of functions or routines that can be called by the application programs to access various services
required for their proper execution. This API provides a uniform interface for accessing all the device
controllers in the computer system.
Operating Systems 253
The security management function of an operating system helps in implementing mechanisms that
secure and protect the computer system internally as well as externally. Therefore, an operating system is
responsible for securing the system at two different levels, which are internal security and external security.
Internal security refers to the protection of activities of one process from the activities of another
process. The term internal security may also be regarded as system protection. The internal security of the
computer system also ensures the reliability of the computer system. There may be a number of processes
running in the computer system concurrently. It is the responsibility of the operating system to make sure
that only one process at a time has access to a particular resource of the computer system. Most of the
operating systems use the concept of least privilege to implement internal security. In this concept, each
process or program running in the computer system is assigned enough privileges to access the various
resources of the computer system. If two processes running on the computer system send a request to the
operating system for the allocation of same device or resource, the kernel of the operating system checks
the privileges of both the processes. The process with more privileges will be serviced by the operating
system. The process with fewer privileges will be blocked by the operating system from gaining access to
the particular computer device.
External security refers to the implementation of mechanisms for securing the data and programs stored
in the computer system as well as the various resources of the computer system against unauthorised access.
The term external security may also be regarded as system security. External security is particularly required
when a computer system is either on a network or connected to the Internet. The system security can be
desecrated either intentionally or accidentally. It is easier for the operating system to implement the security
mechanisms for accidental security breaches. Most of the external security mechanisms implemented by the
operating system are only to prevent the computer system against accidental misuse. The various external
threats, accidental or intentional, to the computer system may include reading, writing or deletion of
computer data by an unauthorised user and accessing of computer resources or devices by an unauthorised
user. It is not possible to prevent the computer system from external threats only at the operating system
level. Apart from the operating system, the three other major levels at which external security should be
implemented are physical, human and network. The most common external security mechanism employed
by most operating systems is a software firewall. The software firewall is software included in the operating
system that is specially designed to prevent the computer system against unauthorised users or programs
from gaining access to the data and programs stored in the computer system.
Many different types of operating systems have evolved till date. As the computers have improved in terms
of speed, reliability, and cost so have the operating systems in terms of their capabilities. The operating
systems supported by first generation computers were not very powerful. They were only designed and
developed to cater the needs of a single user at a time. Also, the users of these operating systems were
capable of performing only one task at a time. However, there has been a tremendous amount of
improvement in operating systems in the recent years. The modern-day operating systems allow multiple
users to carry out multiple tasks simultaneously. Based on their capabilities and the types of applications
supported, the operating systems can be divided into the following six major categories:
∑ Batch processing operating systems
254 Fundamentals of Computers
from the user and to provide the outputs to the user. However, the types of inputs taken by the UI and the
types of outputs provided by the UI may vary from one application to another.
The UI of any operating system can be classified into one of the following types:
∑ Graphical User Interface (GUI)
∑ Command Line Interface (CLI)
Figure 11.15 shows the command line user interface of MS-DOS. In order to perform a task, we need to
type a command at the command prompt denoted by C:\>. For example, to copy a text file, say, a1.txt, from the
C drive of our computer system. to the D drive, we need to type the copy command at the command
prompt, as shown in Fig. 11.16.
Figure 11.16 shows that a text file from the C drive of the computer system has been copied to the
D drive of the computer system. However, before typing the copy command at the command prompt, we
need to make sure that the file, a1.txt, exists in the C drive of the computer system.
To date, many operating systems have been developed that suit different requirements of the users. Some of
these operating systems became quite popular while others did not do well. The following are some of the
popular operating systems:
∑ MS-DOS
Operating Systems 259
∑ UNIX
∑ Windows
11.11.1 MS-DOS
MS-DOS was developed and introduced by Microsoft in 1981. It is a single-user and single-tasking
operating system developed for personal computers. MS-DOS was specifically designed for the family of
Intel 8086 microprocessors. This operating system provides a command line user interface, which means
that a user needs to type a command at the command line for performing a specific task. The CLI of
MS-DOS is more commonly known as DOS prompt. The user interface of MS-DOS is very simple to use
but not very user-friendly because of its non-graphical nature. The user has to issue a command to carry out
even a simple task.
The command prompt of MS-DOS only allows the execution of the files with the extensions: .COM
(Command files), .BAT (Batch files) and .EXE (Executable file). The structure of MS-DOS comprises the
following programs:
∑ IO.SYS It is an important hidden and read only system file of MS-DOS that is used to start the
computer system. It is also responsible for the efficient management and allocation of the hardware
resources through the use of appropriate device drivers.
∑ MSDOS.SYS It is another hidden and read only system file that is executed immediately after the
execution of IO.SYS file is finished. MSDOS.SYS acts as the kernel of MS-DOS. It is responsible for
managing the memory, processors and the input/output devices of the computer system.
∑ CONFIG.SYS It is a system file that is used to configure various hardware components of the
computer system so that they can be used by the various applications.
260 Fundamentals of Computers
∑ COMMAND.COM It is the command interpreter that is used to read and interpret the various
commands issued by the users.
∑ AUTOEXEC.BAT It is a batch file consisting of a list of commands that is executed automatically
as the computer system starts up.
The use of various features of MS-DOS is discussed in Chapter 12.
11.11.2 UNIX
UNIX is an operating system that allows several users to perform a number of tasks simultaneously. The
first version of UNIX was introduced during the 1970s. However, since then, it is in constant development
phase for further improving its functionality. UNIX operating system provides a GUI that enables its users
to work in a more convenient environment. UNIX is most suitable for the computers that are connected
to a Local Area Network (LAN) for performing scientific and business related operations. It can also
be implemented on personal computers. The following are the core components of the UNIX operating
system:
∑ Kernel It is the central part of the UNIX operating system that manages and controls the
communication between the various hardware and software components of the computer system. The
other major functions performed by the kernel are process management, memory management and
device management.
∑ Shell It is the user interface of the UNIX operating system that acts as an intermediary between
the user and the kernel of the operating system. Shell is the only program in UNIX operating system
that takes the commands issued by the users and interprets them in an efficient manner to produce the
desired result.
∑ Files and processes The UNIX operating system arranges everything in terms of files and
processes. The directory in this operating system is also considered as a file that is used to house
other files within it. The process is usually a program executed under the UNIX operating system.
Several processes can be executed simultaneously in this operating system and are identified by a
unique Process Identifier (PID) assigned to them.
Figure 11.17 shows the directory structure of UNIX operating system.
The UNIX operating system supports hierarchical directory structure in the form of a tree for arranging
different files in the computer system. The root of the tree is always denoted by slash (/). The current
working directory of the user is denoted by home. There can be several home directories corresponding
to the different users of the UNIX operating system. All the files and directories under the home directory
belong to a particular user. The path of any file or directory in UNIX operating system always starts with
the root (/). For example, the full path of the file word.doc can be represented as /home/its/ag2/mmdata/
word.doc.
The following are some of the significant features of UNIX operating system:
∑ It allows multiple users to work simultaneously.
∑ It allows the execution of several programs and processes at the same time to ensure efficient
utilisation of the processor.
Operating Systems 261
∑ It implements the concept of virtual memory in an efficient manner. This feature enables the UNIX
operating system to execute a program whose size is larger than the main memory of the computer
system.
11.11.3 Windows
Microsoft has provided many operating systems to cater the needs of different users. Microsoft is a well
known name in the development of operating system as well as various software applications. Initially,
Microsoft introduced Windows 1.x, Windows 2.x and Windows 386 operating systems. However, these
operating systems lacked certain desirable features, such as networking and interactive user interface.
Microsoft continued to work towards developing an operating system that met the desirable features of
users and came up with a new operating system in the year 1993, which was known as Windows NT 3.1.
This operating system was specially designed for the advanced users performing various business and
scientific operations. After the release of Windows NT 3.1, several other operating systems were introduced
by Microsoft in the successive years with their own unique features. Table 11.1 lists some of other important
Windows operating system introduced by Microsoft with their release dates and significant features.
262 Fundamentals of Computers
Chapter Summary
Operating system is a system software installed on a computer system that performs several key tasks, such as
process management, memory management, device management, file management, etc. An operating system also
secures the computer system from various threats such as virus and unauthorised access. There are different types
of operating system available such as multi-user, batch processing and embedded. The multi-user operating system
allows multiple users to use the computer system simultaneously. The batch processing operating system processes
CPU bound: Mostly perform computations with little
I/O operations. Scientific and engineering
computations usually fall in this category
the jobs in groups called batches. The embedded operating system is installed on an embedded computer system,
which is primarily used for performing computational tasks in electronic devices.
An end user interacts with an operating system through a user interface, which is of two types, GUI or CLI. A
GUI interface allows the end users to issue commands through point-and-click operations while a CLI interface
allows the end users to issue commands only by typing them at the command prompt. Windows, UNIX and
MS-DOS are some of the most popular operating systems. Windows is a GUI based operating system, while MS-
DOS is a CLI based operating system.
∑ Operating system: It is a system software that manages the hardware and other resources of a computer system and
enables effective user interaction.
∑ Process management: Process management involves the execution of various tasks, such as creation of processes,
scheduling of processes, management of deadlocks and termination of the processes.
∑ Process state: Process state is the condition of a process at a particular instant of time.
∑ Process Control Block: PCB is a data structure associated with a process that provides complete information about
the process.
∑ Process scheduling: Process scheduling is a task performed by an operating system for deciding the priority in
which the processes are allocated the CPU time for their execution.
∑ Process synchronisation: Process synchronisation is the task of synchronising the execution of processes in such a
manner that no two processes have access to the same shared data or resource.
∑ Interprocess communication: Interprocess communication is the method of communication between processes
through which processes interact with each other for gaining access to shared data and resources.
∑ Deadlock: It is a condition that occurs when multiple processes wait for each other to free up resources and as a
result all the processes remain halted.
∑ Memory management: Memory management function of an operating system helps in allocating the main memory
space to the processes and their data at the time of their execution.
∑ File management: File management is defined as the process of manipulating files in a computer system.
∑ Security management: Security management function of an operating system helps in implementing mechanisms
that secure and protect the computer system internally as well as externally.
∑ Batch processing operating system: This operating system processes the jobs by organising them in groups called
batches. It processes only one job at a time.
∑ Multi-user operating system: It allows multiple users to work simultaneously on the same computer system.
∑ Multitasking operating system: It allows a user to carry out multiple tasks at the same time on a single computer
system.
∑ Real-time operating system: It is used for processing critical applications that are required to be executed within a
specific period of time.
∑ Multiprocessor operating system: It allows the use of multiple CPUs in a computer system for executing multiple
processes at the same time.
∑ Embedded operating system: It is installed on an embedded computer system, which is primarily used for
performing computational tasks in electronic devices.
∑ User Interface (UI): UI facilitates communication between an application and its users by acting as an intermediary
between them.
∑ Graphical User Interface: GUI is a type of UI that enables the users to interact with the operating system by means
of point-and-click operations.
∑ Command Line Interface: CLI is a type of UI that enables the users to interact with the operating system by
issuing some specific commands.
∑ Kernel: Kernel is the central part of the UNIX operating system that manages and controls the communication
between the various hardware and software components.
∑ Shell: Shell is the user interface of the UNIX operating system that acts as an intermediary between the user and the
kernel of the operating system.
Review Questions
1. ____________ is a system software that allows the users to interact with the hardware and other resources of a
computer system.
2. In ____________ interface, users type the commands pertaining to the tasks that they want to perform.
3. In ____________ interface, commands are given by means of point-and-click operations performed using a
pointing device, such as mouse.
4. The process of managing the files and directories contained in a computer system is known as ___________.
5. The ___________ state specifies the time when a process is ready for execution but has not been placed in the
ready queue by the operating system.
6. ___________ is a data structure associated with a process that provides complete information about the process.
7. The operating system maintains a table called ___________, which stores the PCBs related to all the processes.
8. The process, which creates a new process using the system call, is called ____________.
9. ____________ is the task performed by an operating system for deciding the priority in which the processes,
which are in ready and waiting states, are allocated the CPU time for their execution.
10. An operating system uses a program called ________ for deciding the priority in which a process is allocated the
CPU time.
11. In __________ scheduling algorithm, a process is allocated the CPU for a specific time period called time slice
or time quantum.
12. ____________ is the task of synchronising the execution of processes in such a manner that no two processes
have access to the same shared data or resource.
13. ____________ is a condition that occurs when multiple processes wait for each other to free up resources and as
a result all the processes remain halted.
14. The ____________ function of an operating system helps in allocating the main memory space to the processes
and their data at the time of their execution.
15. Paging is a technique in which the main memory of the computer system is organized in the form of equal sized
blocks called ______.
16. _________ management is responsible for managing all the hardware devices of the computer system.
17. The ______________ function of an operating system helps in implementing mechanisms that secure and protect
the computer system internally as well as externally.
18. In ___________ operating system, jobs are grouped into groups called batches and assigned to the computer
system with the help of a card reader.
Operating Systems 265
19. In ____________ operating system, multiple users can make use of computer system’s resources simultaneously.
20. UI facilitates communication between a _________ and its ______ by acting as an intermediary between them.
21. ___________ is the central part of the UNIX operating system that manages and controls the communication
between the various hardware and software components.
1. Which of the following program is essential for the functioning of a computer system?
A. MS Word B. Operating system C. MS Excel D. System software
2. Which of the following operating systems makes use of CLI?
A. MS-DOS B. Windows 2000 C. Windows Server 2003 D None of the above
3. Which of the following operating systems makes use of GUI?
A. Windows 2000 B. Windows Server 2003 C. Windows Vista D. All of the above
4. Which of the following operating systems makes use of both command line interface and GUI?
A. Windows 2000 B. Linux C. Windows Vista D. None of the above
5. Which of the following functions is provided by an operating system?
A. Process management B. Security management
C. File management D. All of the above
6. Which of the following provides complete information related to a process?
A. Process state B. Process scheduling C. Process communication D. PCB
7. Which of the following is an operation related to a process?
A. Process creation B. Process execution C. Process completion
& process termination
D. None of the above
8. Which of the following is responsible for ascertaining the order in which processes are executed?
A. Scheduler B. Process schedule manager
C. Operating system scheduler D. Process Scheduler
9. Which one of the following scheduling algorithm is the simplest algorithm for the scheduling of processes?
A. FCFS scheduling algorithm B. RR scheduling algorithm
C. Priority scheduling algorithm D. SJF scheduling algorithm
10. Which of the following methods is used for interprocess communication?
A. Shared cache memory B. Shared region
C. Message passing D. Cache memory
11. Which one of the following methods is used for handling of deadlocks?
A. Detect and recover deadlock B. Mutual exclusion
C. No preemption D. All of the above
12. Which one of the following is a file operation?
A. Opening a file B. Manipulating a file C. Resising a file D. All of the above
13. Which one of the following software components is used by an operating system for device management
function?
A. Driver B. Device driver C. Program driver D. Application driver
266 Fundamentals of Computers
14. Which one of the following types of the operating systems allows multiple users to work simultaneously?
A. Multitasking operating system B. Multi-user operating system
C. Multiprocessor operating system D. None of the above
15. Which of the following type of UI allows a user to enter commands at command line?
A. GUI B. CLI C. Both GUI and CLI D. Neither GUI nor CLI
16. Which of the following is a part of MS-DOS?
A. DOS.SYS B. CONFIGURATION.SYS
C. EXEC.BAT D. COMMAND.COM
17. Which of the following is the core component of UNIX?
A. Command shell B. Kernel
C. Directories and programs D. None of the above
Discussion Questions
communication technologies which have enabled the computers to communicate between each other and
exchange information quickly and accurately and at any time.
The process of electronic transfer of information between two locations is known as data communication.
The five basic elements of data communication are:
∑ Message It is the information to be communicated. It may be in the form of text, pictures, audio,
video, or any combination of these.
∑ Sender It is the device that creates and transmits the information.
∑ Receiver It is the device that receives the information.
∑ Medium It is the communication channel through which the information travels from sender to
receiver. It could be a physical wire or radio waves.
∑ Protocol It represents a set of rules that governs the communication process between the sender
and the receiver.
Figure 14.1 illustrates these five elements of data communication.
Data communication may occur in a simple point-to-point mode as shown in Fig. 14.1 or in a multipoint
mode where more than two computers are connected together in the form of a network. A network is a
system of interconnected computers that can communicate with one another to share applications and data.
We shall discuss in this chapter the various forms of networks, their topologies, protocols used and
network applications.
In data communication, data from one computer is transferred to another computer using various channels
such as analog transmission channel and satellites. One of the analog transmission channels, which is
most commonly used in data communication is the telephone lines. A computer that sends data to another
computer is called the source terminal and the computer which receives the data from a sender computer is
called the destination terminal.
The sender computer provides the data for transmission in the form of digital signals. These digital
signals have to be first converted into analog signals for transmission through an analog transmission
channel such as telephone lines. The process of converting digital signals into analog signals is called
modulation. The analog signals have to be again converted into digital signals when they reach the
358 Fundamentals of Computers
destination so that the receiver computer can understand the signals. The process of converting the analog
signals again into digital signals is called demodulation. The modulation and demodulation processes are
performed by a device called modem during data transfer between computers. A modem is basically an
electronic device that converts the digital signals into analog signals. It also helps to convert analog signals
into digital signals.
A modem must be present both at the source and destination for data transmission. This means a sender
computer as well as a receiver computer must have a modem for data transmission. If a sender computer
does not have a modem then it will not be able to send data to the receiver computer through an analog
transmission channel. Similarly, if a receiver computer does not have a modem then it will not be able to
receive the data sent by a sender computer through analog transmission channel. Figure 14.2 shows the use
of modem in data communication.
Figure 14.2 shows that data in the form of digital signals are passed from the sender computer to
the modem. Modem then converts the digital signals into analog signals. The converted analog signals
are transferred from source to destination using analog transmission channel such as telephone lines.
At the destination, a modem again converts the analog signal to digital signals. The converted digital signals
are then passed to the receiver computer.
When using a modem in data communication, there are two factors that are of importance, modem speed
and modem type. Modem speed refers to the time period that a modem takes to convert digital signals into
analog signals or analog signals into digital signals. The speed of the modem is very important for data
transmission between the sender computer and receiver computer. If a modem is able to convert digital
signals into analog signals or analogs signals into digital signals at a high speed then data will also be
transmitted at high speed. A modem’s speed is measured in bits per second (bps). Modem type refers to the
type of a modem. There are basically two types of modems: internal modem and external modem. Internal
modem is the modem that is present on the expansion board, which is contained in a computer. An external
modem on the other hand is a modem that is connected externally to the COM port of the computer through
a cable. Normally internal modems are considered better than external modems because these types of
modems are present inside a computer and save desktop space.
Windows operating system provides built-in mechanism for setting up a connection using modem. We
can either set up a direct connection or a dial-up connection using a modem. In Windows operating system,
a new connection through a modem is established using the New Connection Wizard. Figure 14.3 shows
the welcome screen of the New Connection Wizard.
Data Communications and Networks 359
The New Connection Wizard provides explicit information in each of its screen to guide the end user on
setting up the desired connection using modem.
Computer network is a system of interconnected computers that enable the computers to communicate
with each other and share their resources, data and applications. The physical location of each computer is
tailored to personal and organisational needs. A network may include only personal computers or a mix of
PCs, minis and mainframes spanning a particular geographical area. Computer networks that are commonly
used today may be classified as follows:
∑ Based on geographical area:
o Local Area Networks (LANs)
o Wide Area Networks (WANs)
360 Fundamentals of Computers
The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet
Protocol (IP) networks for automatically assigning IP addresses and other communication parameters to
devices connected to the network using a client server architecture.
Telnet is an application protocol used on the Internet or local area network to provide a bidirectional
interactive text-oriented communication facility using a virtual terminal connection.
The Simple Mail Transfer Protocol (SMTP) is an internet standard communication protocol for electronic
mail transmission. Mail servers and other message transfer agents use SMTP to send and receive mail
messages.
Post Office Protocol (POP) is a type of computer networking and Internet standard protocol that extracts
and retrieves email from a remote mail server for access by the host machine.
Presentation Layer>>
Multipurpose Internet Mail Extension (MIME) in order to expand the limited capabilities of email.
MIME that allows non-ASCII data to be sent through SMTP. It allows the users to exchange different kinds
of data files on the Internet: audio, video, images, application programs as well.
Apart from providing value-added services, VAN also provides the auto error detection and correction
and protocol conversion services for data modification. Error detection and correction is a technique used
for detecting the errors in the transmitted data and then rectifying it. On the other hand, protocol conversion
is basically used for converting a message, which has been transferred using a specific protocol to another
protocol with the help of protocol converter.
Network topology refers to the arrangement of computers connected in a network through some physical
medium such as cable, optical fibre etc. Topology generally determines the shape of the network and the
communication path between the various computers (nodes) of the network. The various types of network
topologies are as follows:
∑ Hierarchical topology
∑ Bus topology
∑ Star topology
∑ Ring topology
∑ Mesh topology
∑ Hybrid topology
Secure Socket Layer (SSL) provides security to the data that is transferred between web browser and
server. SSL encrypts the data
Trnasport Layer>>
The Transmission Control Protocol (TCP) is a transport protocol that is used on top of IP to ensure
reliable transmission of packets.
The User Datagram Protocol (UDP) is a lightweight data transport protocol that works on top of IP.
UDP provides a mechanism to detect corrupt data in packets, but it does not attempt to solve other
problems that arise with packets,
Network Layer>>
The Internet Control Message Protocol (ICMP) is used by network devices, including routers, to send error
messages and operational information indicating success or failure when communicating with another IP
address,
366 Fundamentals of Computers
∑ In the hierarchical topology, data is received by all the nodes efficiently because of point-to-point
link.
The following are the disadvantages of hierarchical topology:
∑ In the hierarchical topology, when the root node fails, the whole network crashes.
∑ The hierarchical topology is difficult to configure.
Cables>>
Unshielded Twisted pair(UTP) cabling is a form of wiring in which pairs of wires are twisted together for
the purposes of canceling out electromagnetic interference (EMI) from other wire pairs and from external
sources. This type of cable is used for home and corporate Ethernet networks.
The transmission of energy in the Coaxial cables occurs totally through the dielectric inside the cable
between the conductors.Coaxial cables are commonly used for television and other broadband signals.
An optical fiber cable consists of a center glass core surrounded by several layers of protective material.
Optical fiber deployment is expensive but offers higher bandwidth and can cover longer distances
Thick Ethernet was the first commercially available form of cabling supported by Ethernet. It is
technically known as 10-BASE-5. Here, 10 is the maximum throughput, i.e. 10 Mbps and 5 refers to the
maximum segment length of 500 metres .
Thin Ethernet, popularly known as cheapernet or thinnet, is among the family of Ethernet standards
that uses thinner coaxial cable as a transmission media. It is technically known as 10-BASE-2.
There are three cable types commonly used for Ethernet cabling: coaxial, twisted pair, and fiber-optic
cabling.
368 Fundamentals of Computers
Firmware is a specific class of computer software that provides the low-level control for a device's
specific hardware.Typical examples of devices containing firmware are embedded systems (running
embedded software), home and personal-use appliances, computers, and computer peripherals.
Firmware is held in non-volatile memory devices such as ROM, EPROM, EEPROM, and Flash
memory.(works in between software and hardware)
INTERNET SECURITY TERMS
Adware bombards users with endless ads and pop-up windows and cause a nuisance to user experience
The most common anti-botnet solution is, CAPTCHA (Completely Automated Public Turing test to tell
Computers and Humans Apart).
Clickjacking involves tricking someone into clicking on one object on a web page while they think they are
clicking on another.
A Greylist contains items that are temporarily blocked (or temporarily allowed) until an additional step is
performed.
Phishing is a type of internet fraud that seeks to acquire a user s credentials by deception. It includes
theft of passwords, credit card numbers, bank account details, and other confidential information.
Process Hollowing is a security exploit in which an attacker removes code in an executable file and
replaces it with malicious code.
A Rootkit is a collection of software tools or a program that gives a hacker remote access to, and control
over, a computer or network
Packet sniffing allows the capture of data as it is being transmitted over a network.
A Spoof is an attack attempt by an unauthorized entity or attacker to gain illegitimate access to a system
by posing as an authorized user.
Which of the following circuit is used to store one bit of data?- flip flop
Which of the following circuit convert the binary data into a decimal?- code converter
Which of the following is a combinational logic circuit which sends data from a single source to two or
more separate destinations?- Demultiplexer
Which of the following is a combinational logic circuit which converts binary information from n coded
inputs to a maximum of 2^n unique outputs?- decoder
Which of the following is a combinational logic circuit that change the binary information into N output
lines? encoder
Which of the following is a combinational logic circuit that has 2n input lines and a single output line?
multiplexer
A Demultiplexer (Demux) is a combinational logic circuit that includes single input and an n
number of outputs.
The digital circuits that perform encoding of digital information are called encoders while digital
circuits that decode the coded digital information are called decoders.
An encoder with enable pins is called multiplexer while a decoder with enable pins is called
demultiplexer.
In an encoder, the number of output lines is less than the number of inputs.
In more technical terms, a computer virus is a type of malicious code or program written to alter the way
a computer operates and is designed to spread from one computer to another. A virus operates by
inserting or attaching itself to a legitimate program or document that supports macros in order to execute
its code.
Data Communications and Networks 369
Twisted-pair cables are insulated and twisted around each other in order to reduce noise (unwanted
signal). They are generally used to connect hubs to nodes in star topology. Coaxial cables have single
copper conductor with a shield around it. They are very robust and used for crossing large distances
such as the ocean.
∑ Optical fibre An optical fibre is a thin strand of glass that transmits pulsating beams of light
rather than electric current. These light pulses carry information. Fibre-optic cables can thus carry
information in digital form. They can carry enormous amount of messages at extremely fast speed.
These are used for long distance communications. It is a highly secured transmission medium.
∑ Microwave Communication through microwave can be used when the transmitting and receiving
ends are located at a large distance from one another. Microwaves are used to transmit analog signals.
WANs often use microwave links to connect LANs together. This mode of transmission is greatly
affected by the weather conditions.
∑ Satellite Satellites are used for receiving and transmitting analog signals globally. We can send
data from one country to another with the help of satellites. WANs that cover long distances often use
satellites for linking LANs.
In order to share data between computers, it is essential to have appropriate network protocols and software.
With the help of network protocol, computers can easily communicate with each other and can share data,
resources etc.
Malware (short for malicious software ) is a file or code, typically delivered over a network,
that infects, explores, steals or conducts virtually any behavior an attacker wants. And because
malware comes in so many variants, there are numerous methods to infect computer systems.
antivirus Software that is created specifically to help detect, prevent and remove malware
(malicious software).
Antivirus is a kind of software used to prevent, scan, detect and delete viruses from a
computer. Once installed, most antivirus software runs automatically in the background to
provide real-time protection against virus attacks.
information. Network operating system software is the type of network software that basically controls the
network traffic, access to the network resources such as printers, files, etc. This type of software generally
provides multiuser, multitasking facilities so as to ensure effective communication between the computers
over the network. It also establishes the communication between multiple computers that are performing a
single task.
Network is the system of computers generally linked together to enable the flow of data between
the interconnected computers. With the help of network, we can access the data remotely. Some of the
applications of a network are:
∑ Data sharing It is the capability of sharing data with multiple users over the network. In order
to share the data among multiple users, it is generally stored on the servers. Different applications
can therefore access the data from these servers easily. A special software locking mechanism is
maintained over the network, so as to prevent multiple users from modifying the data. The sharing of
data among the multiple users in an interactive way is known as data conferencing.
∑ Remote data access Remote data access is the process of accessing the data from remote
location in an efficient way. Different software programs are used to provide an interface to the end
users for accessing the data remotely.
∑ Resource sharing Resource sharing is the process of sharing the resources such as storage
devices, input/output devices, etc. over the network. For example, printer can be shared among the
computers connected in a network by attaching it to the server computer. When the users want their
documents to be printed they can simply give the print command from there computers and get their
document printed. The sharing of a printer on a network is relatively cheaper than attaching separate
printers to the individual computers connected in the network.
∑ Personal communication The far-reaching applications of networks are electronic mail and
teleconferencing. These applications allow individuals as well as organisations to use networks for
exchanging messages (written, voice and video) extensively. Electronic mail enables a person to send
and receive instant messages over a computer network with the help of Internet. On the other hand,
teleconferencing enables real-time communication over a distance by allowing people at different
locations to communicate with each other by seeing the video picture of people at other sites. This is
also referred to as virtual meeting.
Chapter Summary
Data communication is the process of sending data to the destination via some communication medium such as
cables, satellites, fibre optics, etc. Modem is a device that works as a modulator as well as a demodulator. It receives
the outgoing signal in the digital form and converts them into the analog form for transmission. This process is
called modulation. The analog signal is then converted back into the digital signal at the receiving end. This process
is known as demodulation.
A cluster of computers connected together in order to share resources is termed as a computer network. Computer
network comes in a variety of shapes and sizes such as LAN, WAN, MAN, Internet, Intranet, CSN, PPN and value
added network. Computers in these networks are connected with each other in some pattern such as star, ring and
Data Communications and Networks 371
bus, which is referred as network topology. There are various types of network topologies such as hierarchical
topology, bus topology, star topology, ring topology, mesh topology and hybrid topology. The computers connected
in a network generally communicate with the help of network protocols. For the computers connected in a network,
a proper network software has to be installed so that they can communicate with each other.
∑ Data communication: It is the process of transmission of data from the source computer to the destination
computer.
∑ Modem: It is a device that converts outgoing digital signal into analog signal for onward transmission and converts
incoming analog signal into digital signal suitable for the computer.
∑ LAN: It is a group of interconnected computers covering a small area such as a building.
∑ WAN: It usually connects the computers in a large area such as country, continents etc.
∑ MAN: It is the regional area network that typically connects the computers within a city, campus etc.
∑ Internet: It is the global network, which comprises of various networks spread over globally.
∑ Intranet: It is the private network of computers, usually contained within an organisation.
∑ CSN: CSN consists of two computers, client computer and server computer, where the server computer simply
receives the request from the client computer and processes these requests.
∑ PPN: In PPN, every computer communicates directly with other computers by sending and receiving the requests.
∑ Network topology: The network topology is the physical arrangement of the computers connected with each other
in a network such as ring, star, bus, hierarchical and hybrid.
∑ Network protocol: The network protocol is the standard according to which different computers over the network
communicate with each other.
∑ Network media: It is the physical media used to connect the computer nodes together.
∑ Network software: It is a computer program that aids the computers to communicate with each other effectively.
Review Questions
1. Data communication is the process of sending the data from the ________ to the __________.
2. ______________ is a medium for transmitting the data in digital form from the source to the destination.
3. The process of converting the digital signal into analog signal is termed as __________.
4. ___________ is the method of transforming analog signals into digital signal.
5. ___________ is used for converting digital signal into analog signals and vice versa.
6. When computers are connected together in order to share resources, they are said to be in a __________.
7. ____________ is used for connecting the computers within a few kilometers of area.
8. ____________ is used for connecting the computers in a large geographical area.
9. The size of the MAN generally lies between that of LAN and WAN, typically covering a distance of
____________ to _______________.
372 Fundamentals of Computers
10. ______________ is the global area network consisting of many networks world over.
11. ______________ is the Internet based newsgroup that allows individuals to share their views regarding a specific
topic or subject over the network.
12. The software program that itself gets activated in our computer system and destroys the stored information is
called _______________.
13. The network that is restricted within an organisation is termed as ____________.
14. In the CSN architecture, ___________ sends the request to the ___________.
15. The _______________ architecture does not consist of client computer and the server computer.
16. ________________ is the network used for exchanging the data related to business.
17. Hierarchical topology is also known as _______________.
18. ____________ is the common point where all the nodes of the network are connected in the bus topology.
19. ____________ is used for connecting the nodes in the star topology.
20. The combination of multiple topologies connected in a network is known as ______________.
21. ______________ is the set of rules and regulations based on which computers in a network communicate.
22. _____________ is one of the tasks that can be performed using network protocol.
23. _____________ is used for transferring files from one computer to another over the network.
24. The set of instructions that are given to the computer for performing various tasks is known as ______________.
1. Which one of the following uses light pulses for carrying information?
A. Satellite B. Microwave C. Optical fibre D. Coaxial cable
2. The process of converting digital signal into the analog signal is known as ______________ .
A. Demodulation B. Modulation C. Data compression D. None of the above
3. Which one of the following is the factor that must be considered when using modem for data communication?
A. Modem Speed B. Computer Port C. Modem size D. None of the above
4. Which of the following network is used for connecting the computers in a small geographical area?
A. MAN B. WAN C. LAN D. Internet
5. What is the full form of TCP?
A. Transfer Control Protocol B. Transmission Control Protocol
C. Transmit Control Protocol D. Transfer Communication Protocol
6. Which one of the following Internet services provides one to one communication?
A. Online chat B. Online messaging C. E-mail D. Usenet
7. A network that is restricted to use by a single organisation is referred to as:
A. LAN B. WAN C. Internet D. Intranet
8. In which network architecture there are no client computers and server computers?
A. CSN architecture B. Value added network architecture
C. PPN architecture D. All of the above
9. In which type of network can network congestion occur?
A. CSN B. PPN C. Value added network D. LAN
Multiplexing: Method of dividing physical channel into many logical
channels so that a number of independent signals may
be simultaneously transmitted
Networks that share some of the characteristics of both LANs and WANs are referred to as
Metropolitan Area Network (MAN)
Data Communications and Networks 373
Discussion Questions
Internet and the World Wide Web to be synonymous, but they are not. Although these two terms are used
interchangeably, they actually describe two different but related things.
The Internet is a massive network of networks that links together thousands of independent networks
thus bringing millions of computers on a single network to provide a global communication system. It acts
as a facilitator for exchange of information between computers that are connected to the Internet. It is like a
network of roads in a country that facilitates the movement of vehicles around the country.
We can create special documents known as hypertext documents containing text, graphics, sounds and
video on a computer. The storage location of these documents is known as website. The World Wide Web is
the network of all such websites all around the world. It is popularly known as WWW or Web. The websites
are spread across the Internet and therefore, the information contained in the websites can be transmitted
through the Internet. It is like transporting the goods stored in the warehouses using the road network. So
the Web is just a portion on the Internet and not same as the Internet.
In this chapter, we shall discuss the evolution of the Internet, the basics of World Wide Web, use of Web
browsers and search engines and the various Internet applications. We shall also discuss briefly various
protocols that are necessary for using the Web and the Internet.
The Internet was not a worldwide network initially. It was a small network called ARPAnet, which was
developed at the Advanced Research Projects Agency (ARPA) of United States in 1969. ARPAnet
was developed to help the researchers at one university to communicate with the researchers at other
universities. The computers, which were connected through the ARPAnet, were the computers present at
the University of California, Stanford Research Institute (California) and the University of Utah (Nevada).
To transfer data between these computers, the ARPAnet used the concept of packet switching in which
the data was divided into small modules known as packets before transmitting. These packets were
transmitted individually over the network and were reassembled at the receiver’s end. During the process
of transmission of packets on the network, some rules and methods known as protocols were followed.
The ARPAnet initially used Network Control Protocol (NCP), which allowed the transmission of files,
directories and messages between two computers on the network. The use of NCP provided end-to-end
networking as the user could only trust the ends, i.e., the sender and the receiver but could not trust the
means of transmission, i.e., the network. In 1972, the access to ARPANET was extended and made available
to common people and business organisations.
In the year 1974, the scientists developed a new host-to-host protocol, which not only allowed the
sharing of files, directories and messages but also helped the users to share software and applications on
the network. This protocol was known as Transmission Control Protocol/Internet Protocol (TCP/IP). It
was a combination of two protocols, TCP and IP, which worked collectively. The IP was the protocol that
guided the packets on the different routes on the network. The IP routed each packet on a different route
and the selection of a route for a packet was made in such a manner that the packets should take minimum
time to reach their destination. The selection of different routes for different packets also facilitated the
transmission of packets even when one of the parts of the network was not working properly. The TCP was
the network protocol that was responsible for the reassembling of the packets at the destination.
The congestion on ARPAnet was increasing continuously because of its extensive use by the military.
In 1975, the Defence Communications Agency (DCA) took control of the ARPAnet and changed its
name to Defence Advanced Research Projects Agency (DARPA). DARPA allowed all the defence related
The Internet and World Wide Web 377
organisations to connect to it but at the same time it denied the connection to all the non-government
organisations. This led to the development of other commercial networks such as Telnet.
In 1976, the telephone companies from all over the world broadcasted a new protocol called X.25 with
the support of Consultative Committee for International Telegraphy and Telephony (CCITT). The X.25
protocol was similar to the packet switching technique but its implementation was different. The X.25
protocol reduced the packet size and provided a more reliable means of transmission of packets. It used
the concept of hop-to-hop networking in which the receiving of packet was acknowledged by the hop at
every step. In the X.25 protocol, the information of the path was contained only in the first packet, which
helped create a virtual path. The rest of the packets just followed the virtual path created by the first packet.
Though this protocol was used for a very short period of time but was crucial for the development of
enterprise networks.
In 1979, a research computer network known as Usenet was developed by a group of computer scientists
from all over the world. This network allowed computers to connect through a dial-up connection. In the
Usenet network, the UNIX-to-UNIX copy protocol was used to transfer data. Usenet provided two main
services, Usenet News and mail servers. The Usenet News still continues to be used as NetNews but the
mail servers did not prove to be a success. The failure of mail servers was due to the fact that to send a mail
through mail servers a user was required to provide the complete path to the destination computer with the
help of the UUCP bang addressing format. The UUCP bang addressing format was the format in which the
names of different machines were separated using a bang, i.e., an exclamation mark.
In 1982, a new network known as Eunet was developed in Europe to connect the networks of European
countries such as UK, Scandinavia and Netherlands. By the year 1983, a number of networks were added
to ARPAnet to connect around 300 computers. In the same year, TCP/IP was made the standard protocol
for ARPAnet. The TCP/IP protocol allowed communication between computers of different networks and
the ARPAnet became capable of internetworking. This was the time when ARPAnet was renamed as the
Internet. In 1983, the military part of ARPAnet was split and named as MILNET.
The number of computers connected to ARPAnet increased day-by-day because of which a new problem
arose. The mapping of host names to the IP addresses became difficult. The IP addresses were the addresses
provided to each host computer on the network. Earlier, the Network Information Center (NIC) maintained
a record of the IP addresses and the corresponding host names in a file and every computer downloaded
this file whenever required. But with the increase in the number of computers connected to the ARPAnet, it
became difficult for the NIC to do so.
In 1984, Domain Name Server (DNS) was developed that helped in the mapping of host names to the
IP addresses. The domain names such as .edu for educational, .com for commercial, .gov for governmental
and .org for international organisational hosts, were introduced along with a specific code for each country.
The DNS converted these domain names into the corresponding IP addresses. The domain names also made
it easier for the users to remember the addresses.
In 1987, the National Science Foundation established a network known as NSFNET that linked the
computers through a high speed of 56Kbps. NSFNET allowed many organisations to connect to the Internet
without following the ARPAnet’s policies. By 1990 almost all the organisations, which were connected to
ARPAnet shifted to NFSNET and ARPAnet came to an end. The use of the Internet was limited to email,
Telnet and FTP till 1990. In 1990, the McGill University introduced an FTP search tool known as Archie,
which helped the users search for the information on the Internet. In the next year, i.e., 1991, another
application known as Gopher was developed at the University of Minnesota. This service helped the users
arrange the documents on the Internet; and to locate these documents a Gopher search tool known as
Veronica was used.
378 Fundamentals of Computers
In 1992, Tim Berners-Lee, a physicist from Geneva, introduced the World Wide Web, which was
a network of websites that could be accessed with the help of a protocol known as HyperText Transfer
Protocol (HTTP). HTTP searched the required address from where the web pages had to be accessed and
retrieved the web pages for the user. The web page on the WWW had links in the form of text known as
hypertext. These links were helpful in accessing other web pages when a user clicked the hypertext with the
help of a mouse. In 1995, the commercial Internet providers started controlling the Internet by providing
connections to different people for accessing the Internet. Today the Internet is used in almost every field,
such as education, entertainment, business, defence and medicine. In all these fields, the Internet is used to
share data, gather information and communicate with the other users. According to the Internet world usage
statistics, more than 1.4 billion people use the Internet today.
Nowadays the Internet is used in almost all the fields for different purposes. Each and every field uses one
or the other services provided by the Internet. The Internet is extensively used in the following fields:
∑ Business
∑ Education
∑ Communication
∑ Entertainment
∑ Government
same item through bidding on the website of the third party. The consumer, who provides an item
for sale on the website, is known as seller; whereas the consumer, who bids for the item, is known
as buyer. For example, e-bay is a website on which a consumer can provide information about the
products, which s/he needs to sell. The best bidder gets to buy the listed product.
∑ Consumer-to-business (C2B) C2B is a business model that allows individual consumers
to offer their products and services to companies in return of which they get payment from the
companies. One of the popular examples of C2B model is the online advertising site Google
Adsense. It allows individuals to display advertising content or promotional materials on their
personal websites. The administration and payment of these ads are done by Google itself. Also,
platforms like Google Video and Fotolia are good examples of C2B, where individuals can sell
digital content including images, animations, videos, etc. to companies.
messages electronically. To use the email services, a user requires an account on a mail server. The account
is created by the user by providing a username; a password and other personal information such as address
and contact number. Each time the user wants to access the email service, she/he has to log on to the server
using the username and the password provided during account creation. If the username or the password
provided by a user is invalid, then that user is considered as an unauthorised user and is prohibited from
using the service.
The Internet also provides another easy way of communication, i.e., communication through instant
messaging. Instant messaging is a service of the Internet through which it is possible for a user to perform
real-time communication with one or more users on the Internet. The real-time communication refers to
the communication in which there is an immediate response to a message. In case of instant messaging,
the communication between two users takes place by instant sending and receiving of message. To use this
service, the users have to log on to the instant messaging server. After a user has successfully logged on
to the server, a chat room with a list of online users is made available to the user. An online user is a user
who is available for chatting at a specific period of time. The user can then select an online user from the
list and then send a message to that online user. If a response is received from the online user to whom a
message was sent, then instant sending and receiving of message takes place. Chat rooms not only provide
the sharing of text messages but also allow the users to share images and graphics online.
Apart from e-mail and instant messaging, Internet telephony and web conferencing are the other
application areas of the Internet that facilitate, quick, cheap and efficient communication over long
distances. Through these mediums, the users can talk to the other uses in real-time through an audio-visual
interface.
The vast use of IT and Internet has paved the way for e-governance. More and more government
agencies are adopting the concept of e-governance to improve their service delivery capabilities.
World Wide Web is a collection of web servers, which contain several web pages pertaining to different
websites. The web pages contain hypertext, simple text, images, videos and graphics. The web pages are
designed with the help of HyperText Markup Language (HTML). To view the web pages provided by a
web server, the software known as web browser is required. To display the web pages, a web browser runs
the HTML code segment written for a particular web page. Each web page on the Internet is provided its
own address known as Uniform Resource Identifier (URI) or URL. This URL helps the web browser in
locating a web page on the Internet. A URL string begins with the name of a protocol such as http or ftp
that represents the protocol through which a web page is accessed. The rest of the URL string contains
the domain server name of the web page being accessed and the location of the web page on the local
web server.
Uniform Resource Locator (URL)
15.5 WEB BROWSERS
Web browser is the software, which is used to access the Internet and the WWW. It is basically used to
access and view the web pages of the various websites available on the Internet. A web browser provides
many advanced features that help achieve easy access to the Internet and WWW. When we open a web
browser, the first page, which appears in the web browser window, is the home page set for that particular
web browser.
The web browsers are categorised into two categories, text based and Graphical User Interface (GUI)
based. The text based browsers are the browsers that display unformatted text contained in the HTML files.
These types of browsers do not display images, which are inline with the text contained in the HTML files.
However, the text based browsers have the ability of displaying the images that are not inline with the
text contained in the HTML files. The text based browsers are simple to use and do not require computers
with expensive hardware. They allow the downloading of graphic and sound files but only if the computer
contains the software and the hardware required for such files. The GUI based browsers, on the other hand,
display formatted text along with images, sounds and videos, which are contained in the HTML files.
The user has to just click the mouse button to view or download image, sound and video files. The most
commonly used web browsers are Internet Explorer (IE), Netscape Navigator and Mozilla Firefox.
The IE is the most widely used web browser that was developed in 1995 by Microsoft. The first version
of IE, i.e., IE 2.0 could be installed and run on the computers with Macintosh and the 32-bit Windows
operating systems. IE 2.0 was specially designed to access secure websites, and hence had the capabilities
of tracing any kind of errors. To trace the errors and provide secure access to websites, IE 2.0 included a
new protocol known as Secure Socket Layer (SSL) protocol. In 1996, the next version, i.e., IE 3.0 was
developed, which had many advanced features, such as Internet Mail, Windows Address Book and Window
Media Player. This version was basically developed for Windows 95 operating system. In 1997, the next
version, IE 4.0 was developed that included Microsoft Outlook Express 4.0, which is e-mail software used
for sending and receiving e-mail messages. Microsoft Outlook Express was included with IE 4.0 to provide
enhanced Internet mail and news features. The latest version of IE is IE 8.0. It is the most secure web
382 Fundamentals of Computers
browser as it contains many privacy and safety features as compared to any of the previous versions of IE.
The IE 8.0 version supports the latest Windows operating system, i.e., Windows Vista.
To access Internet Explorer on a computer, we need to select Start�Programs�Internet Explorer. The
Microsoft Internet Explorer window appears with the home page as shown in Fig. 15.1.
Figure 15.1 shows that the home page for the Internet Explorer has been set to the google.com website,
which is a search engine that helps in searching information on the Internet. A user can change the home
page according to the requirements using the Internet Options option of the Tools menu.
Another commonly used web browser is Netscape Navigator, which was also known as Mozilla during
its development phase. This web browser was widely in use in the 1990’s. The only advantage of Netscape
Navigator over IE is that when a web page is being downloaded, unlike IE in which a blank screen appears
some of the text and graphics contained in the web page appears in the case of Netscape Navigator. This
prevents the wastage of time as the user can start reading the page even before it is completely downloaded.
Initially, Netscape Navigator became very popular because of its advanced features and free availability
to all the users. However, its usage declined later in 1995 when it was declared that the web browser
was freely available only to the non-profit and educational organisations. Another reason for the decline
in the usage of Netscape Navigator is that it was not capable of fixing the errors automatically. On the
other hand, IE 4.0 had the feature of automatically fixing errors. As a result, many people suddenly stopped
using Netscape Navigator. In order to increase the usage of Netscape Navigator many new features such
as mail and news reader were added to its older version. However, these new features affected the speed
of the Web browser and increased its size. As a result, Netscape Navigato is rarely being used nowadays.
The Internet and World Wide Web 383
The third most commonly used web browser is the Mozilla Firefox, which was developed by
Dave Hyatt and Blake Ross. Many versions of Mozilla Firefox web browser were developed before it was
officially released in November 2004. The latest version of Mozilla Firefox that is currently being used
is 2.0.0.14. This version includes many new features such as mail, news and HTML editing. The
Firefox web browser uses XML User Interface (XUL), which supports features such as Cascade Spread
Sheets (CSS) and JavaScript. XUL provides extensions and themes, which enable a user to increase
the capabilities of the Mozilla Firefox web browser. Initially, the Firefox was named as m/b (Mozilla/
Browser) but later its name was changed to Phoenix. The name Phoenix already existed for some BIOS
software so the web browser was renamed as Firebird but again the same problem persisted. This was
already a name of a popular database server. So, in February 2004 another name, i.e., Mozilla Firefox
was given to the web browser that persists till today. To access Mozilla Firefox, we need to select
Start � Programs�Mozilla Firefox�Mozilla Firefox. The Mozilla Firefox window appears with the home
page as shown in Fig. 15.3.
384 Fundamentals of Computers
Browsing the Internet is the process of accessing different websites available on the Internet using a web
browser. To browse the Internet, we need to first connect our computer to the Internet through a connection
provided by an ISP. To connect to the Internet, a modem is also required. Modem is a device that converts
analog signals into digital signals and vice versa. In addition, a telephone line is required for connecting the
computer to the server of the ISP. After connecting to the Internet, we can perform the following steps to
browse the Internet using IE web browser:
1. Select Start � Programs � Internet Explorer to display the Microsoft Internet Explorer window.
2. Type the URL of the website, which you want to access such as java.sun.com in the address bar that
appears at the top in the Microsoft Internet Explorer window.
3. Press the Enter key to display the home page of the java.sun.com website as shown in Fig. 15.4.
The Internet and World Wide Web 385
Search engines are the websites that provide the users the facility of searching for information related
to some topic. The search engines maintain an index of websites available on the Internet along with a
summary of the content contained in these websites. The summary of the content is displayed when a
user searches for information on some topic. We can use a number of techniques to make the process of
searching the information using search engines efficient and useful. These techniques are as follows:
∑ Use of double quotes (“ ”) Double quotes are used to search for a phrase collectively.
Generally, a search engine provides a list of websites that contains any of the words contained in the
text specified for searching of information. However, if a user wants the search engine to consider the
entire text specified for searching as a single phrase, then that user should provide the text in double
quotes. For example, suppose a user wants to search the information related to the topic, types of
computers. In this case, if the user specifies the text, types of computers, without double quotes for
searching the information, then the search engine will display all websites, which either contain the
word, types or the word, computers. However, if a user wants that a search engine should regard the
text, history of the Internet as a single phrase, then the user must provide the text in double quotes as
“types of computers”. This will make the search more efficient.
∑ Use of Boolean operators Boolean operators such as AND, OR and NOT can also be used in
the text specified for searching information in order to make the search process more efficient. The
Boolean AND operators can be used to search for websites, which contain the information related
to two words such as computer and hard disk. The Boolean OR can be used to search for websites,
which contain either of the two words. The Boolean NOT can be used to search for the websites,
which contain the information other than the information related to the word specified after the NOT
operator. For example, if a user is searching for some information regarding track ball present in the
mouse, then the user can specify the text “track ball OR touch ball” for searching the information as
The Internet and World Wide Web 387
both of the words mean the same. So, now the search engine will search and display all the websites
containing either of the words.
∑ Use of plus (+) and minus (-) sign Plus (+) sign is used to search the websites in which all
the words included in the text specified for searching are present. Minus (–) sign is used to search
all the websites in which the words included in the text specified for searching are not present. For
example, suppose a user wants to search the features of a mouse, then the user has to specify the text
“features + mouse” for searching the information related to the features of the mouse. The Internet
search engine will list all the web pages containing the words, features and mouse.
Some of the search engines that are commonly used by the users are www.google.com, www.altavista.
com, www.askjeeves.com, www.search.yahoo.com and www.ask.com. Among these search engines,
www.google.com is the most popular search engine, which is used worldwide. To use the google.com
search engine for searching information, the user has to perform certain steps, which are as follows:
1. Open IE web browser. The Microsoft Internet Explorer window appears.
2. Type the URL, google.com in the address bar, which appears at the top in the Microsoft Internet
Explorer window.
3. Press Enter to open the home page of the google.com search engine as shown in Fig. 15.7.
Figure 15.7 shows that the home page of the google.com search engine contains a text box in which
we can specify the text for searching information. It also contains two buttons, Google Search and I’m
feeling Lucky. The Google Search button is used to initiate the searching process using the google.com
search engine. I’m Feeling Lucky button is used to display the first website returned as a search result
corresponding to the specified text. The home page of the Google.com search engine also contains the
following options:
∑ The web This option allows us to search the WWW for getting the information on a specific topic.
∑ Pages from India This option allows us to search the pages submitted from India for information
on specific topic.
∑ Advanced search This option allows us to specify certain advanced settings for making the
search more specific and efficient.
1. Type some text such as mouse + computers in the search text box to specify the text on the basis of
which information will be searched.
2. Click the Google Search button or press the Enter key to initiate the process of searching the
information related to mouse. A list of websites containing information related to the specified text such as
mouse gets displayed as shown in Fig. 15.8.
In Fig. 15.8, the blue text in the search result is the hypertext through which the web page containing the
required information can be accessed and the green text represents the URL of the website to which the web
page belongs. The user has to click the hypertext to view the web page containing the required information.
The Internet and World Wide Web 389
Email service provided by the Internet is a very effective means of communication as it allows two persons
in remote places to communicate with each other. To use the e-mail service, a user must have a valid email
account. There are two ways in which a user can obtain an email account. The first way is to obtain an
email account from an ISP. A user can obtain an email account from an ISP when that user registers with
the ISP. To register, a user has to firstly purchase an Internet connection package offered by an ISP.
After purchasing the Internet connection package, the user registers with the ISP by providing
information such as name, address, username and password in the registration form available on the website
of the ISP. The user is then provided an email account and an email address by the ISP. The email address
consists of two parts separated by @ sign such as [email protected]. The first part written before
@ symbol in the email address is the unique identity of the user who uses the email service on the Internet.
The other part written after @ symbol is the name of the website, which provides the email service. In case
a user is using the email account of an ISP, the part after the @ sign will consist of the name of the website
owned by the ISP. No two users can have the same email addresses.
The second way to obtain an email account is to get registered on one of the websites such as hotmail.
com and yahoo.com, which provide free e-mail facility to their users. To register, a user must first access
one of these websites using a web browser. After accessing the website, the user must provide information
such as username, password, name and address in the registration form and finally the user must submit the
form to register on to the website. When the user has successfully registered, an email account is opened for
the user and an e-mail address is also provided. The user can now access the email account by providing
a valid username and password in the home page of the website such as hotmail.com and yahoo.com for
using the email service of the Internet.
The email service can be used by a user to send and receive email messages. An email message has two
sections, a header section and a body section. The header section contains the information about the sender,
the receiver and the subject of the email message. It consists of the fields such as to, cc and subject. The
to field contains the email address of the person to whom the e-mail message is to be sent. The cc field or
the carbon copy field contains the email addresses of other persons to whom a copy of the e-mail message
has to be sent. The body section contains the actual text message, which has to be sent. This section also
contains a signature block at the end where the sender places his/her signature.
The Internet is a collection of computers, which are connected to each other for the purpose of sharing of
information. To share information, data has to be transferred from one computer to another. When data is
transferred between computers, certain rules called protocols have to be followed. The protocols perform
different tasks, which are arranged in a vertical stack and each task is performed at a different layer. The
computer, which sends the data to another computer, is called source computer. On the other hand, the
computer, which receives the data from another computer, is called destination computer. At the time of
transferring of data from the source to the destination computer, a protocol is responsible for determining
the network to which the destination computer belongs. It is also responsible for defining the procedure,
which must be followed for dividing the data into packets. The protocols are also responsible for detection
of errors in the data packets and the correction of these errors or loss of data packets. In addition, it is the
responsibility of the protocols to identify loss of connection between the computers in a network and help
the users to establish the connection again.
390 Fundamentals of Computers
Each computer on a network has a unique address, which is known as the Internet Protocol (IP) address.
An IP address is a group of four numbers and the numbers are separated from each other by a dot. When
any data is sent from one computer to another computer over the network, it is divided into small modules
known as packets or datagrams. These packets are transmitted on the network by the Internet Protocol.
Each packet transmitted on the network contains the addresses of both source and destination computer.
A gateway present on the network reads the address of the destination computer and sends the data to the
specified address. Gateway is a computer, which contains the software required for the transmission of
data over different networks. Each packet on the network is an independent entity, so they are transferred
through different routes to reach the destination computer. The packets received at the destination are not
in the same sequence in which they were transmitted. As a result, these packets are arranged in a right
sequence by a protocol known as Transmission Control Protocol (TCP) and then are merged at the
destination to form the complete data. TCP and IP work in coordination with other protocols such as Telnet
and User Datagram Protocol (UDP) but are considered as the most fundamental of all protocols. All these
protocols are collectively known as TCP/IP suite. A model known as TCP/IP model determines how the
protocols of the TCP/IP suite will work together for the transfer of data between computers in a network
appn layer:
Line Printer Daemon (LPD) protocol do print jobs
The Internet and World Wide Web 391
c. Address Resolution Protocol (ARP) It is responsible for determining the Media Access
Control (MAC) address corresponding to an IP address. It sends an ARP request on the network
for a particular IP address and the device, which identifies the IP address as its own, returns an
ARP reply along with its MAC address.
∑ Physical layer The physical layer is responsible for collecting packets so that the frames, which
are transmitted on the network, can be formed. It performs all the functions required to transmit the
data on the network and determines the ways for accessing the medium through which data will
be transmitted. This layer does not contain any protocols but instead of protocols, it contains some
standards such as RS-232C, V.35 and IEEE 802.3.
∑ Data link layer The data link layer specifies the actions, which must be performed to maintain the
network communication. It collects the packets to form frames, which are then transmitted over the
network. It also finds out and then corrects the errors, which occur during the transmission of packets.
∑ Physical layer The physical layer describes all the physical requirements for the transmission of
data between devices on a network. For example, the physical layer can specify the layout of pins,
hubs and cables. This layer defines the relation between a single device and the transmission medium.
It specifies the way in which a device must transmit data and also the way in which another device
must receive data. This layer is responsible for the setting up and ending up of a network connection.
Chapter Summary
A collection of networks in which a large number of computers are connected to each other is known as the Internet.
The Internet marked its beginning with a network known as ARPAnet which was developed at Advanced Research
Projects Agency (ARPA) of the U S in 1969. The first protocol used on the ARPAnet was TCP/IP. From 1975 to
1982, different scientists developed many new networks, such as Telnet, Usenet and Eunet. All these continuous
developments led to the eventual development of the Internet.
The Internet can be used to gather information on a wide variety of topics. Today the Internet is used in many
fields such as business, education and entertainment. In business, the most popular use of the Internet is e-business
through which an organisation and a consumer can communicate with each other and perform business transactions.
In education field, the students use discussion forums and newsgroups on the Internet to gain specific information.
The internet also extends its application in communication field by providing services such as e-mail and instant
messaging through which a person at one location can communicate to another person located at a remote place.
The Internet also provides entertainment through games, music and movies.
To access the Internet and the WWW, the user requires a software known as web browser. Some commonly used
web browsers are IE, Netscape Navigator and Mozilla Firefox. To gather information from the Internet, a user has to
search for the information on the Internet. This is done with the help of search engines provided on the Internet. The
most commonly used search engines are www.google.com, www.altavista.com and www.askjeeves.com.
Multimedia in information technology refers to use of more than one of these media for
Key Terms to Remember information presentation to users
∑ Internet: The Internet is a large network of computers placed at different locations around the world that are
connected to each other through telephone lines and satellites.
∑ WWW: The WWW is a collection of interlinked hypertext documents stored on computers all around the world.
∑ Web page: Web page is a formatted document stored on a web server that can be accessed to gather information.
∑ Web server: Web server is a computer that contains the web pages corresponding to the websites available on the
Internet.
∑ Web browser: Web browser is a software, which is used to access the Internet and the WWW.
∑ Search engines: Search engines are websites, which provide the users the facility of searching for information
related to some topic.
∑ Email: Email is a service provided by the Internet that allows two persons in remote places to communicate with
each other.
∑ ISP: An ISP is an organisation that provides the Internet connection services to people who want to use Internet.
∑ Hypertext: Hypertext is that text on a web page which when clicked provides an access to the other web pages.
∑ Gateway: Gateway is a computer, which contains all the software required for the transmission of data over
different networks.
∑ Protocol: Protocol is the set of rules and methods that are to be followed to transfer data from one computer to
another on a network.
∑ IP (Internet Protocol): IP is a protocol that is responsible for the routing of data on the network.
Review Questions
1. _________ provides the facility of information sharing and communication between users.
2. WWW refers to _________ __________ ___________.
3. Each web page is accessed on a network using ___________.
4. _________ was the network founded at the Advanced Research Projects Agency (ARPA) of United States in
1969.
5. ARPAnet used the concept of _____________ to transfer the data from one computer to another.
6. The methods and the rules followed to transfer data on a network are known as __________.
7. __________ is the unique address of a computer on the network.
8. __________ is a network, which provides mail and news services to the users.
9. __________ converts domain names to corresponding IP addresses.
10. __________ refers to the business transactions conducted on the Internet.
11. __________ service of the Internet is used to perform real-time communication on the Internet.
12. __________ allows the users to search for some information on the Internet.
13. An email message consists of two sections __________ and ____________.
14. The web pages are designed with the help of ________________.
15. XML User Interface (XUL) supports features such as __________ and ____________.
16. The TCP/IP model contains four layers, which are _________, _________, _________ and _________.
17. The two types of web browsers are ________ and _________.
18. An OSI model is also referred as ______________.
1. Which of the services of Internet allows the users to gather information from the Internet?
A. Email B. Discussion forums C. WWW D. Instant messaging
2. What is the address of a computer on a network known as?
A. URL B. IP address C. Host D. Domain name
3. When was the ARPAnet developed?
A. 1945 B. 1967 C. 1969 D. 1959
4. Which type of e-business transactions take place on the e-bay website?
A. B2B B. B2C C. C2C D. C2B
394 Fundamentals of Computers
5. Which of the following allows the users to share articles on the Internet?
A. Newsgroups B. Email C. Instant messaging D. None of the above
6. What is the name of the procedure followed before allowing a user to use email services?
A. Check in B. Login C. Set in D. None of the above
7. Which service of the Internet provides real-time communication?
A. Email B. Newsgroup C. Instant messaging D. MUD
8. Which of the following tasks can be performed using the Internet?
A. Book air tickets B. Shop for clothing
C. Check the bank statement D. All of the above
9. Which of the following are mentioned in a URL?
A. Domain name B. IP address C. Hypertext D. None of the above
10. Which of the following are the most commonly used search engines?
A. www.google.search.com B. www.yahoo.com
C. www.search.yahoo.com D. www.search. google.com
11. Which of the following are the sections of an email message?
A. Address B. Message C. Header D. Footer
12. At which layer of the TCP/IP model IP, ICMP and ARP protocols function?
A. Physical layer B. Application layer C. Network layer D. Transport layer
13. How many layers are there in a TCP/IP model?
A. 2 layers B. 5 layers C. 7 layers D. 4 layers
14. Which of the following are the protocols that work at the application layer of the TCP/IP model?
A. FTP B. SMTP C. IP D. ARP
15. How many layers does an OSI model contain?
A. 2 layers B. 5 layers C. 7 layers D. 4 layers
16. Which layer in the OSI model prevents the overloading of packets on the network?
A. Data link layer B. Application layer C. Network layer D. Session layer
17. Which of the following are the examples of a web browser?
A. Net navigator B. Mozilla foxfire
C. IE D. Netscape communicator
18. What is the function of a DNS?
A. To convert domain names into IP addresses B. To convert IP addresses into domain names
C. Both A and B D. None of the above
19. Which layer in a TCP/IP model does not contain any protocols?
A. Transport layer B. Application layer C. Network layer D. Physical layer
20. The term ISP stands for?
A. Information System Protocol B. Internet System Protocol
C. Internet Service Provider D. Information Service Provider