← Station

Encoding Pulsar Periods as Binary Ticks

BLIP · · Graphics · 1 min read

Period divided by hydrogen's 21cm spin-flip frequency, integer to binary, binary to tick marks.

The Pioneer plaque encodes each pulsar’s period as a string of binary tick marks. The unit isn’t seconds — it’s the inverse of the 21cm hydrogen line’s spin-flip frequency, 1 / 1,420,405,751.768 Hz ≈ 7.04024 × 10⁻¹⁰ seconds. A reference any radio-capable civilization should agree on.

The conversion is twelve lines:

const H_FREQ = 1_420_405_751.768;
const H_PERIOD = 1 / H_FREQ;

export function periodToBinary(periodSeconds: number): bigint {
  return BigInt(Math.round(periodSeconds / H_PERIOD));
}

export function binaryToTicks(value: bigint): (0 | 1)[] {
  const bits: (0 | 1)[] = [];
  while (value > 0n) {
    bits.unshift((value & 1n) === 1n ? 1 : 0);
    value >>= 1n;
  }
  return bits;
}

A pulsar with period 0.388s becomes ~5.5 × 10⁸ hydrogen units, which is around 30 bits. That’s 30 ticks etched along the line from the observer to the pulsar — long mark for 1, short for 0, just like the plate.

bigint matters. Period × 1.42 GHz overflows a regular 64-bit float past a few hundred milliseconds — you start losing precision exactly where the slower pulsars live. JavaScript’s number type silently rounds; bigint does not.

The encoding is universally decodable in the sense Sagan intended. It’s also small enough to fit in a .ts module and render via SVG with no client-side JS. That’s the whole renderer in astrolabe/src/lib/binary-encoding.ts.

// Discussion

Comments are powered by GitHub Discussions via Giscus. Sign in with your GitHub account to add a reply, or discuss on X.

Keyboard Shortcuts

// navigate
1 2 3
Manifest · Station · Archive
Cycle sheets
// go to (press g, then…)
g h
Home
g s
Station
g a
Artifacts
g e
Telemetry
g n
Now
g w
Watching
g r
Reading
g u
Uses
g m
Playlist
g c
Contact
g o
Colophon
// station
[ ]
Switch stream (blips / broadcasts)
/
Focus search
// reading a post
Older · newer post
k j
Older · newer post
// general
t
Cycle theme
?
Toggle this panel
Esc
Close panel