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 22:00
Problems: 1. using textbooks, reference books, and internet as your source of research, draw the following microprocessor microarchitectures i. intel 8086 ii. motorola 68000 i atmel atmega32 iv. mips single cycle v. arm cortex-m3 write an hdl module for a hexadecimal seven-segment display decoder. the input is 4-bit binary representing a hex number (0-f), and the output is 8-bit seven segment display bits (a-h). thus, the decoder must handle the digits 10 - 15 to display a-f respectively, in addition to 0-9 numbers. 2. design a 4-bit left and right rotator (both outputs). first sketch schematic diagrams of your design. then implement your design using hdl coding. 3. 4. design a modified priority encoder that receives an 8-bit input, a7: 0 and produces a 3-bit output, y2o. y indicates the most significant bit of the input that is true. y should be 0 if none of the inputs are true. give a simplified boolean equation, sketch a schematic, and write an hdl code. 5.write an 8: 1 multiplexer module called mux8 with selection inputs s, data input d, and data output y. data input (d) and data output (v) are 32-bit wide
Answers: 3
question
Computers and Technology, 22.06.2019 10:10
3. bob is arguing that if you use output feedback (ofb) mode twice in a row to encrypt a long message, m, using the same key each time, it will be more secure. explain why bob is wrong, no matter what encryption algorithm he is using for block encryption (15 points).
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
The average cost of one year at a private college in 2012-2013 is $43,289. the average grant aid received by a student at a private college in 2012-2013 is $15,680.   what is the average student contribution for one year at a private college in 2012-2013?
Answers: 3
question
Computers and Technology, 23.06.2019 00:20
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
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
Arts, 21.10.2020 22:01
question
Mathematics, 21.10.2020 22:01
question
Mathematics, 21.10.2020 22:01
question
Mathematics, 21.10.2020 22:01
Questions on the website: 13722363