bcd

package
v0.0.0-...-9d76940 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2023 License: LGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package bcd decodes bytes containing values in Binary-coded Decimal format to their native representation. For example, 0x10 = 10, 0x99 = 99.

BCD is an inefficient format (100 possible values per byte for valid input), but easily readable from the hex representation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(b byte) uint8

Decode converts a single BCD byte into its native representation. It accepts both packed and unpacked input. For valid input, the output can be 0 through 99; the output is unspecified for nibbles > 0x9.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL