man.bsd.lv manual page server

Manual Page Search Parameters

BCDTOBIN(9) Kernel Developer's Manual BCDTOBIN(9)

bcdtobin, bintobcdconvert a single byte between (unsigned) packed bcd and binary

#include <sys/systm.h>

unsigned int
bcdtobin(unsigned int bcd);

unsigned int
bintobcd(unsigned int bin);

The () and () functions convert a single byte between (unsigned) packed bcd and binary encodings.

The bcdtobin() function returns the binary value of its BCD-encoded argument, bcd. The bintobcd() function returns the BCD encoding of its binary argument, bin.

March 11, 2006 NetBSD-9.2