Diandiancoin PPC ore pool
Chinese name
code
price
plate
peercoin
Dot Coin
PPC
US $3.9
namecoin
domain currency
NMC
US $6
US $45 million
MEC
US $21 million
quark
qrk
US $18 million
wor Ldcoin
world currency
WDC
US $0.38
primecoin
prime currency
XPM
US $3.18
US $10 million
protoshares
bitstocks
PTS
US $18
feathercoin
feathercoin
FTC
US $0.4
US $9.5 million
infinite currency
IFC
US $0.00002
US $1.8 million
bbqcoin
BBQ coin
BQC
US $0.07
US $2 million
bitbar
bitbar
BTB
US $51
US $420000
coins
tix
US $00001
800000
voidWhAsciiToBcd(unsignedchar*psDataIn,size_tuiDataInLen,unsignedchar*psDataOut)
{
unsignedcharucTemp=0;
for(size_ti=0;i<uiDataInLen;i+=2){
ucTemp=psDataIn[i];
if(ucTemp>'9'){
ucTemp=(unsignedchar)toupper((unsignedchar)ucTemp)-'A'+0x0A;
}else{
ucTemp&=0x0F;
}
psDataOut[i/2]=ucTemp<<4;
ucTemp=psDataIn[i+1];
if(ucTemp>'9'){
ucTemp=(unsignedchar)toupper((unsignedchar)ucTemp)-'A'+0x0A;
}else{
ucTemp&=0x0F;
}
psDataOut[i/2]|=ucTemp;
}
}
扩展资料
ASCII转BCD
voidWhBcdToAscii(unsignedchar*psDataIn,size_tuiDataInLen,unsignedchar*psDataOut)
{
unsignedcharsAscii[]="0123456789ABCDEF";
for(size_ti=0;i<uiDataInLen;i++){
psDataOut[2*i]=sAscii[(psDataIn[i]>>4)];
psDataOut[2*i+1]=sAscii[(psDataIn[i]&0x0F)];
}
}
8421BCD code uses 4-bit binary code to represent decimal value. The weights from high bit to low bit are 8, 4, 2 and 1 respectively. As long as the weights corresponding to each 4-bit binary code are added, the corresponding decimal number can be obtained. Such as binary 10010111bcd code into decimal is: 97
The coding technique of BCD code is most commonly used in the design of accounting system, because the accounting system often needs to accurately calculate a long number string. Compared with other coding methods, BCD coding can not only save the accuracy of numerical value, but also save the time of floating-point operation BCD code is also called binary code decimal number. BCD code can be divided into weighted code and non weighted code. The common weighted BCD codes are 8421, 2421 and 5421, and the unauthorized BCD codes are the remainder 3, the remainder 3 cyclic code and the gray code8421BCD code is the most basic and commonly used BCD code, which is similar to four bit natural binary code. It only selects the first 10 groups of four bit binary code, that is, 0000 ~ 1001 represents 0 ~ 9 of decimal number, and the remaining six groups are not used
mov
ah, Al
SHR
ah, 1
SHR
ah, 1
SHR
ah, 1
SHR
ah, 1
and
Al, 0Fh
this is to convert one byte BCD into two byte decimal
,
hope to adopt
BCD code of decimal system represents one decimal number with four binary numbers. 8421 code is usually used (there are others, such as 2421 code and the remaining 3 code)
let's use code 8421 to explain
four digit binary. They correspond to 8, 4, 2 and 1 respectively
for example: 1010, then the corresponding number is 8.021, and the total number is 11
for example: 0101, then the corresponding number is 0.401, and the total number is 5
in the same way,
2421 corresponds to 2, 4, 2, and 1
is 8421 used for the remaining 3 codes, but after using it, it needs to be reced by 3
BCD2BINBCD2BIN:
< MUL
< ADD > A, RESULT+1
< MOV
< MUL
< ADD > A, RESULT+2
Completely, the BIN figures are in A.