C program to convert decimal number into binary

c programming
c programming

In this post we will learn how to write a C Program to Convert Decimal Numbers to Binary Numbers.

Example 2

Convert the decimal number 35 to binary.


Write out the number at the right corner. Divide the number continuously by 2 and write the quotient and the remainder. The quotients move to the left, and the remainder is recorded under each quotient. Stop when the quotient is zero.

              0  <-  1 <-    2 <-    4 <-    8 <-    17 <-    35   Dec.

Binary            1        0        0         0          1           1  

Convert Decimal to Binary in C

Partner Sites




Stuff I use to make videos

Windows notebook – http://amzn.to/2zcXPyF

Apple MacBook Pro – http://amzn.to/2BTJBZ7

Desktop - http://amzn.to/2zct252

Microphone – http://amzn.to/2zcYbW1

notebook mouse – http://amzn.to/2BVs4Q3

Screen Recording Software – Camtasia