Answer:
The answers are:

Explanation:
<u>a. (1001111) 2 = ( ) 10</u>
In order to convert a base 2 number to base 10 number system the place values are used.
the procedure is as follows:

<u>b) (11000001) 2 = ( ) 16</u>
In order to convert a base 2 number into base 16, group of 4-bits are made starting from right to left
The groups from the given number are:
1100 0001
Then the groups are changed in to decimal/hexa
So,

Writing in the same order in which groups were:

<u>c) (E16) 16 = ( ) 10</u>

<u>d) (56) 10 = ( ) 16</u>
Dividing by 16 and noting remainders
16 56
3 - 8
So,
The number in base 16 is 38
<u>e) (63) 10 = ( ) 2</u>
Dividing by 2
2 63
2 31 - 1
2 15 - 1
2 7 - 1
2 3 - 1
1 - 1
So the number after converting in base 2 is:
111111
Hence,
The answers are:

Answer:
ljb lih lug outbpiyougvotvoy
outiyfiyfiyfiyffiyvitfurcutfcutcrcutfutcdu
Explanation:
didn't understand the question
Answer:
Following are the code to this question:
def binarynumber(num):#defining a method binarynumber that accepts a parameter num
x=""#defining a string variable x
if (num!=0):#defining if condition to check number not equal to 0
while (num>=1):#defining a loop that check value is grater then equal to one
if (num %2==0):#defining if condition to check num is even
x=x+"0" #add string value 0 in num variable
num=num/2 #divide the value by 2
else:#defining else block
x=x+"1"#add string value 1 in num variable
num=(num-1)/2#first subtract 1 into num variable then divide the value by 2
else:
x="0"#assign string value 0 in num variable
return "".join(reversed(x))#return value
num = int (input ("Enter any number: "))#defining num variable that input the integer value
print (binarynumber(num))#using print method to call method binarynumber with passing num parameter
Output:
Enter any number: 12
1100
Explanation:
- In the above python code a method "binarynumber" is declared, in which the "num" variable passes as the parameter inside the method a string variable "x" is declared that stores all converted values.
- Inside the method and if the block is declared that checks number value is not equal to 0 if this condition is false then it will add string value and reverse its value.
- Or if the condition is true it defines a while loop that calculates the given number binary digits and returns its value.
- At the last step, the num variable is declared that inputs the integer value from the user end and calls the method by using the print method.
Answer:
return values.remove() + values.remove();
Explanation:
The appropriate expression to complete the method, which is designed to return the sum of the two smallest values in the parameter array number is indicated below in bold font :
public static int
sumTwoLowestElements(int[] numbers)
{
PriorityQueue values = new PriorityQueue<>();
for (int num: numbers)
{ values.add(num);
}
return values.remove() + values.remove();
}
The return statementin programming is often used when a function is ready to return a value to its caller.