BCS-o11 Solved Assignment 2022-2023: Q1. (Covers Block 1)
BCS-o11 Solved Assignment 2022-2023: Q1. (Covers Block 1)
Note This assignment has three questions of 80 marks Answer all the questions Rest 20 marks are
for viva voce You may use ulustrations and diagrams to enhance explanations Please go through
the guidelines regarding assignments given in the Programme Guide for the format of presentation
Please give precise answers The word linut for cach part ts 200 words.
(7 x 4 = 28)
a) What 1s VLSI? How did it change the design of a computer system? Explain the working of von
Neumann Architecture with the help a diagram. Also explain the process of execution of an
instruction for a von Neumann machine.
Solution:
VLSI:
VLSI (Very Large Scale Integration) is one of the most widely used technologies for microchip
processors, integrated circuits (IC) and component designing. It was initially designed to support
hundreds of thousands of transistor gates on a microchip which, as of 2012, exceeded several billion.
All of these transistors are remarkably integrated and embedded within a microchip that has shrunk
over time but still has the capacity to hold enormous amounts of transistors.
The first 1 mega byte RAM was built on top of VLSI design principles and included more than one
million transistors on its microchip dye.
Specifications comes first, they describe abstractly, the functionality, interface, and the architecture of
the digital IC circuit to be designed.
Design Specifications
i
Schematic Capture
1
Create Symbol
1
Simulation
t
—
Layout
Extraction
Layout
vs. Schematic
Check
Post-Layout Sim.
Behavioral description is then created to analyze the design in terms of functionality, performance,
compliance to given standards, and other specifications
RTL description is done using HDLs This RTL description is simulated to test functionality From
here onwards we need the help of EDA tools.
RTL description is then converted to a gate-level netlist using logic synthesis tools A gatelevel netlist
is a description of the circuit in terms of gates and connections between them, which are made in such
a way that they meet the timing, power and area specifications.
Finally, a physical layout is made, which will be verified and then sent to fabrication.
Von-Neumann proposed his computer architecture design in 1945 which was later known as Von-
Neumann Architecture. It is a design model for the modern computers which has central processing
unit (CPU) and the concept of memory used for storing both data and instructions. This model
implements the stored program concept in which the data and the instructions both are stored in the
memory. All computers share the same basic architecture which have memory, an I/O system,
arithmetic logic unit (ALU) and controlunit (CU).
Von Neumann architecture is based on the stored-program computer concept, where imstruction data
and program data are stored in the same memory. This design is still used in most computers
produced today.
Control Unit
Arithmetice/Logic Unit
reves [55] |
Input Device # Output Device
Memory Unit
X /
Process of Execution by Von Neumann Architecture:
The part of the Computer that performs the bulk of data processing operations is called the Central
Processing Unit and is referred to as the CPU.
The Central Processing Unit can also be defined as an electric circuit responsible for executing the
instructions of a computer program
The CPU performs a variety of functions dictated by the type of instructions that are incorporated in
the computer.
The major components of CPU are Arithmetic and Logic Unit (ALU), Control Unit (CU) and a vanety
of registers.
The Arithmetic and Logic Unit (ALU) performs the required micro-operations for executing the
instructions. In simple words, ALU allows arithmetic (add, subtract, etc.) and logic (AND, OR, NOT,
etc.) operations to be carried out.
The Control Unit of a computer system controls the operations of components like ALU, memory and
input/output devices.
The Control Unit consists of a program counter that contains the address of the instructions to be
fetched and an instruction register into which instructions are fetched from memory for execution
(iii) Registers
Registers refer to high-speed storage areas in the CPU. The data processed by the CPU are fetched
from the registers.
Following is the list of registers that plavs a crucial role in data processing.
Registers | __ Description
MAR (Memory Address This register holds the memory location of the data that needs to be
Register) accessed.
his register holds the data that is being transferred to or from
MDR (Memory Data Register)
memory
AC (Accumulator) [[This register holds the intermediate arithmetic and logic results.
is register contains the address of the next instruction to be
PC (Progra
(P mc ounter)
ter fee d
Buses are the means by which information is shared between the registers in a multiple-register
configuration system.
A bus structure consists of a set of common lines, one for each bit of a register, through which binary
information 1s transferred one at a time. Control signals determine which register is selected by the
bus during each particular register transfer
Von-Neumann Architecture comprised of three major bus systems for data transfer
Bus Description
Address _ ||Address Bus carries the address of data (but not the data) between the processor and the
Bus | memory.
—_____—
Data Bus carries data between the processor, the memory unit and the input/output
Data Bus
devices.
per riie a aes sas — is
fem Ue ee ee
Control Bus carries signals/commands from the CPU.
Bus
3. Memory Unit
A memory unit is a collection of storage cells together with associated circuits needed to transfer
information in and out of the storage. The memory stores binary information in groups of bits called
words. The internal structure of a memory unit is specified by the number of words it contains and the
number of bits in each word.
(b) What are the different standards of representing character in a computer? Name and explain any
two such standards with the help of examples. List the ASCII codes of all the decimal digits.
Solution:
ASCII:
ASCII uses seven bits, giving a character set of 128 characters. The characters are represented in a
table called the ASCII table. The 128 characters include:
We tend to say that the letter ‘A’ is the first letter of the alphabet, ‘B’ is the second and so on, all the
way up to ‘Z’, which is the 26th letter. In ASCII, each character has its own assigned number.
O 48 0110000 30
9 57 O111001 39
Space 32 0100000 20
! 33 0100001 21
‘A’ is represented by the denary number 65 (binary 1000001,hexadecimal 41), ‘B’ by 66 (binary
1000010, hexadecimal 42) and so on up to ‘Z’, which is represented by the denary number 90
(binary 1011010, hexadecimal 5A). Similarly, lower-case letters start at denary 97 (binary 1100001,
hexadecimal 61) and end at denary 122 (binary 1111010, hexadecimal 7A).
When data is stored or transmitted, its ASCII or Unicode number ts used, not the character itself.
UTF-32:
Unicode was originally designed as a pure 16-bit encoding, aimed at representing all modern scripts.
Over time, and especially after the addition of over 14 500 composite characters for compatibility with
established sets, it became clear that 16 bits were not sufficient for many users. Out of this arose UTF-
32.
UTF-32 allows characters to be encoded as 4 bytes at anv code point from 00000000 to 0010FFFF.
For example, the string "ABC" in UTF-32 is encoded as x"000000410000004200000043"
SOH 1
STX 2
ETX 3
EOT 4
ENQ 5
ACK 6
BELL 7
BS 8
TAB 9
Solution:
2| 197 17
2/98 0
2/49 1
2| 24 0
2/12 0
2/6 0
2|3 1
21-1
0
Therefore, (1497)49 = (41000101) 9
0.0625 X 2 = 0.1250 |
0.1250 X 2 = 0.2500 |
0.2500 X 2 = 0.5000 |
0.5000 X 2 = 1.0000 |
Remainders
16|197 5
16112, C
0
0.0625 X 16 = 1.0000
Therefore, (0.0625),9 = (0-146
2! 4 567 654
2[2 283,827
=ooo-0-22;0--00-00--00+-0
16|4,567,654
2
16[285,478
saguoot
16] 17,842
16[1,115
16[69
16/4
0
Therefore, (4567652)10 = (45B266)46
(iii) String “Character Codes of alphabets and special character $ #” to ASCII:
(Character Codes of alphabets and special character $ #)string = (67 104 97 114 97 99 116
101 114 32 67 111 100 101 115 32 111 102 32 97 108 112 104 97 98 101 116 115 32 97 110 100
32 115 112 101 99 105 97 108 32 99 104 97 114 97 99 116 101 114 32 36 32 35) Asc
(Character Codes of alphabets and special character $ #) ying = Qu 043\u 068\u O61\u
072\u 061\u 063\u 074\uU 065\u 072\u 020\u 043\u O6F\u 064\u 065\u 073\u 020\u
oO6F\u 066\u 020\u 061\u 06C\u 070\u 068\u 061\u 062\u 065\u 074\u 073\u 020\uU
061\u O6F\u 064\u 020\u 073\u 070\u 065\u 063\u 069\u 061\u 06C\u 020\u 063\u
068\u 061\u 072\u 061\u 063\u 074\U 065\U 072\uU O20\Uu 024\U 020\U 023) UNICODE
| 343x16°
14x 16
| | 15x 16°
15x16
- 13x 16°
12x 16°
—— ——11x 16°
10x 16"
Now, multilying each digit with its place value and adding the products :
= (2882404333)10
Hexadecimal Binary
oO 0000
1 ooo1
2 0010
3 ool
4 0100
5 0101
6 0110
7 oll
8 1000
9 1001
A 1010
B 1011
Cc 1100
D 1101
E 1110
F 1141
To convert haxadecimal number to binary, we write 4-bit bmary equivalent to each hexadecimal digit
in the same order.
(d) What is the need of ROM in a computer? How is it different to RAM? Why is cache memory
needed even if a computer has RAM and ROM? Why secondary memory is needed?
Solution:
1. A Read-Only Memory (ROM) is a non-volatile memory, i.e., the information stored in it is not
lost even if the power supply goes off. Thus a Read Only Memory (ROM) is one in which
information is stored permanently.
2. ROM 1s used for storing a special set of instruction, which the computer needs when it starts up
(boots up).
3 In phones, ROM also functions as a type of data storage. It is the data repository that makes
sure that data is not wiped off from your phone when vou switch it off. As a “read-only
memory,’ the process of reprogramming is relatively slow and infrequent. It does not allow
random access writes to discrete memory locations. It is the equivalence of a computer's hard
drive, capable of storing files. These files include photos, songs, videos, and system software
among other things. Most smartphones are presently fortified with ROM from 16GB, 32GB,
64GB, to 128GB, and even 256GB But then, it is pertinent to know that ROM in smartphones is
described as storage and not ROM.
Need of Cache memory needed even if a computer has RAM and ROM :
Cache memory 1s a fast semiconductor memory which is used to increase the speed of processing by
making current programs and data available to the CPU at a rapid rate. Cache memory is a relatively
small, high speed memory that stores the most recent used instructions or data It acts as a high-
speed buffer between main memory and the CPU.The cache memory is placed in between CPU and
main memory. Access time is the time it takes a device or program to locate information and make it
available to the computer for further processing. Cache memory access time is about 0 5 to 2 5 ns
which is much less than that of the main memory The access time of main memory is about 50-70 ns
Because of its very high cost, the capacity of the cache memory deployed 1s 2 to 3 percent of that of the
main memory. The access time of mass storage devices such as hard disks are measured in
milliseconds (ms)
The computer uses the main memory RAM and ROM. RAM is volatile and loses its contents when the
computer 1s switched off. ROM 1s non-volatile but reads only memory Thus, secondary storage is
needed to store data for a long term basis and success whenever needed.
(e) Explain the disk layout of Hard disk and CD-ROM? Also. explain the access time of magnetic disk
and CD-ROM. Which of these has smaller access time?
Solution:
Track Sector -
Track
Disk Sector
The disk is divided into tracks. Each track is further divided into sectors. The point to be noted here
is that outer tracks are bigger in size than the inner tracks but they contain the same number of
sectors and have equal storage capacity. This is because the storage density is high in sectors of the
inner tracks whereas the bits are sparsely arranged in sectors of the outer tracks. Some space of every
sector 1s used for formatting. So, the actual capacity of a sector is less than the given capacity.
CD-ROM technology uses 12-centimeter (4.7-inch) compact disks (CDs) similar to those used in
stereo music systems Each disk can store more than 600 MB, That is approximately equivalent to
400 1.44 MB floppy disks or 300,000 double-spaced pages of text.
CD-ROMs use long spiral tracks to store data serially, as shown 1n figure above. The track 1s divided
into blocks of same size as shown in the figure. ACD-ROM disk rotates at a variable speed so that the
pits are read by the laser at a constant linear speed. The speed of the disk 1s adjusted in such a way
that the track passes under the read/write head at a constant linear velocity.
Disk access time is how long it takes to obtain the first data character after initiating a request It
includes the time to move the read/write head to the track (seek time) and time to rotate the platter to
the sector (latency). Disk access time 1s always given as an average, because seek time and latency
vary depending on the current position of the head and platter.
Memory access time is how long it takes for a character in RAM to be transferred to or from the CPU.
Fast RAM chips have an access time of 10 nanoseconds (ns) or less See SDRAM.
While access times of fast hard disks are typically from 5 to 10 milliseconds, solid state drive (SSD)
access times are in the 25 to 100 microsecond range. SSDs are as much as 100 times faster because
there is no mechanical seek time or latency associated with flash memory storage. However, access
times for all storage types are only one metric. Channel speed (transfer rate) and caching contnbute to
overall storage performance.
The access time of the magnetic disk is lesser than the optical disk.
Solution.
Various pernpherals can be connected through parallel port, which 1s a parallel communication
physical interface A parallel port transmits 8 bits of a byte of data in parallel. It 1s used for
transmitting fast data over short distances It 1s used to connect a pmntei to a computer Since a
parallel port transmits an entire byte at a time, it operates 1/O devices ata relatively high speed A
Parallel port is prunanly used to connect printers to a computer and hence it 1s often called a printer
port.
.
a
al
Serial Port:
Serial port transmits one hit of a byte, one at a ume as a single stream of bits It 1s meant for
transmutting slow data over long distances. Communication over a phone 1s an example of serial
communication. It is a serial communication physical interface which transmits one bit at a time.
Dial-up modems and serial mice use serial ports
(ii) Mouse :
A Mouse 1s a handy device which can be moved on a smooth surface to cause the movement of a
cursor on the screen. It is a pointing device which 1s used to input data and information into the
computer system by pointing on it. Physically, a mouse contains a small case, held under one of the
user's hands with one or more buttons. For GUI-based systems a mouse 1s an essential pointing-
device. The cursor of the mouse moves 1n the same direction in which the mouse ball rolls.
Light pen :
A Light pen ts a pen Itke light-sensitive device. It 1s connected by a wire to the computer terminal to
detect the CRT beam when pointed towards the screen and generate a narrow electrical pulse that can
be fed to the computer as an input signal It is used to draw on the screen or to point to the display ed
objects. It operates by detecting the light emitted by the screen phosphors.
A light pen can work with any CRT monitor but not with LCD monitors. It is used by architects and
engineers for CAD applications and editing
Voice based input device in which speech is used to input data or system commands directly into
a system. Such equipment involves the use of speech recognition processes, and can replace or
supplement other input devices.
Some voice input devices can recognize spoken words from a predefined vocabulary, some have to be
trained for a particular speaker When the operator utters a vocabulary item, the matching data input
is displayed as characters on a screen and can then be verified by the operator The speech recognition
process depends on the comparison of each utterance with words appearing in a stored vocabulary
table The table is created or modified bv using the voice input equipment together with a keyboard. A
data item or system command is typed and the related spoken word is uttered, several times. The
spoken word is then analyzed and converted into a particular bit pattern that is stored in the
vocabulary table.
Keyboard input :
It is the most common input device used for entering data and information into the computer system.
This 1s the standard input device attached to all computers The keyboard is a primary device for
inputting text by pressing a set of keys. All the keys are neatly mounted in a keyboard connected to the
computer system.
The Inkjet printer works on inkjet technology and produces better quality printouts than dot matrix
printers. These print by spraying a controlled stream of tiny ink droplets accurately on the paper
forming either dot matrix or solid characters. The printing quality of these printers is very good with a
speed of 700 or more characters per second. These are non-impact and hence are relatively silent
during the printing process. These printers are easy to use and can be used to print color pages.
Laser printers :
This is a high quality, high speed and high volume technology printer. In laser printers, a laser beam
is used to produce an image on a drum. The light of the laser alters the electrical charge on the drum
wherever it hits it. The drum is then rolled through a reservoir of toner, which 1s picked up by the
charged portionsof the drum. Finally, the toner 1s transferred to the paper through a combination of
heat and pressure. Laser printers produce very high quality text and graphics but are expensive. The
technology used by them is the same as that of photocopying machines. The speed of laser printers
varies from 10 pages per minute to 200 page per minute. Laser printers are also called page printers;
because they print a whole page at one go.
(g) Explain the characteristics/functions of the following in the context of a computer system:
(i) Proxy Server
(ii) Motherboard
(ii) Scandisk utility
(iv) My Documents
Solution
(ii) Motherboard
The motherboard is the main circuit board of a microcomputer. It is also known as the main board or
system board It is the circuit board in which all the components are connected through cable within a
personal computer. Many devices are connected with motherboard directly or indirectly.
Motherboards usually provide the interface between the CPU memory and input/output peripheral
cireuits, main memory, and facilities for initial setup of the computer immediately after power-on.
Scandisk 1s a utility provided with Windows computers. Scandisk scans your disks to see if there are
any potential problems on the disk, such as bad disk areas. Since disks are magnetic media, all disks,
including your hard drive can
be corrupted.
(iv) My Documents
It is the default space where all the files are stored unless we specifically instruct the computer to save
at a specified location. It is a special folder where the system stores user's files, pictures, music,
download ete.
(7 x 4 = 28)
(a) What are the key features of chent/server architecture? What are the benefits of using
chent/server architecture? How 1s file sharing architecture different from chent/server architecture?
Solution
* The data is centralized within the system that is maintained in a single place.
* The model is efficient in delivering resources to the client and also requires low-cost
maintenance.
¢ Itis easy to manage, and the data can be easily delivered to the client.
* As the data is centralized, this system is more secure and serves added security to the data.
* Within this type of model, more clients and servers can be embedded into the server, which
makes the performance outstanding and increases the model's overall flexibility.
In file share architecture, resources could be added as and when necessary or desired. Thus, it
provided a low cost entry point with flexible arrangement The drawback was that application logic
was executed on the client and server typically provided files to store data It worked fine as long as
the volume of data transfer was low and shared usage and content update was low As the number of
online users grew, the network traffic got congested and the file sharing got strained. Taking into
account the demerits of the file server architectures, the client/ server architecture made its advent.
As the capacity and power of personal computers improved, the need to share the processing
demands between the host server and the client workstation increased. This need for greater
computing control and more computing value led to the evolution of chent/server technology.
(b) Explain the characteristics of object-oriented programming? What are the advantages of using
object-oriented programming?
Solution:
Inheritance: is the process by which a new class is created using an existing class. It is a way to
compartmentalize and reuse code since it allows classes to inherit commonly used state and behavior
from other classes. The new classes are called the derived classed and the main class is called the
parent class.
When working with object-oriented programming languages, you know exactly where to look when
something goes wrong. “Oh, the car object broke down? The problem must be in the Car class'” You
don't have to go line-by-line through all your code
That's the beauty of encapsulation. Objects are self-contained, and each bit of functionality does its
own thing while leaving the other bits alone. Also, this modularity allows an IT team to work on
multiple objects simultaneously while mininnzing the chance that one person might duplicate
someone else's functionality,
Suppose that in addition to your Car object, one colleague needs a RaceCar object, and another needs
a Limousine object Evervone builds their objects separately but discover commonalities between
them In fact, each object is just a different kind of Car. This 1s where the inheritance technique sav es
time’ Create one generic class (Car), and then define the subclasses (RaceCar and Limousine) that are
to inherit the generic class's traits.
Of course, Limousine and RaceCar stil] have their unique attributes and functions. If the RaceCar
object needs a method to “fireAfterBurners” and the Limousine object requires a Chauffeur, each class
could implement separate functions just for itself. However, because both classes inherit key aspects
from the Car class, for example the “drive” or “fillUpGas” methods, your inheriting classes can simply
reuse existing code instead of writing these functions all over again.
What if you want to make a change to all Car objects, regardless of type? This is another advantage of
the OOP approach. Make a change to your Car class, and all car objects will simply inherit the new
code.
Riffing on this example, you now need just a few drivers, or functions, like “driveCar,” driveRaceCar™
and “DriveLimousine.” RaceCarDrivers share some traits with LimousineDrivers, but other things,
hke RaceHelmets and BeverageSponsorships, are unique.
This 1s where object-oriented programming’s polymorphism comes into play. Because a single
function can shape-shift to adapt to whichever class it’s in, you could create one function in the parent
Car class called “drive” — not “driveCar” or “driveRaceCar.” but just “drive.” This one function would
work with the RaceCarDriver, LimousineDriver and so on. In fact, you could even have
“raceCar.drive(myRaceCar Driver)” or “limo.drive(myChauffeur).”
Many people avoid learning OOP because the learning curve seems steeper than that for top-down
programming. But take the time to master OOP and you'll find it’s the easier, more intuitive approach
for developing big projects.
Object-oriented programming 1s ultimately about taking a huge problem and breaking it down to
solvable chunks. For each mini-problem, vou write a class that does what you require. And then —
best of all — you can reuse those classes, which makes it even quicker to solve the next problem.
This isn’t to say that OOP 1s the only way to write software. But there’s a reason that languages like
C++, C# and Java are the go-to options for serious software development.
(c) List and explain the functions of the following in the context of software:
(i) Types of Software Licensing
(11) Software as a service
(111) Diagnostic programs
(iv) Perverse Software
Solution
The licensing tvpe generally depends on whether the software is open source software, is meant for
individual use or enterprise wide commercial use:
Individual License: It allows us to install the software only on a single stand alone machine. It may be
a perpetual license or Subscription based. Perpetual license allows us to install and use the software
indefinitely. Subscription based license allows you to use the license for the specified time, after which
you may renew the subscription or remove the software.
Open Source License: It grants you the mght to freely modify and redistribute the software.
Commercial License: These are mostly for the large enterprises that use software for commercial
purposes.. Following are the main licensing models:
¢ Traditional model
* Transaction-based model
* Rental model
* Technology Partnerships
Software-as-a-Service (SaaS) is basically a software delivery model where customers can use the
software application as a service on demand and pay for it per usage. It is based on the concept of
renting application functionality from a service provider rather than buying, installing and running
the software yourself.
A diagnostic program is a program written for the purpose of locating problems with the software,
hardware, or both, or a network of systems. A diagnostic program provides solutions to the user to
solve issues.
(iv) Perverse Software :
Perverse software is a program which causes hindrances in other programs execution in such a way
resulting in modification or complete destruction of data without the user's intention or even
sabotaging the operational system.
Perverse Software is also known as Malicious software or malware. It 1s a type of software that is
designed to secretly access a computer system, without the owner's consent, and damage the system.
Solution:
The Graphical User Interface (GUI) accepts commands primarily in the form of drop-down
menus, mouse movements, and mouse clicks. The Command Line Interface (CLJ) relies on typed
commands which provide direct access to various methods within operating system such as File
system, I/O system, and network services. UNIX allows certain class of users called superusers to use
some kind of commands for changing the platform or access rights.
Directory structures for each I/O device in the system and tools to access and move around these
structures. The directory structure provisions are made to move easily from one structure to another.
It also protects files and limit file access to authorized users
File management systems are particularly important in systems in which secondarv storage devices
are shared in common by multiple users, since they provide a directory system that assures that there
is no duplicate use of physical storage.
Every operating system, large or small, provides input/output services for each device in the system
The operating system includes I/O device driver programs for each device installed on the system
These drivers provide services to the file management system and are also available, through the API,
to other programs for their use. The I/O device drivers accept I/O requests and perform the actual
data transfers between the hardware and specified areas of memory.
In multitasking operating system, OS determines which job will be admitted to the system and
in what order. This process 1s called job scheduling. Many modern systems further break the process
down into smaller units called threads. A thread is an individually executable part of a process
management. It shares memory and other resources with all other threads in the same process, but
can be scheduled to run separately from other threads.
Today, the requirement for an interactive computing facility can be, and often is, Operating Sytem
met by the use of a dedicated microcomputer. That option was not available in the 1960s when most
computers were big and costly. Instead time sharing was developed. Just as multiprogramming
allows the processor to handle multiple batch jobs at a time, multiprogramming can be used to handle
multiple interactive jobs In this latter case, the technique 1s referred to as time sharing, because the
processor's time is shared among multiple users. In time sharing system, multiple users
simultaneously access the system through terminals, with the operating system interleaving the
execution of each user program in a short burst or quantum of computation.
The purpose of the memory management system is to load programs into memory 1n such a way as to
give each program loaded the memory that it requires for execution.
The memory management system has three primary tasks. It attempts to perform these tasks in a way
that 1s fair and efficient to the programs that must be loaded and executed.
1. It keeps track of which parts of the memory are currently bemg used and by which process into
memory together with the space being used and also keeps track of available space.
2 It maintains one or more queues of programs waiting to be loaded into memory as space becomes
available, based on such program criteria as priority and memory requirements.
3 When space is available, it allocates memory to the programs that are next to be loaded. It also de-
allocates a program’s memory space when it completes execution. The de-allocated space is made
available for other programs.
(e) Draw a flow chart and write an algorithm to find the sum of the digits of anv two digit number
given as input (Hint: For the input number 68, the sum of digits would be 6 + 8 = 14 The key is to
extract each digit.).
Solution:
Algorithm :
Step 1: Start
Step 2: Read num as integer
Step 3: while (num > @)
begin
dig « num MOD 10;
sumOfDigits <« sumOf Digits + dig;
num <« num DIV 10;
end
Step 4: Print sumOfDigits
Step 5S: Stop
Flow Chart :
(START
ae
50
Cun
L : a
v TRE v
lor
han $ sen PN Sh
|
v
S Spe =:
(f) Explain the meaning and output of each line of the following program segment. How many times
the loop at (ii) and (iii) will be executed?
(1) int n = 10,
int t, X=1;
(1) for (=1; t<=n, t=f+2)
{
(in ace a
}
(i, ) printf (“The final value is %d", x);
Solution,
ist Part:
(i) 1°' program segment defines the initialization of variables Here “i” is a variable of type integer
and “n” is a variable type natural number. “int i” is used to declare one variable at once, 'x' is
also a variable starting from 1.
(ii) 2°4 program segment indicating “check FOR condition”. From the 2"4 program statement we
can clearly say that Looping method is used to find the product of first four natural numbers.
(ili) “x = x* i” - It is an arithmetical] operation. This command 1s used to check what value of 'x'
comes out when 'x' multiplied by i.
(iv) printf ("The final value is %d _", x) — this is a function used for 'x’ in C language It is an
inbuilt library function, defined in stdio.h (header file). It prints the given statement i.e., “The
final value is %d”, x” to the console.
So, after the execution of program, it pnnt “The final value is 945”
2nd Part:
(g) Identify the software or type of software that will be required for the following situations. Also.
explain the steps that would be performed to solve the situation in question, if applicable.
(1) Asoftware development company maintains the list of tasks, expected time of completion of the
tasks on which staff, people are working. Which software would help the company in planning and
scheduling the projects.
(i) You are planning to apply for a job in at least 10 companies. You are required to create a letter for
the human resource management of each company Identify which software and what features of that
software would be used by vou. Explain these features
(11) You want to judge the performance of each emplovee by finding the number of hours he/she has
worked in last month. The emplovee attendance data (with 1n and out time) is available to vou. This
data 1s to be analyzed and suitable graphs are to be created to highlight individual work hours.
Identify the suitable software and the features of the software that would be needed to create graphs
(ix) You are required to create a meeting information system for an organization. This svstem should
setup meetings for different groups of employees informing them about meeting date, meeting
agenda, notes etc. What kind of software will you use for such work?
Solution,
(i) Microsoft Office Projects can be used to maintain the company in planning and scheduling a
project. It creates an expected list of tasks that are to be performed, expected time that would be taken
to complete those tasks and number of persons needed to complete those tasks.
(ii) Applicant can use Microsoft Office Word for this purpose. He/she can use mail merge to
send the same letter to the human resource management of the 10 different companies.
¢ Creating business papers with a variety of images, such as photos, charts, and diagrams.
* Saving and reusing pre-formatted text and elements like cover pages and sidebars.
* Making letters and letterheads for both personal and professional use.
¢ Creating a variety of documents, including resumes and invitation cards.
¢ Producing a variety of letters, ranging from simple office memos to legal copies and reference
documents
« Microsoft Office Excel can be used to make the monthly sales report of each emplovee and
analyze data by using a graph.
(iii) In MS Excel, Charts and Graphs can be created based on data 1n the sheets. To create a chart to
represent data graphically:
(iv) Project management software covers many types of software, including scheduling,
meeting date, meeting agenda, notes, communication etc.
Q3. (Covers Block 3)
(6 x 4 = 24)
(a) What are the advantages of Computer Networks? Explain the following terms in the context of
computer networks.
(1) Mode of transmission
(1) Packet and Circuit Switching
(111) Optical Fiber
(i, ) Radio Wave transmission
Solution
a) Resource sharing: A network 1s needed because of the desire to share the sharable programs,
data, and equipment available to anyone on the network without regard to the physical location of the
resource and the user. You can also
share processing load on various networked resources.
b) High reliability: A network may have alternative sources of supplv (e.g., replicated files, multiple
CPUs, etc.). In case of one resource failure, the others could be used and the system continues to
operate at reduced performance. This is a very important property for military, banking, ar traffic
control, and many other applications.
c) Cost-benefit advantage: A network may consist of many powerful small computers, one per
user. You can keep the data and applications on one or more shared and powerful file server
machines. This is called the client-server model. Such model offers a much better price/performance
ratio than old mainframes. At present many server services have been moved to Internet based
resources set up by a third party and shared by many (called cloud). This allows users to use powerful
server applications and data services without maintaining servers. Such system may bring down the
cost further. However, such models still have several issues that are being debated.
d) Scalability: The ability to increase system performance gradually by adding more processors
(incremental upgrade).
In the long run, the use of networks to enhance human-to-human communication may prove more
important than technical goals such as improved reliability
(i) Mode of transmission :
t. Simplex
2. Half duplex
3. Full duplex
Simplex Mode : In simplex mode of data communication, data flow 1s uni-directional. This means
that data travels only in one direction i.e., from a sender to a receiver. The receiver cannot respond
back to the sender.
Half Duplex Mode: Half duplex communications occurs when data flows 1n both directions; although
in only one direction at a time.
Full Duplex Mode: In full duplex mode of data transmission, data is transmitted in both the direction
simultaneously. This means that both the devices in a network can send and receive the data at the
same time.
This terminology has started from telephone network, where switching offices were places having
switches that were used to create connection from one source to destination. Circuit switching
involves creating a switched path for entire communication, for example, when vou make a telephone
call the connection is established by switching and is available for the whole communication. Whereas
in packet switching a message is broken in small packet which are handed over from a source to
destination through many small steps.
An optical fiber consists of two concentric cylinders: an inner core surrounded by a cladding. Both the
core and the cladding are made of transparent plastic or glass matenal, which transmit signals in the
form of hght. Optical fiber use reflections to guide light through a channel. The density of the core and
cladding must differ sufficiently to reflect the beam of light instead of refracting.
Optical fibers can provide bandwidth to distance ratios in order of 100s of MHz per kilometer Like
other cables, hundreds of optical fibers are usually housed within one cable.
(iv) Radio Wave transmission :
Radio waves have frequencies between 10 kHz and 1 gigahertz. The range of electromagnetic
spectrum between 10 kHz and 1 GHz is known as radiofrequeney (RF)
Radio waves are omnidirectional When an antenna sends radio waves, they are propagated 1n all
directions This defines that the sending and receiving antennas do not have to be aligned.
A sending antenna sends waves that any receiving antenna can receive It 1s based on the wavelength,
strength. and purpose of transmission There are various types of antennas, as display in the figure
Radio waves are those waves that propagate in the sky mode, can tiavel long distances Radio waves
are those of low and medium frequencies, can penetrate walls Thus an AM radio can receive signals
inside a building also
(b) Explain the characteristics of Bus topology and Ring topology Also explain the characteristics of
LAN and WAN List one appheation each of LAN and WAN
Solution
Ina ring topology, each node has a dedicated point-to-point line configuration with the two nodes
on either side of it. A signal 1s passed along the ring in one direction, from node to node, until it
reaches its receiver. Each node in the mng 1s integrated as a repeater. When a node receives a signal
intended from another node, its repeater regenerates the bits and passes them along.
Characteristics of LAN :
Characteristics of WAN:
¢ The software files wil] be shared among all the users; therefore, all can access to the latest files.
¢ Any organization can form its global integrated network using WAN.
Application of LAN :
* LAN is used for school environment, offices, hospitals etc as it allows sharing of resources like
sharing data, scanners, printing and internet.
* LAN serves users at home to access internet
* LAN’s are widely used in manufacturing industries where a central server coordinates the
activities of other machines.
« High speed LANs are typically used to connect many slower networks together.
Application of WAN:
Solution.
(i) Modem
External modem
' nal
ateraal modem
Figure : Modems
The network interface card (NIC) provides the physical connection between the network and the
computer. Most NICs are internal, with the card fitting into an expansion slot inside the computer.
Network interface cards are a major factor in determining the speed and performance of a network. It
is a good idea to use the fastest network card available for fast transfer of data. The most common
network interface connection today is Ethernet cards
(iii) Repeaters
Figure : Repeater
When a signal travels a network cable (or any other medium of transmission), they lose strength,
degrade and become distorted in a process that is called attenuation A repeater is a device that
electrically amplifies the signal it receives and re-broadcasts it They are used when the total length of
your network cable exceeds the standards set for the type of cable being used
<
4 Transport <
> Network
3 Network
s ‘- Lower
2 Data Link (between
P- Media Systems) Layer
1 Physical y J
(d) What is a URL and IP address? How are they related? How URL can be converted to an IP
address? Explain with the help of an example. Explain how a subnet mask 255.255.255.0 will be able
to help in identifying various components of an IP address.
Solution,
URL: A URL, also known as a Uniform Resource Locator, is used to provide humans with an easy to
remember website name that can be quickly entered into a web browser. ‘The terms URL and URI are
often used interchangeably
IP address : An IP address 1s a long string of numbers assigned to every device connected toa
network that uses Internet Protocol as the medium for communication, it’s the digital world’s
equivalent of the mailing address associated with your home or workplace.
Relation between URL and IP address : Whenever you wish to visit a web page on the internet,
you request that page from a web server. When you type a URL into your browser (for example,
"http. //www.abe.com/"), vour web browser requests the page (or file) named index.html from the
web server and the web server sends the page back to the web browser. Let us identify these steps in
more details.
1. Asa first step you may puta URL hke http://Awww.abe.com/index.html or equivalent Domain
name www.abc.com as the address of the website that you want to access through your web
browser.
2. The Web browser tries to resolve the IP address of the website www.abe com by the
information available in its own cache memory If web server does not have the information
about IP address stored in its cache, it requests the IP address from Domain Name System
(DNS) servers. The DNS server tells the browser about the IP address of the website.
3. Once the web browser knows the IP address of the website, it then requests the web page
(index.html page which is the home page in the present example) from the web server.
4. The web server responds by sending back the requested web page. If the requested page does
not exist then it will send back the appropriate error message.
. Your web browser receives the page from the web server and displays it as per the display
mn
For converting domain name into IP address, it first accepts request from programs and other servers.
After accepting the request, the name server can do the following:
© If it knows the IP address of requested domain, it will answer the request with an IP address of
the requested domain.
° If it does not know the requested domain name, it will contact another name server and try to
find the IP address.
© If the requested domain name is invalid or domain does not exist, it will return an error
message.
Example:
When we type a URL into your browser (for example, "http://wwww.abe.com/"), our web browser
requests
the page (or file) named index.html from the web server and the web server sends the page back to
the web browser. Let us identify these steps in more details:
1) As a first step vou mav put a URL hke Attp:/Avww.abe.com/index html or equivalent Domain
name tvww.abe.com as the address of the website that we want to access through our web browser
2) The Web browser tries to resolve the IP address of the website www abc.com by the information
available in its own cache memory. If web server does not have the information about IP address
stored 1n its cache, it requests the IP address from Domain Name System (DNS) servers. The DNS
server tells the browser about the IP address of the website.
3) Once the web browser knows the IP address of the website, it then requests the web page
(index.html page which is the home page in the present example) from the web server.
4) The web server responds by sending back the requested web page. If the requested page does not
exist then it will send back the appropriate error message.
5) Your web browser receives the page from the web server and displays it as per the display
requirements of the web page
The subnet mask 1s similar to an IP address - it is also a 4-byte (or 32-bits) field and can be
represented using dot notation. In binary, it always comprise a series of ones, followed by sequence of
zeros. The total number of bits is 32, but the number of ones and zeros determines the nature of the
mask. By comparing any IP address with a given mask, you can split addresses into two parts, a
network ID and a device ID. The following example explains this concept in more details
Suppose our computer has an IP address of 193.168.1.35 and I want to access a Jocation 193.168.1.56,
as your subnet mask is 255.255.255.0, it will give me following answers:
Result: 193.168.1.0
Result: 193.168.1.0
Since, the Result of both the operation points to same Net ID, therefore, vou can conclude that the
referred destination IP address 1s local.
(e) What 1s a search engine? What are the basic actions performed by a search engine? Explain. What
would be search terms if \ou are looking forward to the following:
(:) List of Universities offering PhD Programme in Computer Science
(1) List of Browsing software.
Solution:
Search Engine:
A search engine is a software program that helps people find the information they are looking for
online using keywords or phrases.
Search engines are able to return results quickly—even with millions of websites online—by scanning
the Internet continuously and indexing every page they find.
When a user enters a search term, the search engine looks at the website page titles, contents and
keywords it has indexed and uses algorithms (step-by-step operations) to produce a hist of sites—with
the most relevant websites at the top of the list.
¢ Crawling - search engines use programs, called spiders, bots or crawlers, to scour the internet.
They may do this every few days, so it is possible for content to be out-of-date until they crawl
your website again.
* Indexing - the search engine will try to understand and categorise the content on a web page
through ‘keywords’. Following SEO best practice will help the search engine understand your
content so you can rank for the right search queries.
¢ Ranking - search results are ranked based on a number of factors These may include keyword
density, speed and links. The search engine's aim is to provide the user with the
most relevant result.
(1) To search List of Universities offering PHD Programme in Computer Science with
great efficiency we can type in the following way:
More tems
https //engineenng careers360 com > colleges » list of ph ? Trafimo (in) 0/727 20K Kw (in) 09820
https ‘Awww phdstudies. com> PND — } Trafimo (in) 400/10 70K Kw(in) 6/479
(ii) To search List of Browsing Software with great efficiency we can type in the following way:
"browsing software"
Screenshot:
Go: gle browsing software x
oO
{=
oa (2) Images News (2) Videos © Maps : More Tools
https /Awww g2 com> categonies> browser =: Traffmo (in) 1400/1 85M - Kw (in) 82/36 76K
(f) Explain the following in the context of Internet and its applications:
(1) E-mail
(ii) Collaborations
Solution:
(i) E-mail :
E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly
used features over communications networks that may contain text, files, images, or other
attachments. Generally, it is information that is stored on a computer sent through a network to a
specified individual or group of individuals
Uses of E-mail:
* The one use that comes to focus more often is that we can contact the person any time of the
day, and he/she can read the mail and respond at their own convenience. This makes the email
to respect the individual's time and avoid unnecessary communications.
¢ The traditional method of contacting people anywhere 1n the world used to be costly. With a
single click, mail can be sent to anyone who has a mail address, which helps to maintain
contacts easily And this is done with no cost at all if the system is connected to the internet.
* Emails can be used for many purposes and this depends on the person who uses them. It can be
used as a means of communication, informing a failure or an update, helping the team with
instructions and guidelines to follow, route map for a trip, instructions to be followed for
cleaning or hospitalizing and anything that seems relevant to the user
¢ In educational terms, emails can be sent to apply for admissions, receive results and job offers
It helps the communication smooth and simple that people find it easy by clicking on the send
button.
(ii) Collaborations :
Managers should ensure that employees understand new technologies. For example, Web
collaboration software packages include tools for monttoring and evaluating attendee activities during
Web training sessions.
Many software manufacturers and vendors provide Web collaboration tools. Examples include Jive
Software, AtTask and Maymoon.