World's most popular travel blog for travel bloggers.

 In function gcd(m,n), each iteration of while loop has one test condition, one division

and two assignment that will take constant time. Hence number of times while loop
will execute will determine the complexity of the algorithm. Here it can be observed
that in subsequent steps, remainder in each step is smaller than its divisor i.e smaller
than previous divisor. The division process will definitely terminate after certain
number of steps or until remainder becomes 0.

Best Case
If m=n then there will be only one iteration and it will take constant time i.e O(1)

Worst Case
If n=1 then there will be m iterations and complexity will be O(m)
If m=1 then there will be n iterations and complexity will be O(n)

Average Case

By Euclid‟s algorithm it is observed that GCD(m,n) = GCD(n,m mod n) = GCD(m mod n, n mod (m mod n))

Since m mod n = r such that m = nq + r, it follows that r < n, so m > 2r. So after every two iterations, the larger number is reduced by at least a factor of 2 so there are at most O(log n) iterations.

Complexity will be O(log n), where n is either the larger or the smaller number.

 ATM is a form of data transmission that allows

voice, video and data to be sent along the same network. In contrast to ATM, in the
past, voice, video and data were transferred using separate networks. For example,
voice was transmitted over the phone, video over cable networks and data over an
internet work. ATM has its similarities with the frame relay, particularly in the term
of data unit size, frame replay used a variable length data unit called frame. On the
contrary, ATM used fixed data unit named as “cell”, we can say ATM as Cell-Relay
in analogy to frame relay.

 • GSM is already used worldwide with millions of subscribers.

• International roaming allows subscriber to use a single mobile phone throughout
Western Europe. CDMA works in Asia, but not in France, Germany, the U.K.
and other popular European destinations.

• GSM is mature which started in the mid-80s which is more stable network with
robust features. CDMA is still building its network.
i) GSM’s maturity means engineers cut their teeth for the technology to
create an unconscious preference.

• The availability of Subscriber Identity Modules, which are smart cards that
provide secure data encryption which gives GSM mobile commerce
advantages.

 Cellular Mobile System has come a long way as at present scenario, every person

carries a cellular phone in his/her hand. This tremendous growth has established the
growth of cellular technology. From a cordless phone which gave mobility to users
but only of short distance in meters to a basic phone which has overcome the
disadvantage of short range cordless phone. And now today, a basic cellular phone is
converted to a smart multimedia cellular phone which is used not only for making
calls but is used to click pictures, listen songs, record voice, checking mails etc. In this
section, we will draw your attention towards the emerging generations of a wireless
cellular phone.

Before starting with generations, we will discuss the two channel access technologies

Time Division Multiple Access (TDMA) and Frequency Division Multiple Access
(FDMA) which are used in these generations.

Frequency Division Multiple Access (FDMA) allocates individual frequency channel
to an individual user at a time. Each user gets a frequency channel whenever the user
demands for it. Any other user cannot use the same frequency channel until the
assigned channel is given back by the user to the pool of freely available frequency
channel.

Time Division Multiple Access (TDMA) divides an individual frequency channel into
number of time slots. These time slots are then allocated to users on demand. Unlike
FDMA, one or more user can share the same frequency channel. Each slot is used
either for transmitting or receiving signals. Therefore, the data transmission is noncontinuous in nature which makes the hand-off simpler. Consecutive slots are used to
transmit the data.

First Generation (1G) –
First Generation also called 1G is based on analog Frequency Modulation (FM) and
Frequency Division Multiple Access (FDMA). 1G uses circuit switched technology
and came in 1980. According to this generation, each user has allocated with a
dedicated frequency channel. Moreover, this generation made solely to provide voice
services to its users. It was not intended for any data services. These lacked features in
1G were the biggest reason behind the rise of Second Generation (2G).

Second Generation (2G) –
Second Generation provides the voice as well as data services to its users. Unlike 1G,
no user has allocated dedicated frequency channel. 2G uses digital modulation
technique and multiple access techniques like Time Division Multiple Access
(TDMA) and Code Division Multiple Access (CDMA). 2G came in 1990 and uses
circuit switched technology. Every user in 2G uses a time-sharing frequency channel.
In this generation, there are 3 TDMA standards which are – Global System Mobile
(GSM), Interim Standard 136 (IS 136) and Pacific Digital Cellular (PDC) and one
CDMA standard called 2G CDMA or Interim Standard 95 (IS 95) CDMA.

