| ??? 02/13/04 21:18 Read: times |
#64754 - RE: Hex to Dec/ Dec to Hex Responding to: ???'s previous message |
Jonathon Marcos wrote:
------------------------------- I have an array of 8 bytes with a digit in each cell. Do you mean a digit in each byte? Or a digit in each nibble? (a nibble being 4 bits..) The whole array represents a decimal number (8 digits). Sounds reasonable. The problem i want to solve is converting that decimal number into a hexadecimal number of the same format (8 bytes, a digit in each byte). So: a byte contains one hex digit. (BTW: that means you throw away half of your byte, as a hex digit is exactly 4 bits.) Please note that this is NOT homework! Most of my messages have been cut off because they're thought to be homework... but im working on big projects, and it's not homework. Please if you can provide such a code, or know where one exists, tell me please. If this is not homework, it certainly looks like it, but anyway, if you know how to convert DECIMAL to HEX it should not be a great problem. You have an 8 digit decimal number that you need to convert to HEX number, regardless of how the bytes are stored. You will end up with a hex number, containing less than 8 digits. That is supposed to be a trivial thing. Try it manually first, then work it out in C or assembler. If you do not find anything, I suggest to have a look at the code library. There is certainly some routine that should be usable as a staring point... regards Patrick sincerely Jon |
| Topic | Author | Date |
| Hex to Dec/ Dec to Hex | 01/01/70 00:00 | |
| RE: Hex to Dec/ Dec to Hex | 01/01/70 00:00 | |
| RE: Hex to Dec/ Dec to Hex | 01/01/70 00:00 | |
RE: Hex to Dec/ Dec to Hex | 01/01/70 00:00 | |
| RE: Hex to Dec/ Dec to Hex | 01/01/70 00:00 | |
| RE: Hex to Dec/ Dec to Hex | 01/01/70 00:00 | |
| RE: Hex to Dec/ Dec to Hex | 01/01/70 00:00 |



