BCDTOBIN(9)

πŸ“¦ version 11.0, in nixpkgs unstable

πŸŽ€ BCDTOBIN(9) πŸŽ€

okay so this is BCDTOBIN(9) from the Kernel Developer's Manual, and bestie, it is giving tiny-but-iconic byte-conversion energy. no cap. πŸ’…


✨ NAME ✨

bcdtobin, bintobcd β€” convert a single byte between (unsigned) packed bcd and binary

🌸 SYNOPSIS 🌸

#include <sys/systm.h>

unsigned int
bcdtobin(unsigned int bcd);

unsigned int
bintobcd(unsigned int bin);

πŸ¦‹ DESCRIPTION πŸ¦‹

so bcdtobin() and bintobcd() are the little duo that converts a single byte between (unsigned) packed bcd and binary encodings. that is literally the whole vibe check: one byte, both directions, no extra drama. ✨

πŸ‘‘ RETURN VALUES πŸ‘‘

  • bcdtobin() β€” returns the binary value of its BCD-encoded argument, bcd. it hands you back the binary value, slay. 🫢
  • bintobcd() β€” returns the BCD encoding of its binary argument, bin. iconic. πŸ’–

xoxo, this page came from Debian and is dated March 11, 2006 β€” mwah πŸ’‹

πŸ“¦ where this page comes from