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
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Why doesnt the call scanf work?
What is the most efficient way to count the number of bits which are set in an integer?
write a c program for swapping two strings using pointer
What is malloc and calloc?
Is calloc better than malloc?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
Why is extern used in c?
What is string function in c?
What is a header file?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Write a program for finding factorial of a number.
What is difference between %d and %i in c?
What is c value paradox explain?
What are the preprocessor categories?