Design a C program to convert a decimal number to equivalent 8-bit binary number. Include code that will ensure that the input number is valid, i.e. that numbers 0 to 255 only are accepted.
For example, the table below illustrates the process of converting the Decimal number 14 to equivalent Binary. Therefore, Decimal Number 14 = 1110 binary
Division
Quotient
Remainder
14 / 2
7
0
7 / 2
3
1
3 / 2
1
1
1 / 2
0
1
Test your program with any decimal number such as (e.g., 14) and comment on how the output from your program differs from the expected output. State the reason for the noted difference.

Good luck! If you have any specific questions, feel free to ask. By the way, "I don't know where to start" is not specific.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.