<s>
G.711	B-Algorithm
is	O
a	O
narrowband	O
audio	O
codec	O
originally	O
designed	O
for	O
use	O
in	O
telephony	O
that	O
provides	O
toll-quality	O
audio	O
at	O
64kbit/s	O
.	O
</s>
<s>
G.711	B-Algorithm
passes	O
audio	O
signals	O
in	O
the	O
range	O
of	O
300	O
–	O
3400Hz	O
and	O
samples	O
them	O
at	O
the	O
rate	O
of	O
8,000	O
samples	O
per	O
second	O
,	O
with	O
the	O
tolerance	O
on	O
that	O
rate	O
of	O
50	O
parts	O
per	O
million	O
(	O
ppm	O
)	O
.	O
</s>
<s>
There	O
are	O
two	O
slightly	O
different	O
versions	O
:	O
μ-law	B-Algorithm
,	O
which	O
is	O
used	O
primarily	O
in	O
North	O
America	O
and	O
Japan	O
,	O
and	O
A-law	B-Algorithm
,	O
which	O
is	O
in	O
use	O
in	O
most	O
other	O
countries	O
outside	O
North	O
America	O
.	O
</s>
<s>
G.711	B-Algorithm
is	O
an	O
ITU-T	O
standard	O
(	O
Recommendation	O
)	O
for	O
audio	O
companding	B-Algorithm
,	O
titled	O
Pulse	B-Algorithm
code	I-Algorithm
modulation	I-Algorithm
(	O
PCM	O
)	O
of	O
voice	O
frequencies	O
released	O
for	O
use	O
in	O
1972	O
.	O
</s>
<s>
It	O
is	O
a	O
required	O
standard	O
in	O
many	O
technologies	O
,	O
such	O
as	O
in	O
the	O
H.320	B-Application
and	O
H.323	B-Protocol
standards	O
.	O
</s>
<s>
It	O
can	O
also	O
be	O
used	O
for	O
fax	O
communication	O
over	O
IP	O
networks	O
(	O
as	O
defined	O
in	O
T.38	B-Protocol
specification	O
)	O
.	O
</s>
<s>
Two	O
enhancements	O
to	O
G.711	B-Algorithm
have	O
been	O
published	O
:	O
G.711.0	O
utilizes	O
lossless	B-Algorithm
data	I-Algorithm
compression	I-Algorithm
to	O
reduce	O
the	O
bandwidth	O
usage	O
and	O
G.711.1	O
increases	O
audio	O
quality	O
by	O
increasing	O
bandwidth	O
.	O
</s>
<s>
G.711	B-Algorithm
defines	O
two	O
main	O
companding	B-Algorithm
algorithms	O
,	O
the	O
μ-law	B-Algorithm
algorithm	I-Algorithm
and	O
A-law	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Both	O
are	O
logarithmic	O
,	O
but	O
A-law	B-Algorithm
was	O
specifically	O
designed	O
to	O
be	O
simpler	O
for	O
a	O
computer	O
to	O
process	O
.	O
</s>
<s>
The	O
μ-law	B-Algorithm
and	O
A-law	B-Algorithm
algorithms	I-Algorithm
encode	O
14-bit	O
and	O
13-bit	O
signed	O
linear	O
PCM	O
samples	O
(	O
respectively	O
)	O
to	O
logarithmic	O
8-bit	O
samples	O
.	O
</s>
<s>
Thus	O
,	O
the	O
G.711	B-Algorithm
encoder	B-General_Concept
will	O
create	O
a	O
64	O
kbit/s	O
bitstream	O
for	O
a	O
signal	O
sampled	O
at	O
8kHz	O
.	O
</s>
<s>
G.711	B-Algorithm
μ-law	B-Algorithm
tends	O
to	O
give	O
more	O
resolution	O
to	O
higher	O
range	O
signals	O
while	O
G.711	B-Algorithm
A-law	B-Algorithm
provides	O
more	O
quantization	O
levels	O
at	O
lower	O
signal	O
levels	O
.	O
</s>
<s>
The	O
terms	O
PCMU	B-Algorithm
,	O
G711u	O
or	O
G711MU	O
for	O
G711	B-Algorithm
μ-law	B-Algorithm
,	O
and	O
PCMA	O
or	O
G711A	O
for	O
G711	B-Algorithm
A-law	B-Algorithm
,	O
are	O
used	O
.	O
</s>
<s>
A-law	B-Algorithm
encoding	O
thus	O
takes	O
a	O
13-bit	O
signed	O
linear	O
audio	O
sample	O
as	O
input	O
and	O
converts	O
it	O
to	O
an	O
8	O
bit	O
value	O
as	O
follows	O
:	O
</s>
<s>
Linear	O
input	O
codeThis	O
value	O
is	O
produced	O
by	O
taking	O
the	O
two	B-General_Concept
's	I-General_Concept
complement	I-General_Concept
representation	O
of	O
the	O
input	O
value	O
,	O
and	O
inverting	O
all	O
bits	O
after	O
the	O
sign	O
bit	O
if	O
the	O
value	O
is	O
negative	O
.	O
</s>
<s>
Thus	O
,	O
a	O
silent	O
A-law	B-Algorithm
encoded	O
PCM	O
channel	O
has	O
the	O
8	O
bit	O
samples	O
coded	O
0xD5	O
instead	O
of	O
0x80	O
in	O
the	O
octets	O
.	O
</s>
<s>
The	O
μ-law	B-Algorithm
(	O
sometimes	O
referred	O
to	O
as	O
ulaw	B-Algorithm
,	O
G.711Mu	B-Algorithm
,	O
or	O
G.711μ	B-Algorithm
)	O
encoding	O
takes	O
a	O
14-bit	O
signed	O
linear	O
audio	O
sample	O
in	O
two	B-General_Concept
's	I-General_Concept
complement	I-General_Concept
representation	O
as	O
input	O
,	O
inverts	O
all	O
bits	O
after	O
the	O
sign	O
bit	O
if	O
the	O
value	O
is	O
negative	O
,	O
adds	O
33	O
(	O
binary	O
100001	O
)	O
and	O
converts	O
it	O
to	O
an	O
8	O
bit	O
value	O
as	O
follows	O
:	O
</s>
<s>
Linear	O
input	O
valueThis	O
value	O
is	O
produced	O
by	O
taking	O
the	O
two	B-General_Concept
's	I-General_Concept
complement	I-General_Concept
representation	O
of	O
the	O
input	O
value	O
,	O
inverting	O
all	O
bits	O
after	O
the	O
sign	O
bit	O
if	O
the	O
value	O
is	O
negative	O
,	O
and	O
adding	O
33	O
.	O
</s>
<s>
Thus	O
,	O
a	O
silent	O
μ-law	B-Algorithm
encoded	O
PCM	O
channel	O
has	O
the	O
8	O
bit	O
samples	O
transmitted	O
0xFF	O
instead	O
of	O
0x00	O
in	O
the	O
octets	O
.	O
</s>
<s>
G.711.0	O
,	O
also	O
known	O
as	O
G.711	B-Algorithm
LLC	O
,	O
utilizes	O
lossless	B-Algorithm
data	I-Algorithm
compression	I-Algorithm
to	O
reduce	O
the	O
bandwidth	O
usage	O
by	O
as	O
much	O
as	O
50	O
percent	O
.	O
</s>
<s>
The	O
Lossless	B-Algorithm
compression	I-Algorithm
of	O
G.711	B-Algorithm
pulse	B-Algorithm
code	I-Algorithm
modulation	I-Algorithm
standard	O
was	O
approved	O
by	O
ITU-T	O
in	O
September	O
2009	O
.	O
</s>
<s>
G.711.1	O
"	O
Wideband	O
embedded	O
extension	O
for	O
G.711	B-Algorithm
pulse	B-Algorithm
code	I-Algorithm
modulation	I-Algorithm
"	O
is	O
a	O
higher-fidelity	O
extension	O
to	O
G.711	B-Algorithm
,	O
ratified	O
in	O
2008	O
and	O
further	O
extended	O
in	O
2012	O
.	O
</s>
<s>
G.711.1	O
allows	O
a	O
series	O
of	O
enhancement	O
layers	O
on	O
top	O
of	O
a	O
raw	O
G.711	B-Algorithm
core	O
stream	O
(	O
Layer	O
0	O
)	O
:	O
Layer	O
1	O
codes	O
16-bit	O
audio	O
in	O
the	O
same	O
4kHz	O
narrowband	O
,	O
and	O
Layer	O
2	O
allows	O
8kHz	O
wideband	O
using	O
MDCT	O
;	O
each	O
uses	O
a	O
fixed	O
16kbps	O
in	O
addition	O
to	O
the	O
64kbps	O
core	O
.	O
</s>
<s>
Peak	O
bitrate	O
becomes	O
96	O
kbps	O
in	O
original	O
G.711.1	O
,	O
or	O
112	O
kbps	O
with	O
superwideband	O
.	O
</s>
<s>
A	O
decoder	O
that	O
does	O
n't	O
understand	O
any	O
set	O
of	O
fidelity	O
layers	O
may	O
ignore	O
or	O
drop	O
non-core	O
packets	O
without	O
affecting	O
it	O
,	O
enabling	O
graceful	O
degradation	O
across	O
any	O
G.711	B-Algorithm
(	O
or	O
original	O
G.711.1	O
)	O
telephony	O
system	O
with	O
no	O
changes	O
.	O
</s>
<s>
Also	O
ratified	O
in	O
2012	O
was	O
G.711.0	O
lossless	B-Algorithm
extended	O
to	O
the	O
new	O
fidelity	O
layers	O
.	O
</s>
<s>
Like	O
G.711.0	O
,	O
full	O
G.711	B-Algorithm
backward	O
compatibility	O
is	O
sacrificed	O
for	O
efficiency	O
,	O
though	O
a	O
G.711.0	O
aware	O
node	O
may	O
still	O
ignore	O
or	O
drop	O
layer	O
packets	O
it	O
does	O
n't	O
understand	O
.	O
</s>
<s>
The	O
patents	O
for	O
G.711	B-Algorithm
,	O
released	O
in	O
1972	O
,	O
have	O
expired	O
,	O
so	O
it	O
may	O
be	O
used	O
without	O
the	O
need	O
for	O
a	O
licence	O
.	O
</s>
