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
Paul [167]
3 years ago
6

Calculate the sum and difference of the given 8-bit unsigned binary numbers. All calculations must be done in binary. Show your

work.
Computers and Technology
1 answer:
Korolek [52]3 years ago
5 0

Answer:

10010101 + 00101110 = 1 1 0 0 0 0 1 1 , 10010101 - 00101110 = 0 1 1 0 0 1 1 1,

01101101 + 01110011   = 1 1 1 0 0 0 0 0 , 01101101 - 01110011 = - 1  1 1 1  1 0 1  0

Explanation:

10010101 + 00101110 =   1 0 0 1 0 1 0 1

                                    + <u>0 0 1 0 1 1 1 0</u>

                                       <u>1 1 0 0 0 0 1 1</u>

In binary, 1 plus 0 is 1, but 1 plus 1 ( which conventionally is two) is divided by 2 and the result is carried-out, while the remainder is used as the answer.

10010101 - 00101110 =   1 0 0 1 0 1 0 1

                                   - <u>0 0 1 0 1 1 1 0</u>

                                     <u>0 1 1 0 0 1 1 1</u>  

Subtraction in Binary calculation, a borrow to a 0 value is equal to two, this law is implemented in a case where 1 is subtracted from 0 ( which is impossible).

01101101 + 01110011   =   0 1 1 0 1 1 0 1

                                   + <u>0 1 1 1 0 0 1  1</u>

                                      <u>1 1 1 0 0 0 0 0</u>

<u />

01101101 - 01110011   =   0 1 1 0 1 1 0 1

                                   - <u>0 1 1 1 0 0 1  1</u>

                                   - <u>1  1 1 1  1 0 1  0</u>

At the end of the subtraction, if the value subtracted from in less than the subtracted number, two is borrowed and the result becomes negative or signed.

You might be interested in
Part 1 of 4 parts for this set of problems: Given an 4777 byte IP datagram (including IP header and IP data, no options) which i
LekaFEV [45]

Answer:

Fragment 1: size (1332), offset value (0), flag (1)

Fragment 2: size (1332), offset value (164), flag (1)

Fragment 3: size (1332), offset value (328), flag (1)

Fragment 4: size (781), offset value (492), flag (1)

Explanation:

The maximum = 1333 B

the datagram contains a header of 20 bytes and a payload of 8 bits( that is 1 byte)

The data allowed = 1333 - 20 - 1 = 1312 B

The segment also has a header of 20 bytes

the data size = 4777 -20 = 4757 B

Therefore, the total datagram = 4757 / 1312 = 4

6 0
2 years ago
What is modularity? Help asap
mash [69]

I believe it is b “Broadly speaking, modularity is the degree to which a system's components may be separated and recombined, often with the benefit of flexibility and variety in use. ... However, the concept of modularity can be extended to multiple disciplines, each with their own nuances.”

4 0
3 years ago
If we compare the push function of the stack with the insertFirst function for general lists, we see that the algorithms to impl
Jet001 [13]

Answer:

True

Explanation:

<u>Algorithm for push function</u>

The method of placing data on a stack is called a push operation.

It involves these steps −

  • Check that the stack is complete.  
  • If the stack is complete, it will cause an error .  
  • Increases top to point next empty room if the stack is not complete.  
  • Adds the data component to the place of the stack where top is pointing.
  • Success returns.

<u>Algorithm for Insertfirst function</u>

  • Create a new Link with provided data.
  • Point New Link to old First Link.
  • Point First Link to this New Link.

As we can see that in both algorithms ,we are inserting data to a new nodes and incrementing/pointing to a new node for inserting data.Both algorithms uses the same approach.

8 0
3 years ago
Using a conversation voice is part of:
MaRussiya [10]
Need more information
4 0
3 years ago
In this lab, you use the flowchart and pseudocode found in the figures below to add code to a partially created C++ program. Whe
never [62]

Answer:

The equivalent program in C++:

#include<iostream>

#include <sstream>

using namespace std;

int main(){

   string Score, Rank;

   cout<<"Enter student score and class rank: ";

   cin>>Score>>Rank;

   int testScore = 0, classRank = 0;

   stringstream sstream(Score);

   sstream>>testScore;

   

   stringstream tream(Rank);

   tream>>classRank;

   

   if (testScore >= 90){

       if(classRank >=25){cout<<"Accept";}

       else{cout<<"Reject";}

   }

   else if(testScore >= 80){

       if(classRank >=50){cout<<"Accept";}

       else{cout<<"Reject";}

   }

   else if(testScore >= 70){

       if(classRank >=75){cout<<"Accept";}

       else{cout<<"Reject";}

   }

   else{cout<<"Reject";}

   return 0;

}

Explanation:

This declares Score and Rank as string variables

   string Score, Rank;

This prompts the user for score and class rank

   cout<<"Enter student score and class rank: ";

This gets the user input

   cin>>Score>>Rank;

This declarees testScore and classRank as integer; and also initializes them to 0

   int testScore = 0, classRank = 0;

The following converts string Score to integer testScore

<em>    stringstream sstream(Score);</em>

<em>    sstream>>testScore;</em>

The following converts string Rank to integer classRank

   stringstream tream(Rank);

   tream>>classRank;

The following conditions implement the conditions as given in the question.    

If testScore >= 90

<em>    if (testScore >= 90){</em>

If classRank >=25

<em>        if(classRank >=25){cout<<"Accept";}</em>

If otherwise

<em>        else{cout<<"Reject";}</em>

<em>    } ---</em>

If testScore >= 80

<em>    else if(testScore >= 80){</em>

If classRank >=50

<em>        if(classRank >=50){cout<<"Accept";}</em>

If otherwise

<em>        else{cout<<"Reject";}</em>

<em>    }</em>

If testScore >= 70

<em>    else if(testScore >= 70){</em>

If classRank >=75

<em>        if(classRank >=75){cout<<"Accept";}</em>

If otherwise

<em>        else{cout<<"Reject";}</em>

<em>    }</em>

For testScore less than 70

<em>    else{cout<<"Reject";}</em>

<em />

3 0
2 years ago
Other questions:
  • What file format can excel save files as
    10·1 answer
  • You receive a file named Project4.xlsx as an attachment to an email message. What do you expect the file to contain?
    8·1 answer
  • Enter a formula in cell b7 to calculate the average value of cells b2:b6
    13·1 answer
  • _____ is defined as an attraction for a source based on a resemblance between the source and receiver of a message.
    15·1 answer
  • Plz help ASAP
    10·1 answer
  • Write a program that sorts a vector of names alphabetically using the selection sort and then searches the vector for a specific
    7·1 answer
  • Use the drop-down menus to complete the statements about message marking, categorizing, and flagging.
    13·2 answers
  • I’m gonna ask this again because I REALLY need an answer.
    10·2 answers
  • Consider a DataFrame named df with columns named P2010, P2011, P2012, P2013, 2014 and P2015 containing float values. We want to
    9·1 answer
  • Data becomes _______ when it is presented in a format that people can understand and use.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!