Path: utzoo!utgpu!watserv1!watmath!iuvax!mailrus!accuvax.nwu.edu!nucsrl!telecom-request From: chip@chinacat.lonestar.org (Chip Rosenthal) Newsgroups: comp.dcom.telecom Subject: Re: Mu-Law Encoding/Decoding Message-ID: <3610@accuvax.nwu.edu> Date: 7 Feb 90 23:51:32 GMT Sender: news@accuvax.nwu.edu Reply-To: chip@chinacat.lonestar.org Organization: Unicom Systems Development, Austin (yay!) Lines: 30 Approved: Telecom@eecs.nwu.edu X-Submissions-To: telecom@eecs.nwu.edu X-Administrivia-To: telecom-request@eecs.nwu.edu X-Telecom-Digest: Volume 10, Issue 83, message 3 of 8 In article <3540@accuvax.nwu.edu> scott@audiofax.com writes: >X-Telecom-Digest: Volume 10, Issue 77, message 2 of 5 >I need to fiddle with some u-Law encoded numbers [...] I have a couple of >FINE, FINE references that describe the stuff and promptly give examples that >have the sign switched from each other. I think I know what the confusion might be over. In the theoretical mu-law companding system, there is an inversion at the very end. Therefore, in the encoding sequence, you use 0 for positive and 1 for negative, but just before transmission you invert the whole thing. For example, the maximum positive value will be encoded as 0111 1111. After inversion this becomes 1000 0000. If you are generating digital data to pump into a codec/filter combo (or similar) circuit, then you would want to perform the inversion and make sure the MSB ends up 1 for positive and 0 for negative values. A-law gets even wierder, because you invert every other bit. Personally, my favorite reference is |Digital Telephony| by Bellamy. However, if you want the nuts-n-bolts, I suggest you get a databook from somebody who makes codec's and take a gander at that. I happen to have National Semiconductor and Motorola books on my shelf, but there are a gadzillion other folks who make them as well. Chip Rosenthal | Yes, you're a happy man and you're chip@chinacat.Lonestar.ORG | a lucky man, but are you a smart Unicom Systems Development, 512-482-8260 | man? -David Bromberg