• Global System Mobile (GSM) – For every 200 KHz radio channel, there are 8
times slotted users. 2G TDMA standard GSM is used in countries like Europe,
Australia, Asia and South America. It is also used in India

• Interim Standard 136 (IS 136) - For every 30 KHz radio channel, there are 3
times slotted users. 2G TDMA standard IS 136 is used in countries like
Australia, North America and South America. IS 136 is also known as US
Digital Cellular (USDC) or North American Digital Cellular (NADC).

• Pacific Digital Cellular (PDC) – This is a Japanese standard and is very similar
to IS 136 with around 50 million users

• 2G CDMA or Interim Standard 95 (IS 95) CDMA – For every 1.25 MHz
channel, there are up to 64 users which are orthogonally coded. This standard is
also known as CDMAOne and is used in Australia, Korea North America,
Japan, China and South America.

Evolution to Mid of Second Generation (2.5G) –
After the second generation comes 2.5G and introduced in the year 2000. 2.5G is
intended for faster data rates which are required for supporting modern internet
applications. Existing 2G equipment is modified (both hardware and software) to
support 2.5G services for enhanced data rates. Enhanced rata rates are provided for
services such as web browsing, mobile commerce, e-mail services and location based
mobile services. 2.5G also supports web browsing technology like Wireless
Application Protocol (WAP).

• High Speed Circuit Switched Data (HSCSD) – As the name suggests, this
TDMA upgrade is a circuit switched technology and provides higher data speed
rates as compared to 2G. This technology upgrade is the first attempt to provide
better data rates for GSM. Rather than allocating a single time slot to a single
user, the higher data rates are provided to users by providing consecutive time
slots. This technology also takes care of error control coding algorithm.

• General packet Radio Service (GPRS) – Unlike HSCSD, this TDMA upgrade is
a packet based technology. GPRS supports more users as compared to HSCSD.
It uses 2G TDMA modulation format but redefines air interface for better
packet data access. It is more suitable for non real time applications like
retrieval of email, faxes and asymmetric web browsing. Installation of internet
gateway and new routers at base station is mandatory for using this technology.

• Enhanced Data rates for GSM Evolution (EDGE) – EDGE provides better data
rates than GPRS by using new digital modulation technique called 8-PSK
(Phase Shift Keying).This is implemented by upgrading hardware and software
at base station. This technology is also called as Enhanced GPRS. Nine
different air interface formats are defined by EDGE known as Multiple
modulation and Coding Schemes (MCS) with error control protection.

Third Generation (3G) –
3G is designed to provide higher data rates with much available wider bandwidth. It
uses packet switched technology and users uses smaller bandwidth. This generation
allows the identification of user’s location. The 3G technology provides the services
like transparent roaming, communication using Voice Over Internet Protocol (VOIP),
receives live music, interactive live web sessions, better network capacity, multi
mega-bit internet access, readily available internet access and simultaneous exchange
of voice and data packets using a single cellular mobile.

 Confidentiality

Confidentiality means keeping information secret from unauthorized access and is
probably the most common aspect of information security. It is important to protect
confidential information. An organization needs to guard against those malicious
actions that endanger the confidentiality of its information. For example, an account
user is authorized to see his account transaction online and no other account user can
access this data as it is confidential.

Integrity
Information needs to be changed constantly. In a bank, when a customer deposits or
withdraws money, the balance of their account needs to be changed. Integrity means
that changes should be done only by authorized users and through authorized
mechanisms. Moreover, the changes should get reflected at all the ends on which the
changed information is accessed.

Availability
The third component of information security services is availability. The information
created and stored by an organization needs to be available to authorized users and
applications. Information is useless if it is not available o authorized users.
Information needs to be changed constantly, which means that it must be accessible to
those authorized to access it. Unavailability of information is just as harmful to an
organization as a lack of confidentiality or integrity. Imagine what would happen to a
bank if the customers could not access their accounts for transactions. Therefore,
information should be accessible and useable upon appropriate demand by an
authorized user and availability is the prevention of unauthorized withholding of
information.

