Thursday, 2 June 2011

Difference Between GSM and CDMA


Difference Between GSM and CDMA
In cellular service there are two main competing network technologies: Global System for Mobile Communications
(GSM) and Code Division Multiple Access (CDMA). Cellular carriers including Sprint PCS, Cingular Wireless, Verizon and TMobile
use one or the other. Understanding the difference between GSM and CDMA will allow you to choose a carrier
that uses the preferable network technology for your needs.
The GSM Association is an international organization founded in 1987, dedicated to providing, developing, and
overseeing the worldwide wireless standard of GSM. CDMA, a proprietary standard designed by Qualcomm in the United
States, has been the dominant network standard for North America and parts of Asia. However, GSM networks continue
to make inroads in the United States, as CDMA networks make progress in other parts of the world. There are camps on
both sides that firmly believe either GSM or CDMA architecture is superior to the other. That said, to the non‐invested
consumer who simply wants bottom line information to make a choice, the following considerations may be helpful.
Coverage: The most important factor is getting service in the areas you will be using your phone. Upon viewing
competitors' coverage maps you may discover that only GSM or CDMA carriers offer cellular service in your area. If so,
there is no decision to be made, but most people will find that they do have a choice.
Data Transfer Speed: With the advent of cellular phones doing double and triple duty as streaming video devices,
podcast receivers and email devices, speed is important to those who use the phone for more than making calls. CDMA
has been traditionally faster than GSM, though both technologies continue to rapidly leapfrog along this path. Both
boast "3G" standards, or 3rd generation technologies.
EVDO, also known as CDMA2000, is CDMA's answer to the need for speed with a downstream rate of about 2 megabits
per second, though some reports suggest real world speeds are closer to 300‐700 kilobits per second (kbps). This is
comparable to basic DSL. As of fall 2005, EVDO is in the process of being deployed. It is not available everywhere and
requires a phone that is CDMA2000 ready.
GSM's answer is EDGE (Enhanced Data Rates for GSM Evolution), which boasts data rates of up to 384 kbps with real
world speeds reported closer to 70‐140 kbps. With added technologies still in the works that include UMTS (Universal
Mobile Telephone Standard) and HSDPA (High Speed Downlink Packet Access), speeds reportedly increase to about
275—380 kbps. This technology is also known as W‐CDMA, but is incompatible with CDMA networks. An EDGE‐ready
phone is required.
In the case of EVDO, theoretical high traffic can degrade speed and performance, while the EDGE network is more
susceptible to interference. Both require being within close range of a cell to get the best speeds, while performance
decreases with distance.
Subscriber Identity Module (SIM) cards: In the United States only GSM phones use SIM cards. The removable SIM card
allows phones to be instantly activated, interchanged, swapped out and upgraded, all without carrier intervention. The
SIM itself is tied to the network, rather than the actual phone. Phones that are card‐enabled can be used with any GSM
carrier.
The CDMA equivalent, a R‐UIM card, is only available in parts of Asia but remains on the horizon for the U.S. market.
CDMA carriers in the U.S. require proprietary handsets that are linked to one carrier only and are not card‐enabled. To
upgrade a CDMA phone, the carrier must deactivate the old phone then activate the new one. The old phone becomes
useless.
Roaming: For the most part, both networks have fairly concentrated coverage in major cities and along major highways.
GSM carriers, however, have roaming contracts with other GSM carriers, allowing wider coverage of more rural areas,
generally speaking, often without roaming charges to the customer. CDMA networks may not cover rural areas as well as
GSM carriers, and though they may contract with GSM cells for roaming in more rural areas, the charge to the customer
will generally be significantly higher.
International Roaming: If you need to make calls to other countries, a GSM carrier can offer international roaming, as
GSM networks dominate the world market. If you travel to other countries you can even use your GSM cell phone
abroad, providing it is a quad‐band phone (850/900/1800/1900 MHz). By purchasing a SIM card with minutes and a local
number in the country you are visiting, you can make calls against the card to save yourself international roaming
charges from your carrier back home. CDMA phones that are not card‐enabled do not have this capability, however
there are several countries that use CDMA networks. Check with your CDMA provider for your specific requirements.
According CDG.org, CDMA networks support over 270 million subscribers worldwide, while GSM.org tallies up their score
at over 1 billion. As CDMA phones become R‐UIM enabled and roaming contracts between networks improve,
integration of the standards might eventually make differences all but transparent to the consumer.
The chief GSM carriers in the United States are Cingular Wireless, recently merged with AT&T Wireless, and T‐Mobile
USA. Major CDMA carriers are Sprint PCS, Verizon and Virgin Mobile. There are also several smaller cellular companies
on both networks.

WMLScript String Library


