Re: BCD List to HEX List
- From: Marc 'BlackJack' Rintsch <bj_666@xxxxxxx>
- Date: Sun, 30 Jul 2006 23:37:44 +0200
In <ti9zg.1555$W93.1057@dukeread05>, Philippe Martin wrote:
Marc 'BlackJack' Rintsch wrote:
And now please describe you problem a little better. ;-)
I'll try.
first of all python is not going to be used for my purpose (sigh)
I have device A which holds a binary coded decimal array [N1,N2,....Nn]
where the array represents a decimal number.
In C: unsigned char dec[] = {1,2,3,4,5,6,7,8};
I need that array converted for device B into an array where each element
represents the actual byte value.
In C: the result would be unsigned char hex[] = {0x1,0x2,0xD,0x6,0x8,0x7};
I guess any pocket calculator goes through that process for dec/hex
conversion.
Hope that's clearer.
Not really. Maybe I'm missing something obvious but I don't see the link
between your `dec` and `hex` values. 12345678 converted to hex is
bc614e. Do you need such a conversion? And should the result really be
one nibble (4 bit)/hex digit per array entry!?
Ciao,
Marc 'BlackJack' Rintsch
.
- Follow-Ups:
- Re: BCD List to HEX List
- From: Philippe Martin
- Re: BCD List to HEX List
- References:
- BCD List to HEX List
- From: Philippe Martin
- Re: BCD List to HEX List
- From: Marc 'BlackJack' Rintsch
- Re: BCD List to HEX List
- From: Philippe Martin
- BCD List to HEX List
- Prev by Date: Re: Smaple of recursive directory walker
- Next by Date: Re: BCD List to HEX List
- Previous by thread: Re: BCD List to HEX List
- Next by thread: Re: BCD List to HEX List
- Index(es):
Relevant Pages
|
Loading