subject
Engineering, 17.02.2020 16:43 contactjoankenny

In the Programming Example, Converting a Number from Decimal to Binary, given in this chapter (15), you learned how to convert a decimal number into the equivalent binary number. Two more number systems, octal (base 8) and hexadecimal (base 16), are of interest to computer scientists. In fact, in C++, you can instruct the computer to store a number in octal or hexadecimal. (Appendix C describes these number systems.) The digits in the octal number system are 0, 1, 2, 3, 4, 5, 6, and 7. The digits in the hexadecimal number system are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. So A in hexadecimal is 10 in decimal, B in hexadecimal is 11 in decimal, and so on. The algorithm to convert a positive decimal number into an equivalent number in octal (or hexadecimal) is the same as discussed for binary numbers. Here, we divide the decimal number by 8 (for octal) and by 16 (for hexadecimal). Suppose ab represents the number a to the base b. For example, 7510 means 75 to the base 10 (that is decimal), and 8316means 83 to the base 16 ( that is hexadecimal). Then 75310 = 13618 and 75310 = 2F116. Write a program that uses a recursive function to convert a number in decimal to base 8 or base 16. java

ansver
Answers: 2

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Line joining liquid phase with liquid and solid phase mixture is known as: a) liquidus b) solidus c) tie line d) none of the mentioned
Answers: 2
question
Engineering, 04.07.2019 18:10
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
question
Engineering, 04.07.2019 18:10
Compute the pressure drop of 30°c air flowing with a mean velocity of 8 m/s in a circular sheet-metal duct 300 mm in diameter and 15 m long. use a friction factor, f 0.02, and pair = 1.1644 kg/m a. 37.26 pa b. 25.27 pa n c. 29.34 pa d. 30.52 pa
Answers: 1
question
Engineering, 04.07.2019 18:20
Athin walled concentric tube exchanger is used to cool engine oil from 160°c to 60°c with water that is available at 25°c acting as a coolant. the oil and water flow rates are each at 2 kg/s, and the diameter of the inner tube is 0.5 m and the corresponding value of the overall heat transfer coefficient is 250 w/m2. oc. how long must the heat exchanger be to accomplish the desired cooling? cpwater=4.187 kj/kg-candcpengine el=2.035 kj/kg·°c, oil . 120]
Answers: 1
You know the right answer?
In the Programming Example, Converting a Number from Decimal to Binary, given in this chapter (15),...
Questions
question
Arts, 01.12.2020 21:10
question
Arts, 01.12.2020 21:10
question
Mathematics, 01.12.2020 21:10
Questions on the website: 13722362