C Program to Convert Hexadecimal to Binary

This is a C program to Convert Hexadecimal to Binary. Problem Description This program takes a hexadecimal number and converts to binary number. Problem Solution 1. Take a hexadecimal number as input. 2. For each bit of a hexadecimal number print its equivalent binary number in a four bit fashion. Example: For 22 print it … Read more

advertisement

C program to Convert Decimal to Hexadecimal

This is a C program to Convert Decimal to Hexadecimal. Problem Description This program takes a decimal number as input and converts to hexadecimal. Problem Solution 1. Take a decimal number as input. 2. Divide the input number by 16. Store the remainder in the array. 3. Do step 2 with the quotient obtained until … Read more

advertisement

C program to Convert Decimal to Octal

C Program to convert Decimal number into Octal number. Decimal number is a number with base 10 whereas octal number is a number with base 8. Valid decimal numbers are (0-9) whereas valid octal numbers are (0-7). In decimal to octal conversion, we divide the decimal number by 8 and write the remainder in the … Read more

advertisement

C Program to Convert Binary to Hexadecimal

This is a C program to Convert Binary to Hexadecimal. Problem Description This program takes a binary number as input and converts to hexadecimal. Problem Solution 1. Take a binary number as input. 2. Divide the binary number into groups of 4 bits. For each group of 4 bits, multiply each bit with the power … Read more

advertisement

C Program to Convert Binary to Octal

This is a C program to Convert Binary to octal. Problem Description This program takes a binary number as input and converts to octal. Problem Solution 1. Take a binary number as input. 2. Divide the binary number into groups of 3 bits. For each group of 3 bits, multiply each bit with the power … Read more

advertisement

C Program to Convert Binary to Decimal

Binary Number System: The binary number system also known as base 2 number system was invented in 1689 by Gottfried Leibniz it contains two symbol 0 and 1. The base 2 number system is a positional notation with radix of 2. Each of the digit is called as Bit. Decimal Number System: The decimal number … Read more

advertisement

C Program to Convert Decimal to Binary and Count the Number of 1s

This is a C Program to convert a decimal number to binary & count the number of 1s. Problem Description This C Program converts a decimal number into binary & count the number of 1s. Problem Solution The program uses module operation and multiplication with base 2 operation for conversion. It also uses modulo operation … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.