I'm doing a fairly large program that acts somewhat as a compiler. I've gotten to a part where I cannot seem to find out how to take the two character object code indexes (in hex) and print it out in binary form. Anyone have any ideas to what functions handle this?
Some of the code:
The indexes will be each "Objcode in Hex" and output is to the right:Code:byte opcode[4]; /* each index will contain a two digit hex code */
Code:Line Objcode in Hex Objcode in Binary 1 2 3 B4 10 10110100 00010000 4 A0 04 10100000 00000100 5 33 20 06 00110011 00100000 00000110 6 57 90 00 00 01010111 10010000 00000000 00000000 7 B4 10 10110100 00010000 8 4F 00 00 01001111 00000000 00000000 9 00 00 00 00000000 00000000 00000000