WMLScript String Library
The String library contains functions for manipulating text.
WMLScript String Library Functions
Function
Description
Returns the character at a specified position
Compares two strings and returns a value that represents the result of the comparison
Divides a string into elements and returns a specified element
Returns the number of times a specified value appears in a string
Returns the position of a substring in a string
Formats a value
Divides a string into elements and inserts a substring at a specified index position
Checks whether a string is empty
Returns the length of a string

 

1)               WMLScript charAt() Function

The charAt() function returns the character at the specified index position.

Syntax

n = String.charAt(string, index)

Part
Description
n
The string returned from the function
string
A string
index
A number that specifies the index position in the string

Example

var a = String.charAt("world",2);
var b = String.charAt("world",0);
var c = String.charAt("world",10);

Result

a = "r"
b = "w"
c = ""

2)               WMLScript compare() Function

The compare() function compares two strings and returns a value that represents the result of the comparison.
The compare() function can return one of the following values:
  • -1 (if string1 < string2)
  • 0 (if string1 = string2)
  • 1 (if string1 > string2)

Syntax

n = String.compare(string1, string2)

Part
Description
n
The integer returned from the function
string1
A string
string2
A string

Example

var a = String.compare("world","world");
var b = String.compare("I","world");
var c = String.compare("world","I");

Result

a = 0
b = -1
c = 1

3)               WMLScript elementAt() Function

The elementAt() function divides a string into elements and returns the element at the specified index position.

Syntax

n = String.elementAt(string, index, separator)

Part
Description
n
The string returned from the function
string
The string to be parsed 
index
An integer defining the part to be returned
separator
The separator that divides the strings

Example

NOTE: If index is negative, the first element is returned. If index is too high, the last element is returned.
var a= String.elementAt("Visit W3Schools today",0," ");
var b= String.elementAt("Visit W3Schools today",1," ");
var c= String.elementAt("Visit W3Schools today",2," ");
var d= String.elementAt("Apples+Bananas",0,"+");
var e= String.elementAt("Apples+Bananas",1,"+");
var f= String.elementAt("Apples+Bananas",5,"+");

Result

a = "Visit"
b = "W3Schools"
c = "today"
d = "Apples"
e = "Bananas"
f = "Bananas"

4)               WMLScript elements() Function

The elements() function returns the number of times a specified value appears in a string.

Syntax

n = String.elements(string, separator)

Part
Description
n
An integer that specifies the number of times the value specified in the separator parameter appears in the string parameter
string
The string to be searched
separator
The string value to search for in the string

Example

var a = String.elements("Visit W3Schools!","i");
var b = String.elements("Visit W3Schools!","V");
var c = String.elements("Visit W3Schools!"," ");

Result

a = 2
b = 1
c = 1

5)               WMLScript find() Function

The find() function returns the position of a substring in a string.

Syntax

n = String.find(string, substring)

Part
Description
n
The integer returned from the function
string
The string to search
substring
The value to search for in the string

Example

var a = String.find("world","rl");
var b = String.find("world","hi");
var c = String.find("world","wo");

Result

a = 2
b = -1
c = 0

6)               WMLScript format() Function

The format() function formats a value.

Syntax

n = String.format(format, value)

Part
Description
n
The string returned from the function
format
Specifies how to format the value.
The format consists of three parts: %width.precision type
width - Optional. Specifies the minimum number of characters printed.
precision - Optional. Sets the precision of the output value. Can take one of the following values:
  • d (The minimum number of digits to print. Default is 1)
  • f (The number of digits after the decimal point. Default is 6)
  • s (The maximum number of characters to print. All characters are printed by default)
type - Required. Determines how to interpret the formatted value. Can take one of the following values:
  • d (Integer - the output value has nd digits)
  • f (Floating-Point - the output value has nf decimal digits)
  • s (String - Characters are printed to the end of the string or until the precision value is reached)
value
The value to be formatted

Example

var b = String.format("%4.3d", 32);
var d = String.format("%3f", 10.1234);
var e = String.format("%2.2f", 2.3)

Result

b = " 032"
d = "10.123"
e = "2.30"

7)               WMLScript insertAt() Function

The insertAt() function divides a string into elements and inserts a substring at the specified index position.

Syntax

n = String.insertAt(string, substring, index, separator)

Part
Description
n
The string returned from the function
string
The original string
substring
The substring to be inserted into the original string
index
An integer that specifies where to insert the substring
separator
The dividing separator

Example

var a = String.insertAt("Visit W3Schools!","us at",1," ");

Result

a = "Visit us at W3Schools!"

8)               WMLScript length() Function

The length() function returns the length of a string.

Syntax

n = String.length(string)

Part
Description
n
The length of the string
string
A string

Example

var a = String.length("");
var b = String.length("Hello world");
var c = String.length(23.4);

Result

a = 0
b = 11
c = 4