crc4(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME β€” crc4(9) πŸ’–

Okay so this is crc4(9) from the Kernel API Manual, and it literally calculates the 4-bit crc of a value. Slay. πŸ’…βœ¨


🌸 SYNOPSIS 🌸

uint8_t crc4 (uint8_t c , uint64_t x , int bits );

πŸŽ€ ARGUMENTS πŸŽ€

  • c β€” the starting crc4 πŸ’–
  • x β€” the value to checksum ✨
  • bits β€” the number of bits in x to checksum πŸ”’

πŸ¦‹ DESCRIPTION πŸ¦‹

Returns the crc4 value of x, using polynomial 0b10111 β€” no cap, that's the polynomial 🫢.

The x value is treated as left-aligned, and bits above bits are ignored in the crc calculations. So any extra bits hanging out up there? Not invited to the crc party πŸ˜­πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./lib/crc/crc4.c πŸ‘‘

And that's the whole vibe check, bestie! This page comes from ./lib/crc, dated October 2026 β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from