Sharing insights on technology and innovation
These notes are aligned with:
You may cite those standards in your blog.
The gNB-ID (gNodeB Identifier) uniquely identifies a gNB within a PLMN.
22 bits ≤ L ≤ 32 bits
The gNB‑ID is part of the NR Cell Identity (NCI) and therefore becomes part of NR‑CGI.
The NCI (NR Cell ID) is a 36‑bit globally unique cell identity.
NCI = 36 bits always, fixed by 3GPP.
The NCI is composed as:
[gNB-ID (L bits)] || [Cell ID (36 − L bits)]
Where:
3GPP standardized 36 bits so that:
Bit 35 -------------------------------- Bit 0
[ gNB-ID (L bits) | Local Cell ID (36-L bits) ]
Where Bit 35 is MSB (Most Significant Bit).
Since the Cell ID portion = (36 − L) bits:
Number of local cells = 2^(36 − L)
Examples:
| gNB‑ID Length (L) | Cell ID Bits | Max Cells per gNB |
|---|---|---|
| 22 | 14 | 16,384 |
| 24 | 12 | 4,096 |
| 28 | 8 | 256 |
| 32 | 4 | 16 |
This is simply bit concatenation.
NCI = (gNB_ID << (36 − L)) | CELL_ID
Where:
<< = Left Shift| = Bitwise ORIf:
Then:
cell_bits = 36 − 28 = 8
NCI = (51234 << 8) | 15
The shift moves the gNB‑ID into the upper 28 bits.
OR-ing places the Cell ID in the lower bits.
This is the inverse of concatenation.
gNB_ID = NCI >> (36 − L)
CELL_ID = NCI & (2^(36 − L) − 1)
Where:
>> = Right Shift& = Bitwise ANDBecause binary concatenation works as:
A || B === (A << length(B)) | B
So the reverse operations naturally retrieve:
This method is 100% bit-accurate and matches how signaling messages pack the identifiers.
ServingCellConfigCommon includes NR‑CGI.Let’s assume:
0xC85A → binary: 1100100001011010 (16 bits, but suppose padded to 28 bits)0x0F (8 bits)Final 36-bit NCI:
[ gNB-ID (28 bits) ][ Cell ID (8 bits) ]
Binary example:
1100100001011010 00000000 00001111
Hex packed:
0xC85A00F
Your plugin will output the exact decimal and hexadecimal form.
Operators need:
If an operator has:
This flexibility is crucial for large nationwide deployments.
| Concept | Definition |
|---|---|
| gNB‑ID | 22–32‑bit identifier for the gNB |
| NCI | Always 36 bits = gNB‑ID (L bits) + Cell ID (36−L bits) |
| Forward Calc | `NCI = (gNB_ID << (36 − L)) |
| Reverse Calc | gNB_ID = NCI >> (36 − L) + CELL_ID = NCI & ((1<<(36−L))-1) |
| Why it matters | Used in NR‑CGI, RRC, NGAP signaling, handovers, measurements |
January 31, 2026