Answer:
(10000000)₂ = -128 in decimal
(11001100)₂ = -52 in decimal
(10110111)₂ = -73 in decimal
Explanation:
<u>NOTE:</u> If Most Significant Bit is 0, it is positive number and if MSB is 1, it is negative number. If number is positive we can simply convert it to decimal. But if number is negative, follow following formula:
- (complement of the number) +1
<u>EXAMPLE 1</u>
(10000000)₂
(01 1 1 1 1 1 1)₂ ↔ complement of the number
<u>+ 1</u>
(10000000)₂ = 1 ×
= 128 (magnitude in decimal)
But we remember MSB was 1 so answer is -128.
<u>EXAMPLE 2</u>
(1 1 0 0 1 1 00)₂
(0 0 1 1 0 0 1 1)₂
<u>+ 1 </u>
(0 0 1 1 0 1 0 0)₂ = 52 (magnitude in decimal)
But we remember MSB was 1 so answer is -52.
<u>EXAMPLE 3</u>
(1 0 1 1 0 1 1 1)₂
(0 1 00 1 000)₂
<u>+ 1 </u>
(01 00 1 00 1)₂ = 73 (magnitude in decimal)
But we remember MSB was 1 so answer is -73.
Answer:
B) To package a repeated task as a function even though the task does not yield a value
Explanation:
The purpose of a function that returns "void" is to package a repeated task as a function even though the task does not yield a value. Since the function does not return any value, it control returns to the caller.
Answer:
Victoria has a tendency of playing with her hair when she gets nervous.
Explanation:
I believe this is what you are asking for.
:))))
Answer: E. Use a RESTful architecture for both, send the ID through a POST, and ping the service with a GET until a response is available.
Explanation:
Since there are two microservices that need to communicate with each other without holding up a thread on either end, the communication framework should be used is a RESTful architecture for both, send the ID through a POST, and ping the service with a GET until a response is available.
REST is a software architectural style which is used in defining the set of rules that be used for the creation of web services. The REST architecture allows requesting systems to be able to access and manipulate web resources.
Answer:
<u>Syntax of function in the Python Programming Language.</u>
def function_name():
'''body of the function or code'''
#calling of the function
function_name()
Note: In Python Programming Language, Indentation is sensitive if you not focus on the indentation then, you program occurs an indentation error.
Explanation:
In Python Programming language, we can use the "def" keyword to define a function then we write the name of the function and then use parentheses for the argument list. "#" is used for the single-line comment and " ''' ''' " is used for the multiple line comment.
A function is the part or module of the program which provides users the feature of reusability of that code anywhere only by calling them.