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


Please Help Members By Posting Answers For Below Questions

Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

1856


Explain how do you determine a file’s attributes?

588


Explain enumerated types in c language?

598


What is the purpose of main( ) in c language?

610


What is the size of structure in c?

691






What is build process in c?

635


What is a wrapper function in c?

573


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

633


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

600


What is keyword with example?

624


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

613


Why we write conio h in c?

550


What is derived datatype in c?

627


Is file a keyword in c?

492


Which one would you prefer - a macro or a function?

593