300分求助,急,压缩的BCD码转换为十进制数或着是ascii码(300分)

  • 主题发起人 主题发起人 cuidekun98
  • 开始时间 开始时间
C

cuidekun98

Unregistered / Unconfirmed
GUEST, unregistred user!
地磅中读出的数据是压缩的bcd码,请教如何转换为十进制或者是ascii码.最后能有示例程序.谢谢
 
压缩BCD码占4位的,每个字节可表示00-99的数字<br><br>十进制数字 ASCII码 &nbsp; &nbsp; 压缩BCD码 &nbsp; &nbsp; &nbsp;非压缩BCD码 <br>0 &nbsp; &nbsp; &nbsp; &nbsp;0011 0000 &nbsp; &nbsp; &nbsp;0000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 0000 <br>1 &nbsp; &nbsp; &nbsp; &nbsp;0011 0001 &nbsp; &nbsp; &nbsp;0001 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 0001 <br>2 &nbsp; &nbsp; &nbsp; &nbsp;0011 0010 &nbsp; &nbsp; &nbsp;0010 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 0010 <br>3 &nbsp; &nbsp; &nbsp; &nbsp;0011 0011 &nbsp; &nbsp; &nbsp;0011 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 0011 <br>4 &nbsp; &nbsp; &nbsp; &nbsp;0011 0100 &nbsp; &nbsp; &nbsp;0100 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 0100 <br>5 &nbsp; &nbsp; &nbsp; &nbsp;0011 0101 &nbsp; &nbsp; &nbsp;0101 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 0101 <br>6 &nbsp; &nbsp; &nbsp; &nbsp;0011 0110 &nbsp; &nbsp; &nbsp;0110 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 0110 <br>7 &nbsp; &nbsp; &nbsp; &nbsp;0011 0111 &nbsp; &nbsp; &nbsp;0111 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 0111 <br>8 &nbsp; &nbsp; &nbsp; &nbsp;0011 1000 &nbsp; &nbsp; &nbsp;1000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 1000 <br>9 &nbsp; &nbsp; &nbsp; &nbsp;0011 1001 &nbsp; &nbsp; &nbsp;1001 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0000 1001
 

Similar threads

S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
915
SUNSTONE的Delphi笔记
S
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
654
import
I
后退
顶部