the code can detect and correct up to 2 errors in a codeword. The generating polynomial for the BCH (31, 21) code is: The codewords are either address or data, which is indicated by the first bit transmitted, bit 31. An address codeword contains 18 bits of address (bit 30 through to 13), and 2 function bits (12 & 11). Each data codeword carries 20 bits of data (bits 30 through to 11). Codewords are transmitted in batches that consist of a sync codeword, defined in the standard as 0x7CD215D8, followed by 16 payload codewords that are either address or data. Any unused codewords are filled with the idle value of 0x7A89C197. Although the address (also referred to as a RIC - Radio Identity Code or CAP code - Channel Access Protocol code) is transmitted as 18 bits the actual address is 21-bits long: the remaining three bits are derived from which of the 8 pairs of codewords in the batch the address is sent in. This strategy allows the receiver to turn off for a considerable percentage of the time as it only needs to listen to the pair that applies to it, thus saving a significant amount of battery power. Before a burst of data there will always be a preamble of at least 576 bits of data containing alternating 1s and 0s, allowing the receiver to synchronize itself to the signal, and is another mechanism that enables the receiver to be turned off for a large percentage of the time. A message will start with an address codeword followed by a number of data codewords and will continue until another address, a sync, or an idle codeword is sent. When the data bits are extracted they will be in one of two formats. Message format There are two message coding formats for the data messages. Numeric messages are sent as 4 bit BCD values, and alphanumeric messages are sent as 7-bit ASCII. The 7-bit ASCII is commonly referred to as 'alpha-paging', and 4-bit BCD is commonly referred to as 'numeric-paging'. Numeric paging BCD encoding packs 4 bit BCD symbols 5 to a codeword into bits 30-11. The most significant nibble (bits 30,29,28,27) is the leftmost (or most significant) of a BCD coded numeric datum. Values beyond 9 in each nibble (i.e. 0xA through 0xF) are encoded as follows: 0xA Reserved (possibly used for address extension) 0xB Character