answer.
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
Rama09 [41]
2 years ago
12

Consider the eight bit signed binary number 1110 0101. Convert it to signed decimal from assuming the signed binary number is re

presented using one's compliment.
1110 0101
Computers and Technology
1 answer:
lapo4ka [179]2 years ago
7 0

Answer:

-26

Explanation:

The given binary number is 1110 0101. Also given that the signed binary number is represented using one's compliment.

We begin by computing the 1s complement representation of 1110 0101 by inverting the bits: 00011010

Converting 00011010 to decimal, it corresponds to 26.

So the 1s complement of the original number is 26. This means that the original number was -26.

You might be interested in
Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the printAll() member method and a separate println()
vekshin1

Answer:

Following are the program in the java language  

public class Main // Main class  

{

   String courseStudentsname; // variable declaration  

   int age; // variable declaration  

   int ID; // variable declaration  

   Main() // default constructor

   {

courseStudentsname="Smith";//assign the values mention in the question              

       age=20;//assign the values which is mention in the question  

       ID=9999;//assign the values which is mention in the question    

   }

void printAll() // method definition of printAll()  

   {

      System.out.print("Name: " + courseStudentsname ); // display name

      System.out.print(", Age: " + age); // display age

      System.out.print(", ID: " + ID); // display id

   }

public static void main(String[] args) // main fuunction()

{

Main ob=new Main(); // create the object of Main class  

ob.printAll(); // calling the method printAll()

}

}

Output:

Name:"Smith, Age:20, ID:9999

Explanation:

Following are the description of program

  • Create a constructor of "Main" class and store the respective values of courseStudentsname,age and ID in that constructor .
  • create a method printAll() and print the respective values in the given format which is mention in the question by using   System.out.print method.
  • In the main function create an object of "Main" class i.e "ob".
  • Finally, call the printAll() method by using the object of Main class.

4 0
2 years ago
Redo Programming Exercise 16 of Chapter 4 so that all the named constants are defined in a namespace royaltyRates. PLEASE DONT F
Komok [63]

Answer:

Code is given below and output is attached in the diagram:

Explanation:

//Use this header file while using visual studio.

#include "stdafx.h"

//Include the required header files.

#include<iostream>

//Use the standard naming convention.

using namespace std;

//Define a namespace royaltyRates.

namespace royaltyRates

{

    //Declare and initialize required named constants.

    const double PAY_ON_DELIVERY_OF_NOVAL = 5000;

    const double PAY_ON_PUBLISH_OF_NOVAL = 20000;

    const double PER_ON_NET_PRICE_SECOND_OPTION =

    0.125;

    const double PER_ON_NET_PRICE_FIRST_4000 = 0.1;

    const double PER_ON_NET_PRICE_OVER_4000 = 0.14;

};

//Start the execution of main() method.

int main()

{

    //Declare and initialize the required variables

    //which are going to be used to calculate

    //royalities under each option.

    float net_price;

    int num_copies;

    float royaltyUnderOption1, royaltyUnderOption2,

    royaltyUnderOption3;

    royaltyUnderOption1 = royaltyUnderOption2

    = royaltyUnderOption3 = 0;

    //Prompt the user to enter the net price of each

    //novel.

    cout << "Please enter the net price for each ";

    cout << "copy of the novel : ";

    cin >> net_price;

    //Prompt the user to enter the estimated number

    //of copies of the novels to be sold.

    cout << "Please enter the estimated number ";

    cout << "of copies to be sold : ";

    cin >> num_copies;

    //Display the required details and royalty

    //calculated under option 1.

    cout << "\n*** Option 1: ****" << endl;

    cout << "Net price of each novel: $" << net_price;

    cout << endl;

    cout << "Estimated number of copies to be sold ";

    cout << "is: " << num_copies << endl;

    cout << "$";

    cout << royaltyRates::PAY_ON_DELIVERY_OF_NOVAL;

    cout << " is paid to author for the delivery of ";

    cout << "the final manuscript and $";

    cout << royaltyRates::PAY_ON_PUBLISH_OF_NOVAL;

    cout << " is paid for the publication of ";

    cout << "novel." << endl;

    royaltyUnderOption1 =

    royaltyRates::PAY_ON_DELIVERY_OF_NOVAL +

    royaltyRates::PAY_ON_PUBLISH_OF_NOVAL;

    cout << "Total amount of royalty under option 1 ";

    cout << "is $" << royaltyUnderOption1 << endl;

    //Display the required details and royalty

    //calculated under option 2.

    cout << "\n*** Option 2: ****" << endl;

    cout << "Net price of each novel: $";

    cout << net_price << endl;

    cout << "Estimated number of copies to be sold ";

    cout << "is: " << num_copies << endl;

    royaltyUnderOption2 =

   (royaltyRates::PER_ON_NET_PRICE_SECOND_OPTION *

    net_price)* num_copies;

    cout << "Total amount of royalty under option 2 ";

    cout << "is $" << royaltyUnderOption2 << endl;

    //Display the required details and royalty

    //calculated under option 3.

    cout << "\n*** Option 3: ****" << endl;

    cout << "Net price of each novel: $" << net_price;

    cout << endl;

    cout << "Estimated number of copies to be sold ";

    cout << "is: " << num_copies << endl;

    //If the number of copies is greater than 4000.

    if (num_copies > 4000)

    {

         //Total amount of royalty will be 10% of net

         //price of first 4000 copies and 14 % of net

         //price of copies sold over 4000.

         royaltyUnderOption3 =

         (royaltyRates::PER_ON_NET_PRICE_FIRST_4000 *

         net_price) * 4000 +

         (royaltyRates::PER_ON_NET_PRICE_OVER_4000 *

         net_price) * (num_copies - 4000);

    }

    //Otherwise,

    else

    {

         //Total amount of royalty will be 10% of net

         //price of first 4000 copies.

         royaltyUnderOption3 =

         (royaltyRates::PER_ON_NET_PRICE_FIRST_4000 *

         net_price) * num_copies;

    }

    cout << "Total amount of royalty under option 3 ";

    cout << "is $" << royaltyUnderOption3 << endl;

    //If the royalty under option 1 is greater than

    //royalty under option 2 and 3, then option 1 is

    //best option.

    if (royaltyUnderOption1 > royaltyUnderOption2 &&

    royaltyUnderOption1 > royaltyUnderOption3)

    {

         cout << "\nOption 1 is the best option that ";

         cout << "author can choose." << endl;

    }

    //If the royalty under option 2 is greater than

    //royalty under option 1 and 3, then option 2 is

    //best option.

    else if (royaltyUnderOption2 > royaltyUnderOption1

    && royaltyUnderOption2 > royaltyUnderOption3)

    {

         cout << "\nOption 2 is the best option that ";

         cout << "author can choose." << endl;

    }

    //If the royalty under option 3 is greater than

    //royalty under option 1 and 2, then option 3 is

    //best option.

    else

    {

         cout << "\nOption 3 is the best option that ";

         cout << "author can choose." << endl;

    }

    //Use this command while using visual studio.

    system("pause");

    return 0;

}

