1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tester [92]
3 years ago
13

The algorithm ADDN implements N-bit fixed-width binary addition for non-negative integers and ignores overflows. For example, AD

D4((1101)2,(1100)2) = (1001)2 because (1101)2 + (1100)2 = (11001)2 but the leading bit can’t fit in the 4-bit register. A standard way for computers to represent negative integers is the "two’s complement" method TN (x). Non-negative integers from 0 to 2N−1 − 1 are represented using ordinary fixed-width binary (e.g. T4(3) = (0011)2), and a negative integer n with −2 N−1 ≤ n is represented using the binary expansion of the (positive) integer 2N + n (e.g. T4(−3) = (1101)2 because 24 + (−3) = 13 = (1101)2). This representation allows us to use ADDN unchanged for both positive and negative integers! To partially prove this claim, show that if a and b are negative integers with −2 N−1 ≤ a + b, then ADDN (TN (a), TN (b)) = TN (a + b). (Hint: In what situation does ADDN (x, y) not equal x + y, and then what does it equal instead?)
Computers and Technology
1 answer:
WITCHER [35]3 years ago
7 0

Answer:

This statement is true if and only if both left most bit of both numbers after conversion in 2's complement are different.

Explanation:

If both numbers left most bit is different in 2's complement then no overflow occur and the results of the equation are same.

ADDN (TN (a), TN (b)) = TN (a + b)

This equation satisfies if and only if, 2's complement of both binary number contains left most bit different. If the left most bit of both numbers is same then after addition the bits will be overflowed and result of addition in decimal and then convert to 2's complement will not be equal and above mentioned equation will not be satisfied.

It means that if both numbers have same sign, then 2's complement of both bit have same bits, if we add those numbers in decimal and add by converting them in 2's complement and add them both have different answers.  

You might be interested in
Who wants to join my zoom after school 23456+4567
tensa zangetsu [6.8K]
Meeeeeeeeeeeeeeeeeeee
5 0
3 years ago
Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the
vaieri [72.5K]

Answer:

player1Wins = player1Losses = player2Wins = player2Losses = tieCount = 0

score1 = 10

score2 = 10

if score1>score2:

   player1Wins=player1Wins+1

   player2Losses=player2Losses+1

   print("player1 wins")

elif score2>score1:

   player2Wins=player2Wins+1

   player1Losses=player1Losses+1

   print("player2 wins")

else:

   tieCount=tieCount+1

   print("tie")

Explanation:

Since your indentation can not be understand what you give us, please try to do it as you see in the answer part.

Although it seems that this is a part of the code, it is normal that you get errors. However, since you keep track of the variables, it is better to initialize the variables that will keep the counts. Since initially, they are 0, you may set them as 0. Also, if you assign the values to the scores, probably you would not get any error. This way, you may test your code as I did.

Other than these, in the else part you do not need to write "score1=score2", because if score1 is not greater than score2 and if score2 is not greater than score1, this already implies that they are equal

8 0
3 years ago
What does the process of email encryption involve??
stealth61 [152]

Answer: Option C

Explanation:

4 0
2 years ago
What design aspects can you change in a table with the shading options? (Select all that apply.)
timurjin [86]
Fill for cells in the table
5 0
3 years ago
Rasha is working in QuickBooks as a heavy storm begins. Her building is notorious for losing power during storms, so she wants t
Anestetic [448]

Answer:

B.

Explanation:

Manually Back Up:

1. File Menu and click Back Up

2. Click Back Up Company.

3. Click Browse if you wanna a specific location o change the name. Then click Save.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Write two statements to read in values for birthMonth followed by birthYear, separated by a space. Write a statement to print th
    12·1 answer
  • Which is an example of a screenshot?
    7·2 answers
  • When configuring services, what linux directory typically contains server configuration files?
    8·1 answer
  • An automatic door at a store has a sensor in front (A0) and behind (A1). The
    9·1 answer
  • Write a definition of the function printDottedLine, which has no parameters and doesn't return anything. The function prints to
    14·1 answer
  • In order to preview an attachment in an e-mail, click the attachment in the ______
    8·1 answer
  • Which marketing strategy is represented by advertisers paying for online display ads?
    8·1 answer
  • Discuss why diffrent user interface require the use of diffrent type of input device<br>​
    14·1 answer
  • Which quality should an experiment have to be replicable and valid? O clearly detailed results O a well-cited research paper O s
    7·1 answer
  • You have been asked to advise a group of several universities who want to combine research efforts and store data in the cloud.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!