Dividing the number into chunks of 4, it becomes 1000 0010 1111.
Here, 1000 is equivalent to 8,
0010 is equivalent to 2 and
1111 is equivalent to F
Therefore, the number becomes 82F
Dividing the number into chunks of 4, it becomes 1010 1101.
Here, 1010 is equivalent to A and
1101 is equivalent to D.
Therefore, the number becomes AD.
- Divide the given BCD number into chunks of 4, and start computing its equivalent HexaDecimal form.
- Store this number formed in a vector.
- Repeat the process for all the digits of the given BCD number.
- Print the numbers stored in the vector in reverse order.
Below is the implementation of the above approach:
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Program to Convert Hexadecimal Number to Binary
- Program to Convert Octal to Hexadecimal
- Program to Convert Hexadecimal to Octal
- Convert a binary number to hexadecimal number
- Program for Hexadecimal to Decimal
- Program to Convert Octal Number to Binary Number
- Program for decimal to hexadecimal conversion
- Program to convert Number in characters
- Program to convert a given number to words
- Program to convert a given number to words | Set 2
- Program to Convert BCD number into Decimal number
- Program to convert Hexa-Decimal Number to its equivalent BCD
- Python program to convert decimal to binary number
- Convert Hexadecimal value String to ASCII value String
- Check if a HexaDecimal number is Even or Odd
- Count Hexadecimal Number
- Reverse bytes of a Hexadecimal Number
- Largest Even and Odd N-digit numbers in Hexadecimal Number System
- Program to convert Degree to Radian
- Program to Convert Radian to Degree
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : ipg2016107