Mario Malcangi
Fall 1995
© IEEE Computer Society Press.


Coding

The 8 bit digital code has a sign bit P, three bits of segment S2 S1 S0, and 4 bits Q3 Q2 Q1 Q0 for step selection within the choosens segment:

BIT 8	7	6	5	4	3	2	1
    P	S2	S1	S0	Q3	Q2	Q1	Q0

The two laws differ in the way of coding the byte. For the A-law, the sign bit is 1 for positive values and even bit are inverted before transmission (bit 2,4,6,8 when sign bit is bit 8). For Mu-law, the sign bit is 1 for negative values and the byte is negated before transmission. S2 S1 S0 is the segment code. For the two values of the sign bit P this makes 16 segments, but the segments cutting the origin are collinear and counted as 1. In the A-law, the two segments near the origin have the same slope for positive and negative number, so that this law has in fact 13 different segments (four segments counted as one).The Mu-law is a 15 segment low because the first positive and the first negative segment count as one. Q3Q2Q1Q0 are the 4 bits used to uniform quantization of 16 levels in each segment. Another difference between Mu-law and A-law is the decoder output characteristic around zero (fig. 2). The Mu-Law has a dead zone around zero which requires two codes (plus and minus zero). The A-law coder has a treshold at zero: for zero input, the output has an offset of plus or minus 1/2 step.

Fig. 2 - (a) A & Mu laws approximation around the origin. (b) Encoding function around the origin.

a)

b)


[ Index | Previous Paragraph | Next Paragraph ]