Skip to content

Instantly share code, notes, and snippets.

@jupihes
Last active April 28, 2025 12:52
Show Gist options
  • Save jupihes/bc0008be1d5a548fa2990d4811a439a5 to your computer and use it in GitHub Desktop.
Save jupihes/bc0008be1d5a548fa2990d4811a439a5 to your computer and use it in GitHub Desktop.

4G CELL ID logic

ECI = eNodeBID * $$2^{28-22}$$ + CellID

5G CELL ID logic

  • NCI(NR Cell Identity)gNB ID + CI

    • Length: 36bit
    • Range: 0 to 68719476735
  • gNB ID

    • Maximum length 32bit, range: $0 \sim 2^{32-1}$ (4294967295)
    • Minimum length 22 bits, range: $0 \sim 2^{22-1}$ (4194303)
  • CI:cell ID

    • Maximum length 14 bits, range: $0 \sim 2^{14-1}$ (16383)
    • Minimum length of 4 digits, range: $0 \sim 2^{4-1}$ (15)
  • NCI calculation

NCI = gNB_ID * $2^{36-gNB_ID_length}$ + CI

Example 1:

  • gNB_ID
    • When the length is 24 bits, the CI length is 12 bits, NCI=gNBID * $2^{12}$+CI= gNBID * 4096+CI.

Example 2:

  • gNB_ID length = 23

NCI = gNodeBID * $$2^{36-23}$$ + CellID

NCI = gNodeBID * $8192$ + CellID

All tech rationalities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment