Encoder en BCD

Encode l'entrée avec “Encoder en BCD” selon la norme correspondante.

Entrée: Nombre de haute précisionRésultat: Texte

Saisie de texte

Exécuter pour voir le résultat

Exemples

A time readout in packed decimal

Represent a decimal number using one four-bit nibble per digit. Leading zeroes are not retained in numeric input.

Entrée

123456

Expected answer

0001 0010 0011 0100 0101 0110
Schéma
8 4 2 1
Emballé
On
Signé
Off
Format de sortie
Nibbles
An inventory count

Represent a decimal number using one four-bit nibble per digit. Leading zeroes are not retained in numeric input.

Entrée

42

Expected answer

0100 0010
Schéma
8 4 2 1
Emballé
On
Signé
Off
Format de sortie
Nibbles
A zero-prefixed identifier

Represent a decimal number using one four-bit nibble per digit. Leading zeroes are not retained in numeric input.

Entrée

00123

Expected answer

0001 0010 0011
Schéma
8 4 2 1
Emballé
On
Signé
Off
Format de sortie
Nibbles
An all-nine counter boundary

Represent a decimal number using one four-bit nibble per digit. Leading zeroes are not retained in numeric input.

Entrée

9999

Expected answer

1001 1001 1001 1001
Schéma
8 4 2 1
Emballé
On
Signé
Off
Format de sortie
Nibbles
A decimal price without the point

Represent a decimal number using one four-bit nibble per digit. Leading zeroes are not retained in numeric input.

Entrée

1299

Expected answer

0001 0010 1001 1001
Schéma
8 4 2 1
Emballé
On
Signé
Off
Format de sortie
Nibbles
default 0

Entrée

0

Expected answer

0000
Schéma
8 4 2 1
Emballé
On
Signé
Off
Format de sortie
Nibbles
packed, signed bytes

Entrée

1234567890

Expected answer

00000001 00100011 01000101 01100111 10001001 00001100
Schéma
8 4 2 1
Emballé
On
Signé
On
Format de sortie
Bytes
packed, signed nibbles, 8 4 -2 -1

Entrée

-1234567890

Expected answer

0000 0111 0110 0101 0100 1011 1010 1001 1000 1111 0000 1101
Schéma
8 4 -2 -1
Emballé
On
Signé
On
Format de sortie
Nibbles
unpacked nibbles

Entrée

1234567890

Expected answer

0000 0001 0000 0010 0000 0011 0000 0100 0000 0101 0000 0110 0000 0111 0000 1000 0000 1001 0000 0000
Schéma
8 4 2 1
Emballé
Off
Signé
Off
Format de sortie
Nibbles

Outils associés

Format des données

Référence de l’opération

Voir la documentation technique originale (English)