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
Arisa [49]
3 years ago
15

Subtract (100000)2 from (111)2 using 1s and 2s complement method of subtraction​

Computers and Technology
1 answer:
GenaCL600 [577]3 years ago
6 0

Answer:

-11001

Explanation:

The following steps are performed in order to perform subtraction of the given binary numbers:

Step 1:

Find 2’s complement of the subtrahend. The subtrahend here is 100000

100000

First take 1's complement of 100000

1's complement is taken by inverting 100000

1's complement of 100000 = 011111

Now takes 2's complement by adding 1 to the result of 1's complement:

011111 + 1 = 100000

2's complement of 100000 = 100000

Step 2:

Add the 2's complement of the subtrahend to the minuend.

The number of bits in the minuend is less than that of subtrahend. Make the number of bits in the minuend equal to that of subtrahend by placing 0s in before minuend. So the minuend 111 becomes:

000111

Now add the 2's complement of 100000 to 000111

   0 0 0 1  1  1

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

    1 0 0 1  1  1

The result of the addition is :

 1 0 0 1  1  1

Step 3:

Since there is no carry over the next step is to take 2's complement of the sum and place negative sign with the result as the result is negative.

sum =   1 0 0 1  1  1

2's complement of sum:

First take 1's complement of 1 0 0 1  1  1

1's complement is taken by inverting 1 0 0 1  1  1

1's complement of 1 0 0 1  1  1 = 0 1 1 0 0 0

Now takes 2's complement by adding 1 to the result of 1's complement:

0 1 1 0 0 0 + 1 = 0 1 1 0 0 1

Now place the minus sign with the result of 2's complement:

- 0 1 1 0 0 1

Hence the subtraction of two binary numbers (100000)₂ and (111)₂  is

(-011001)₂

This can also be written as:

(-11001)₂

You might be interested in
You would like to find the average of cells C2, C3, and C4. What should the formula look like? = C2+C3+C4*3 =C2+C3+C4/3 =(C2+C3+
Marizza181 [45]

Answer:

c3 and c4 and c2 are different and same

Explanation:

average cells are ptoboxide

3 0
3 years ago
Read 2 more answers
write a 2d array c program that can capture marks of 15 students and display the maximum mark, the sum and average​
bekas [8.4K]

Answer:

#include <stdio.h>  

int MaxMark(int* arr, int size) {

   int maxMark = 0;

   if (size > 0) {

       maxMark = arr[0];

   }

   for (int i = 0; i < size; i++) {

       if (arr[i] > maxMark) {

           maxMark = arr[i];

       }

   }

   return maxMark;

}

int SumMarks(int* arr, int size) {

   int sum = 0;

   for (int i = 0; i < size; i++) {

       sum += arr[i];

   }

   return sum;

}

float AvgMark(int* arr, int size) {

   int sum = SumMarks(arr, size);

   return (float)sum / size;

}

int main()

{

   int student0[] = { 7, 5, 6, 9 };

   int student1[] = { 3, 7, 7 };

   int student2[] = { 2, 8, 6, 1, 6 };

   int* marks[] = { student0, student1, student2 };

   int nrMarks[] = { 4, 3, 5 };

   int nrStudents = sizeof(marks) / sizeof(marks[0]);

   for (int student = 0; student < nrStudents; student++) {              

       printf("Student %d: max=%d, sum=%d, avg=%.1f\n",  

           student,

           MaxMark(marks[student], nrMarks[student]),

           SumMarks(marks[student], nrMarks[student]),

           AvgMark(marks[student], nrMarks[student]));

   }

   return 0;

}

Explanation:

Here is an example using a jagged array. Extend it to 15 students yourself. One weak spot is counting the number of marks, you have to keep it in sync with the array size. This is always a problem in C and would better be solved with a more dynamic data structure.

If you need the marks to be float, you can change the types.

3 0
2 years ago
You are traveling throughout North America to many metropolitan and rural areas. Which single form of internet connectivity prov
Rudiy27

Answer:

PSTN

Explanation:

The full form of PSTN is Public Switched Telephone Network. It is a traditional circuit-switched telephone network which is used by the several regional, local or national telephony operators. They came in used in 1800s. It is a form of communication among the people which works with the help of underground copper wires.

In the context, when I am travelling through the metropolitan as well as the rural areas of the North America, the PSTN provides the internet connectivity in all the places. It helps me to communicate with the other people with the help of a telephone.

7 0
2 years ago
What is curated content?
disa [49]

Answer:

Content from the web that has been sorted through and shared on a brand’s digital platforms.

Explanation:

This type of content is created by other organizations but shared by a brand because they believe it will be of interest to their audience.

RIP 999

6 0
2 years ago
in speech writing, it can be defined as all aspect of your writing that help the reader move smoothly from one sentence to the n
serious [3.7K]

Answer:

Logical flow

Explanation:

In speech writing, LOGICAL FLOW can be defined as all aspects of your writing that helps the reader move smoothly from one sentence to the next, and from one paragraph to another.

With the Logical flow, one will be able to guide his thoughts coherently and sequentially in which Readers can fully absorb and easily understand the message.

5 0
2 years ago
Other questions:
  • Electrical pressure is also called
    5·2 answers
  • The Earth's _______ is ductile overall, tending to flow very slowly and deform in a _______ manner.
    14·2 answers
  • Clicking on the sheet tab with the _______ adds another worksheet to an Excel file.
    9·1 answer
  • Your task is to create a bash shell script that is able to backup all the C++ program files in your current directory. The algor
    10·1 answer
  • An overall indication of the dependability of data may be obtained by examining the ________, credibility, reputation, and _____
    15·2 answers
  • Por favor definir que es un pseudocódigo y que es un diagrama de flujo.
    13·2 answers
  • When you sign in to your Microsoft account with another Windows device, your settings will appear very differently than they do
    7·1 answer
  • What sort of negative outcomes are possible for this type of risk?
    14·2 answers
  • What are the different alignment options available in Microsoft​
    11·2 answers
  • 1. Who was the first lady programmer?​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!