Quote:
|
Originally Posted by Angelus
How can I convert directly from binary number to hex number without first convert binary to decimal and then from decimal to hex number?
|
You would have to make your own procedure. The conversion is easy. Make sure your binary is divisible by 4; if not append the beginning of the binary with 0's until it is a multiple of 4, then group your binary digits into groups of 4. Here is the conversion:
0000 = 0
0001 = 1
0010 = 2
0011 = 3
0100 = 4
0101 = 5
0110 = 6
0111 = 7
1000 = 8
1001 = 9
1010 = A
1011 = B
1100 = C
1101 = D
1110 = E
1111 = F
As long as you can break things down into groups of four this will work for the entire number no matter how large it is.
Hope this helps you in your endeavors.