1. Write a program to Input a number and print its binary equivalent. For eg ( the binary equivalent of 6 is 110).
To find the binary number keep dividing the number by 2 till you get a 0 in the end.
Division Remainder (R)
28 / 2 = 14 0
14 / 2 = 7 0
7 / 2 = 3 1
3 / 2 = 1 1
1 / 2 = 0 1
Write the remainder from bottom to top 11100 is the binary equivalent of 28.
Answers
Answered by
0
Answer:
28 / 2 = 14 0
14 / 2 = 7 0
7 / 2 = 3 1
3 / 2 = 1 1
1 / 2 = 0 1
Write the remainder from bottom to top 11100 is the binary equivalent of 28.
Similar questions