Description
Binary Coded Decimal (BCD) is a method of encoding decimal numbers in a binary format. In its most common form, known as packed BCD or simply BCD, each decimal digit (0-9) is represented by its four-bit binary equivalent (0000 to 1001). For example, the decimal number 123 would be encoded as 0001 0010 0011 in BCD. This is distinct from pure binary representation, where the entire number is converted as a whole (123 becomes 01111011). In 3GPP specifications, BCD encoding is often applied to fields of variable length, where the number of digits is known or indicated separately. The encoding is typically left-aligned (most significant digit first) within an octet, and if the number of digits is odd, the last four bits of the final octet are often filled with a 'filler' value (e.g., 1111) to maintain octet alignment.
Within the 3GPP architecture, BCD is not a network function or protocol but a fundamental data representation scheme used across multiple layers and interfaces. It is specified in various technical specifications (TSs) for encoding specific information elements. For instance, in TS 24.008 (Core Network protocols), the Called Party BCD Number information element uses BCD to represent the dialed digits. In radio resource control (RRC) specifications like TS 25.331, TS 36.331, and TS 38.331, BCD is used for encoding system information blocks (SIBs) related to network and cell identities. Its role is to ensure a standardized, efficient, and error-resistant way to transmit numeric data between network nodes and user equipment.
The encoding process involves taking a string of decimal digits and converting each digit into its four-bit nibble. These nibbles are then concatenated and packed into octets. Decoding reverses this process. Key considerations include handling of odd digit counts, the representation of non-decimal characters (like '*' or '#'), which may have specific BCD encodings defined, and the order of digit transmission (most significant digit first). The simplicity and determinism of BCD make it suitable for storage on SIM/USIM cards (as defined in TS 31.101/121) for fields like the IMSI, where each digit of the IMSI is stored in BCD format, allowing for compact and precise retrieval.
Purpose & Motivation
BCD exists to solve the problem of accurately and efficiently representing decimal numbers in binary digital systems, particularly where human-readable numeric identifiers are critical. In telecommunications, identifiers like phone numbers (MSISDN), international mobile subscriber identities (IMSI), and various network codes are fundamentally decimal. A pure binary representation of the whole number can lead to complexities in parsing, display, and international number plan compatibility. BCD provides a direct, digit-by-digit mapping that preserves the original decimal structure unambiguously, facilitating easier processing, display, and interoperability between network elements from different vendors.
Historically, BCD encoding predates 3GPP and was widely used in early digital telephony and computing. Its adoption into 3GPP standards (from Release 6 onwards in the referenced specs) was driven by the need for backward compatibility and consistency with existing telecommunication practices, especially those inherited from GSM. It addresses the limitations of alternative encodings like ASCII, which would use more bits per digit (7 or 8), or pure binary, which requires conversion algorithms and can obscure the individual digits. For storage on limited-capacity SIM cards and for transmission in bandwidth-conscious signaling messages, BCD offers a compact and straightforward solution.
The motivation for its continued use across 3GPP releases, including 5G NR, is its reliability and simplicity. It eliminates ambiguity in number representation, which is crucial for routing calls, identifying subscribers, and broadcasting system information. By standardizing on BCD for specific numeric fields, 3GPP ensures that user equipment and network nodes from any manufacturer can correctly interpret these fundamental identifiers, maintaining the global interoperability that is a cornerstone of cellular networks.
Key Features
- Direct digit-by-digit encoding of decimal numbers into binary nibbles
- Compact representation using 4 bits per decimal digit (0-9)
- Standardized filler mechanism (e.g., 1111) for odd-digit alignment within octets
- Wide application across 3GPP specs for MSISDN, IMSI, and system info encoding
- Ensures unambiguous interpretation of numeric identifiers across network interfaces
- Facilitates efficient storage on SIM/USIM and transmission in signaling messages
Evolution Across Releases
Introduced as a standardized encoding format within multiple 3GPP specifications, including those for core network signaling (TS 24.008), radio resource control (TS 25.331), and SIM/USIM application toolkit (TS 31.121). It provided the initial architecture for representing decimal numbers like phone numbers and identifiers in a compact, unambiguous binary form for UMTS networks, ensuring interoperability with existing GSM practices.
Defining Specifications
| Specification | Title |
|---|---|
| TS 21.905 | 3GPP TS 21.905 |
| TS 25.331 | 3GPP TS 25.331 |
| TS 27.007 | 3GPP TS 27.007 |
| TS 31.121 | 3GPP TR 31.121 |
| TS 36.331 | 3GPP TR 36.331 |
| TS 38.331 | 3GPP TR 38.331 |