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 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 19:10
With increases in magnification, which of the following occur? a. the field of view decreases. b. the ambient illumination decreases. c. the larger parts can be measured. d. the eyepiece must be raised.
Answers: 1
question
Engineering, 04.07.2019 19:20
A21-tooth spur pinion mates with a 28-tooth gear. the diametral pitch is 3 teeth/in and the pressure angle is 20°, find the following values: the addendum, dedendum, circular pitch, tooth thickness, and base circle diameters.
Answers: 2
question
Engineering, 06.07.2019 03:30
Abrayton cycle operates with a regenerator on the air-standard with properties evaluated at 400 k. the tem- perature of the air entering the compressor is 350k while the temperature of the air exiting the compressor is 600 k. the temperature of the air entering the turbine is 1600 k. the overall cycle produced 600 kj/kg of net work out. assuming a regenerator effectiveness of 0.8, what is the temperature of the air before heat addition (combustion)? draw this process on a t - s diagram
Answers: 3
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
Social Studies, 30.04.2021 06:30
Questions on the website: 13722363