I need you to develop some software for me. I would like this software to be developed for Windows
$10-30 USD
Terminado
Publicado hace más de 7 años
$10-30 USD
Pagado a la entrega
The Binary Number System
In the familiar base 10 system, the smallest (rightmost) digit of a number is the ones place (100). The next digit is in the tens place (101), and the next one is in the hundreds place (102) and so forth. Thus the number 122 is really (1 * 102) + (2 * 101) + (2 * 100). Each digit is worth a power of 10 more than the digit to the right of it in the base 10 system.
Similarly, in the binary number system, the smallest (rightmost) digit of a number is the ones place (20). The next digit is in the twos place (21), and the next one is in the fours place (22) and so forth. Thus the number 101 is really (1 * 22) + (0* 21) + (1 * 20) = 5. Each digit is worth a power of 2 more than the digit to the right of it in the base 2 system.
Write a program to display all of the binary digits of a number. You program should continue as longer as user wishes. input numbers must be validated (no negative integers are allowed).
Hint:
To find a binary digit, print the remainder number % 2, then replace the number with number/2. Repeat this process until the number is 0.
SAMPLE OUTPUT:
Enter a number for binary conversion=>13
Binary Number
1 (0 position)
0 (1 position)
1 (2 position)
1 (3 position)
Another number to enter =? , type 1 for yes and any other number for no=>1
Enter a number for binary conversion=>10
Binary Number
0 (0 position)
1 (1 position)
0 (2 position)
1 (3 position)
Another number to enter =? , type 1 for yes and any other number for no=>2
Hi, i am an engineer by profession and have them some great projects using C++ and C programming. I have made a minesweeper game in C++, a dynamic maze solver robot in Arduino (C Programming).
The algorithm to your task looks simple, i will make a recursive loop function that will convert no matter how big a number to binary.
I previously made this program (decimal to binary converter) as a part of my c language project at school
I can provide you with this program mostly 2 hours after you accept the bid