Authentication
Authentication is the process by which a person or other entity proves that it is who
(or what) it says it is. For example, a bank authenticates a person or entity that deal
before transferring something valuable, such as information or money, to or from, it.
Authentication is achieved by presenting some unique identifying entity to the
endpoint that is undertaking the process. An example of this process is the way you
authenticate yourself with an ATM - here you insert your bank card (something you
have) and enter your personal identification number (PIN –Personal Identification
Number, something you know). Another example can be the authentication process for email account. In this case, you have the email address and you know the corresponding account password to access the account.

Non-Repudiation
Non-repudiation is the prevention of either the sender or the receiver denying a
transmitted message. A system must be able to prove that certain messages were sent
and received. Non-repudiation is often implemented by using digital signatures. For
example, a user A sent a message to user B. At later stage, user A should not deny of
having sent the message to user B.

Other Security Service –

Access Control
Access control means control of access through identification and authentication. A
system needs to be able to identify and authenticate users for access to data,
applications and hardware. In a large system there may be a complex structure
determining which users and applications have access to which objects. This is done
through Access Control List (ACL). For example, an account holder while checking
his data online can only view data but cannot modify it. This is because of the reason
of access given to the user on the basis of his role and identity.

 Information Technology (IT) Security – consists of following types:

  1. Application security,
  2. Computer security,
  3. Data security,
  4. Information security
  5. Network security

Application Security
Application security prevents attack and vulnerabilities on an application. This
application can be a mobile application or any other application such as web
application etc. The security of an application remains throughout its lifecycle from
initial phase to its running phase (or application phase) and on maintenance phase too.

Computer Security
Computer security is about securing a computer system (Desktop or Laptop etc) or a
host. This type of security ensures a computer virus free with the help of an anti-virus
software. Moreover, a computer should use genuine and updated software and
hardware. Also it should be protected with a password. This type of security is a form
of computer security.

Data Security
Data Security involves security of electronic data which is present on any hard-disks /
secondary storage either of computer system or on network, on server, etc. Such
security can be implemented by using passwords, cryptography (through encryption
and decryption), biometric authentication, or through access control list etc.

Information Security
Information Security is defined as protection of information and information
systems from unauthorized access, use, disclosure, disruption, modification, perusal,
inspection, recording or destruction. This involves security of electronic data which is
present on any database or file in any electronic memory. “Data Security” and
“Information Security” are used interchangeably and are almost similar.

Network Security
Network Security takes care of a network, its associated processes and aims to secure
it. This network can be an organizational/company internal network or any external
network. All data which is coming inside the network and going outside the network
is analyzed and monitored to keep the network danger free. Moreover, every process
which is part of the network is also monitored.

 From the above sections, you have become familiar with a programming language

and structure of a C program. Its now time to write a simple C program. This program
will illustrate how to print out the message “This is a C program”.

Ex : Write a program to print a message on the screen.

/*Program to print a message*/

#include <stdio.h>                            /*header file*/

main()                                              /* main function*/

{

printf(“This is a C program\n”); /* output statement*/

}

Though the program is very simple, a few points must be noted.

Every C program contains a function called main(). This is the starting point of the program. This is the point from where the execution begins. It will usually call other functions to help perform its job. Some functions we have to write and others are used from the standard libraries.

#include <stdio.h> is a reference to a special file called stdio.h which contains information that must be included in the program at the time when it is compiled. The inclusion of this required information will be handled automatically by the compiler. You will find it at the beginning of almost every C program. Basically, all the statements starting with # in a C program are called preprocessor directives. These will be considered in the later units. Just remember, that this statement allows you to use some predefined functions such as, printf(), in this case.

main() declares the start of the function, while the two curly brackets { } show the
start and finish of the function. Curly brackets in C are used to group statements
together as a function, or in the body of a loop or a block. Such a grouping is known
as a compound statement or a block. Every statement within a function ends with a
terminator semicolon (;).

printf(“This is a C program\n”); prints the words on the screen. The text to be
printed is enclosed in double quotes. The \n at the end of the text tells the program to
print a new line as part of the output. That means now if we give a second printf()
statement, it will be printed in the next line.

