An Alaw algorithm is a standard companding algorithm, used in European 8bit PCM digital communications systems to optimize, i.e., modify, the dynamic range of an analog signal for digitizing. It is one of two versions of the G.711 standard from ITUT, the other version being the similar µlaw, used in North America and Japan.
For a given input x, the equation for Alaw encoding is as follows,
F
(
x
)
=
sgn
(
x
)
{
A

x

1
+
log
(
A
)
,

x

<
1
A
1
+
log
(
A

x

)
1
+
log
(
A
)
,
1
A
≤

x

≤
1
,
where A is the compression parameter. In Europe,
A
=
87.6
.
Alaw expansion is given by the inverse function,
F
−
1
(
y
)
=
sgn
(
y
)
{

y

(
1
+
ln
(
A
)
)
A
,

y

<
1
1
+
ln
(
A
)
exp
(

y

(
1
+
ln
(
A
)
)
−
1
)
A
,
1
1
+
ln
(
A
)
≤

y

<
1.
The reason for this encoding is that the wide dynamic range of speech does not lend itself well to efficient linear digital encoding. Alaw encoding effectively reduces the dynamic range of the signal, thereby increasing the coding efficiency and resulting in a signaltodistortion ratio that is superior to that obtained by linear encoding for a given number of bits.