subject

Write a program that prints a conversion for a variety of numbers as specified by the user. The conversion from base 10 to some other base will be in the range base 2 through base 16. The principle of conversion includes the following steps:

Carry out successive divisions by the new base until a quotient is obtained that is less than the new base.
The ones digit corresponds to the first remainder. The next digit corresponds to the remainder after the quotient has been divided by the base again. The most significant digit is the first quotient less than the base.

Thus 83 [base 10] is 123 [base 8]
83/8 = 10 remainder 3
10/8 = 1 remainder 2
1/8 = 0 remainder 1

Notice that the numbers are written in reverse order of their calculations indicating that a recursive function may be the best way to proceed.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Entering key dates from your course syllabi test and quiz dates, assignments due dates in your planner can you manage your schedule by allowing you to see commitments ahead of time.
Answers: 3
question
Computers and Technology, 21.06.2019 20:30
Write 150 words on what kind of website would you like to make in the future? what sites would you like to model yours after?
Answers: 2
question
Computers and Technology, 21.06.2019 22:30
Aprovides legal protection for something an individual has created
Answers: 1
question
Computers and Technology, 22.06.2019 05:10
Suppose we have a byte addressable computer that has a 32-byte cache with 8 bytes per block. the memory address is 8 bits long. the system accesses memory addresses (in hex) in this exact order: 6e, b9, 17, e0, 4e, 4f, 50, 91, a8, ab, ad, 93, and 94. (a) assuming the cache is direct mapped, what memory addresses will be in cache block 2 after the last address has been accessed? (b) assuming the cache is direct mapped, what is the hit ratio for the entire memory reference sequence given, assuming the cache is initially empty? (c) assuming the cache is 2-way set associative with a lru replacement policy, what is the hit ratio?
Answers: 3
You know the right answer?
Write a program that prints a conversion for a variety of numbers as specified by the user. The conv...
Questions
question
Biology, 26.07.2019 16:50
Questions on the website: 13722361