5 0
2 years ago
A 1.17 g sample of an alkane hydrocarbon gas occupies a volume of 674 mL at 28°C and 741 mmHg. Alkanes are known to have the gen
Nina [5.8K]

Answer:

C3H8

Explanation:

Step 1:

Data obtained from the question. This includes the following:

Mass of alkane = 1.17g

Volume (V) = 674 mL

Temperature (T) = 28°C

Pressure (P) = 741 mmHg.

Gas constant (R) = 0.08206 atm.L/Kmol

Step 2:

Conversion to appropriate unit.

For Volume:

1000mL = 1L

Therefore, 674mL = 674/1000 = 0.674L

For Temperature:

Temperature (Kelvin) = Temperature (celsius) + 273

Temperature (celsius) = 28°C

Temperature (Kelvin) = 28°C + 273 = 301K

For Pressure:

760mmHg = 1atm

Therefore, 741 mmHg = 741/760 = 0.975atm

Step 3:

Determination of the number of mole of the alkane..

The number of mole of the alkane can be obtained by using the ideal gas equation. This is illustrated below:

Volume (V) = 0.674L

Temperature (T) = 301K

Pressure (P) = 0.975atm

Gas constant (R) = 0.08206 atm.L/Kmol

Number of mole (n) =?

PV = nRT

n = PV /RT

n = (0.975 x 0.674)/(0.08206x301)

n = 0.0266 mole

Step 4:

Determination of the molar mass of the alkane.

Mass of alkane = 1.17g

Number of mole of the alkane = 0.0266mole

Molar Mass of the alkane =?

Number of mole = Mass/Molar Mass

Molar Mass = Mass/number of mole

Molar Mass of the alkane = 1.17/0.0266 = 44g/mol

Step 5:

Determination of the molecular formula of the alkane.

This is illustrated below:

The general formula for the alkane is CnH2n+2

To obtain the molecular formula for the alkane we shall assume n = 1, 2, 3 or more till we arrive at molar Mass of 44.

When n = 1

CnH2n+2 = CH4 = 12 + (4x1) = 16g/mol

When n = 2

CnH2n+2 = C2H6 = (12x2) + (6x1) = 30g/mol

When n = 3

CnH2n+2 = C3H8 = (12x3) + (8x1) = 44g/mol

We can see that when n is 3, the molar mass is 44g/mol.

Therefore, the molecular formula for the alkane is C3H8.

7 0
2 years ago
Widget Corp. wants to shift its list of inventory to a cloud so that its different branches can access it easily. The company ne
____ [38]

Answer:

The best cloud option for Widget Corp considering the cloud computing option should be cost-effective and should not expose mission-critical applications and data to the outside world.

Is a hybrid could.

Explanation:

The reasons behind this answer are that in the first place the cloud is not going to be fully managed by a third party, but also by the IT department of Widget Corp allowing it to control its security. Also, that the cloud can be adapted to public or mainstream sources, resources, and platforms. Making it very user friendly and lowering down specific knowledge to use it.

5 0
2 years ago
What might be one reason why a stock becomes more valuable over time
Nikolay [14]
1. The General Market is Down This is for the most part the most evident reason that a stock is underestimated and happens when the large scale perspective of the economy is poor. It is helpful for financial specialists to have some fundamental apparatuses to esteem the general market so they can get ready as the market progresses toward becoming underestimated.
7 0
2 years ago
Other questions:
  • ​identify a text-level element used to mark generic run of text within the document.
    15·1 answer
  • Darcy is creating an instructional manual for her employees. She entered the text in a word processing program and wants to impo
    6·1 answer
  • Which one of the following is the best example of an authorization control? (a)- Biometric device (b)- Digital certificate (c)-A
    11·1 answer
  • Describe two reasons to use the Internet responsibly. Explain what might happen if the Internet use policies were broken at your
    12·2 answers
  • A network design engineer has been asked to design the IP addressing scheme for a customer network. The network will use IP addr
    6·1 answer
  • Write a function called st_dev. St_dev should have one #parameter, a filename. The file will contain one integer on #each line.
    7·1 answer
  • Write a multithreaded program that generates the Fibonacci series using Pthreads thread library. This program should work as fol
    10·1 answer
  • Flight Simulation software, which imitates the experience of flying, is often used to train airline pilots. Which of the followi
    10·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    9·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!