How to convert a binary number to Hexa decimal number??
(Note:Do not convert it into binary and to Hexadecimal)
Answer Posted / vignesh1988i
let us take a binary number.. say :
0000000110101110 (16 bit number)
we already know it's the consersion to HEXA DECIMAL equivalent.... so split the numbers into 4 bits each... like,
0000 0001 1010 1110 (16 bit number)
and for converting directly there is a conversion called 8421 code...
8421 | 8421 | 8421 | 8421
0000 | 0001 | 1010 | 1110
now in the first pass it is zero (from left to right) , second it is 1 , in third it is 10 (A in hexa.) , in fourth it is 14 (E in hexa.)
thus the final representation for the above binary is : 1AE
thank u
| Is This Answer Correct ? | 12 Yes | 4 No |
Post New Answer View All Answers
Can we initialize extern variable in c?
Why do we use return in c?
What are the advantages of using macro in c language?
What is identifier in c?
State the difference between realloc and free.
Is it cc or c in a letter?
What happens if a header file is included twice?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
Explain what are header files and explain what are its uses in c programming?
how do you programme Carrier Sense Multiple Access
What is the use of typedef in c?
What is the equivalent code of the following statement in WHILE LOOP format?
What are the benefits of organizational structure?
How are pointers declared in c?
How can I get random integers in a certain range?