Convert a BigInt to a Binary Coded Decimal with padding
C#
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ConvertBigIntToBcd.cs
README.md

README.md

ConvertBigIntToBcd

Convert a standard .net integer (4 bytes) to a Binary Coded Decimal with padding

For example:

var bcdInBytes = ConvertBigIntToBcd(12345, 7);

Would return:

bcdInBytes = [18, 52, 95, 255, 255, 255, 255]