SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 305 Weeks Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 12 Oct 2017 My Price 8.00

C++ program to simulate a binary register that supports shift right and shift left operations.

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.

 

VERY IMPORTANT: the program must return 0 on success and -1 on failure.

Answers

(5)
Status NEW Posted 12 Oct 2017 09:10 AM My Price 8.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)