Comments may appear anywhere within a program, as long as they are placed within
the delimiters /* and */. Such comments are helpful in identifying the program’s
principal features or in explaining the underlying logic of various program features.

While useful for teaching, such a simple program has few practical uses. Let us
consider something rather more practical. Let us look into the example that describes
complete program development life cycle given below:

 As we have already seen, to solve a problem there are three main things to be taken

into consideration. Firstly, what should be the output? Secondly, what should be the
inputs that will be required to produce this output? Thirdly, the steps of instructions
which may be used for these inputs to produce the required output. As stated earlier,
every programming language follows a set of rules; therefore, a program written in C
also follows predefined rules known as syntax. C is a case sensitive language. All C
programs consist of one or more functions. One function that must be present in every
C program is main (). This is the first function called up when the program execution
begins. Basically, main() outlines what a program does. Although main is not given
in the keyword list, it cannot be used for naming a variable. The structure of a C
program is illustrated in Figure1 where functions func1 ( ) through funcn ( ) represent
user defined functions.

Preprocessor directives
Global data declarations
main ( ) /* main function/ { Declaration part; Program statements; } /User defined functions*/
func1( )
{
…………
}
func2 ( )
{
…………
}
.
.
.
funcn ( )
{
…………
}

C is a general purpose, structured programming language. Among the two types of
programming languages discussed earlier, C lies in between these two categories.
That’s why it is often called a middle level language. It means that it combines the
elements of high-level languages with the functionality of assembly language. It
provides relatively good programming efficiency (as compared to machine-oriented
language) and relatively good machine efficiency as compared to high-level languages).

As a middle level language, C allows the manipulation of bits, bytes and
addresses – the basic elements with which the computer executes the inbuilt and
memory management functions. The flexibility of C allows it to be used for systems
programming as well as for application programming.

C is commonly called a structured language because of structural similarities to
ALGOL and Pascal. The distinguishing feature of a structured language is
compartmentalization of code and data. Structured language is one that divides the
entire program into modules using top-down approach where each module executes
one job or task. Structured language is one that allows only one entry and one exit
point to/from a block or module. It is easy for debugging, testing, and maintenance if
a language is a structured one. C supports several control structures such as while,
do-while and for
 and various data structures such as strucs, files, arrays etc. as
would be seen in the later units of this course. The basic unit of a C program is a
function – C’s standalone subroutine. The structural component of C makes the
programming and maintenance easier.

 C is a programming language developed at AT&T’s Bell Laboratory of USA in 1972.

It was designed and written by Dennis Ritchie. As compared to other programming
languages such as Pascal, C allows a precise control of input and output.

Now let us see its historical development. The late 1960s were a turbulent era for
computer systems research at Bell Telephone Laboratories. By 1960, many
programming languages came into existence, almost each for a specific purpose. For
example, COBOL was being used for Commercial or Business Applications,
FORTRAN for Scientific Applications and so on. So, people started thinking why
could not there be a one general-purpose language. Therefore, an International
Committee was set up to develop such a language, which came out with the invention
of ALGOL60. But this language never became popular because it was too abstract
and too general. To improve this, a new language called Combined Programming
Language (CPL) was developed at Cambridge University. But this language was very
complex in the sense that it had too many features and it was very difficult to learn.
Martin Richards at Cambridge University reduced the features of CPL and developed
a new language called Basic Combined Programming Language (BCPL). But
unfortunately it turned out to be much less powerful and too specific. Ken Thompson
at AT & T’s Bell Labs developed a language called B at the same time as a further
simplification of CPL. But like BCPL, this was also too specific. Ritchie inherited the
features of B and BCPL and added some features on his own and developed a
language called C. C proved to be quite compact and coherent. Ritchie first
implemented C on a DEC PDP-11 that used the Unix Operating System.

For many years the de facto standard for C was the version supplied with the Unix
Version 5 operating system. The growing popularity of microcomputers led to the
creation of a large number of C implementations. At the source code level most of
these implementations were highly compatible. However, since no standard existed
there were discrepancies. To overcome this situation, ANSI established a committee
in 1983 that defined an ANSI standard for the C language.