Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Economics Expert

C++ program to simulate a binary register that supports shift right and shift left operations. The original value stored in the register, its size and what operation(s) to perform and how many times are all given via the command line arguments. The program must use a class to simulate that register and it should use the stl vector to hold the value of the bits in the register. the program must execute in Linux and g++ compiler.

ARGUMENTS MUST BE SUPPORTED IN ANY ORDER.

by default register must inject 0 values unless told otherwise via command line arguments.

Here are some of the parameters to support as command line arguments:

-i "010101": Initial values stored in register.

-s 6: Specifies the number of bits in shift register.

-r 2: shift the register right by two positions.

-l 3: shift left register by 3 positions.

-v 1: value to inject in vacated bits if other than default.

-p: prints the value of bits in register after performing all the operations. Bits must be printed as a non-spaced string of 0 or 1s and terminated by a new line.

Multiple operations may be specified and they must be performed in the order specified in the command line argument list.

Business Economics, Economics

  • Category:- Business Economics
  • Reference No.:- M92474612
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Business Economics

Demand qd900-2p3pa04m15asupply qs45500-05pqd quantity

Demand: Qd=900-2P+3Pa+0.4M+1.5A Supply: Qs=45500-0.5P Qd = Quantity demanded P = Price of Myvi car (in RM) Pa = Price of Produa Asia (in RM) M = Average consumer income (in RM) A = Promotional expenses Qs= Quantity deman ...

What are the implications of the shift from medical care to

What are the implications of the shift from medical care to the focus on overall health conditions?

British environmentalist kate humble recently made the

British environmentalist Kate Humble recently made the following statement: "Everyone's going to hate me and call me a middle-class bitch but I'm past caring because I'm so incensed. Food waste is endemic but we don't va ...

You want to be a millionaire when you retire in 35 yearsa

You want to be a millionaire when you retire in 35 years. a. How much do you have to save each month if you can earn an annual return of 10.7 percent?  (Do not round intermediate calculations and round your answer to 2 d ...

A researcher wishes to estimate the mean number of hours

A researcher wishes to estimate the mean number of hours per week that children in the 10 to 12 year age range spend viewing television. How large a sample should be selected so that the estimate is within 0.25 hours of ...

Are the outcomes of hospital care different on weekends

Are the outcomes of hospital care different on weekends than weekdays? In a random sample of 500 patients who experienced severe medical complications after admission to acute care wards in three U.S. states from 1999 an ...

1 why are the costs of fixed assests depreciated2 why would

1. Why are the costs of fixed assests depreciated? 2. Why would a bank lending officer be intersted in cash flow staement of a company that is apllying for a loan?

How does fixed cost affect marginal cost why is this

How does fixed cost affect marginal cost? Why is this relationship important?

The below figure represents the potential outcomes of your

The below figure represents the potential outcomes of your first salary negotiation after graduation. Assuming this is a sequential-move game with the employer moving first, indicate the most likely outcome. Does the abi ...

To investigate this a random sample of 18 bean leaflets was

To investigate this, a random sample of 18 bean leaflets was taken. The freezing temperatures were: -1.6 -0.9 -1.3 -2.7 -1.9 -2.2 -3.1 -2.3 -2.1 -0.2 -2.7 -2.9 -2.3 -3.8 -3.6 -4.3 -2.0 -3.3. Make a histogram of the data ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As