subject
Engineering, 16.01.2021 01:20 juliahbaratt2717

Write a Java program that allows entering, one by one, 8 integers with binary signification i. e 0 or 1, and calculating the decimal number that is equivalent to this binary series. Note that to convert a number in binary representation into decimal representation, you must proceed as follows :
For example : a number with 4 binary digits : 1 1 0 1 will be converted to decimal representation by taking digits from right to left : 1x20 +0x21 +1x22 +1x23 =13.
Example of execution :
Enter a binary digit: 1
Enter a binary digit: 0 Enter a binary digit: 0 Enter a binary digit: 1 Enter a binary digit: 0 Enter a binary digit: 1 Enter a binary digit: 0 Enter a binary digit: 1
The decimal number is : 169.
The entry of each digit must be validated. If the digit is not 0 or 1, we retake the entry of that digit till we obtain 8 binary digits.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 03:10
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
question
Engineering, 04.07.2019 18:20
Apiston-cylinder device contains 0.1 m3 of liquid water and 0.9 m3 of water vapor in equilibrium at 800 kpa. heat is transferred at constant pressure until the temperature of water reaches 350 °c. determine (a) the quality of water at the initial state (b) the work associated with this process, (c) the heat associated with this process.
Answers: 2
question
Engineering, 04.07.2019 19:20
Ashielded metal arc-welding operation is accomplished in a work cell by a fitter and a welder. the fitter takes 5.5 min to load components into the welding fixture at the beginning of the work cycle, and 1.5 min to unload the completed weldment at the end of the cycle. the total ength of the weld seams 1200 mm, and the travel speed used by the welder averages 300 mm/min. every 600 mm of seam length, the welding stick must be changed, which takes 0.8 min. while the fitter is working, the welder is idle (resting): and while the welder is working the fitter is idle. (a) determine the average arc-on time as a fraction of the work cycle time. (b) how much improvement in arc-on time would result if the welder used flux-cored arc welding (manually operated), given that the spool of weld wire must be changed every 10 weldments, and it takes the welder 5.0 min to accomplish the change? (c) what are the production rates for these two cases (weldments completed per hour)? attach your work and solutions.
Answers: 1
question
Engineering, 06.07.2019 02:30
On solidification from a melt, the polymer polyethylene forms a semi-crystalline spherulite structure. (i) sketch an individual spherulite and label the amorphous and crystalline regions. (ii) draw a schematic to show the changes in specific volume with temperature during cooling from the melt, comparing it to the theoretical extremes of fully crystalline and fully amorphous (indicate tm and tg)
Answers: 2
You know the right answer?
Write a Java program that allows entering, one by one, 8 integers with binary signification i. e 0 o...
Questions
question
Health, 14.07.2021 16:20
question
Mathematics, 14.07.2021 16:20
question
Mathematics, 14.07.2021 16:20
question
Mathematics, 14.07.2021 16:30
question
Mathematics, 14.07.2021 16:30
Questions on the website: 13722367