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
VARVARA [1.3K]
4 years ago
13

As discussed in the text, one possible performance enhancement is to do a shift and add instead of an actual multiplication. Sin

ce 9 6, for example, can be written (2 2 2 1) 6, we can calculate 9 6 by shift ing 6 to the left 3 times and then adding 6 to that result. Show the best way to calculate 033 055 using shift s and adds/subtracts. Assume both inputs are 8-bit unsigned integers.

Computers and Technology
1 answer:
In-s [12.5K]4 years ago
3 0

Answer:

See attached picture.

Explanation:

See attached picture.

You might be interested in
How many radio buttons from the following code can be selected at any given time?a.Home Addressb.Federal Expressc.UPS
ipn [44]

3 radio buttons from the following code can be selected at any given time.

<u>Explanation:</u>

In any programming language end user prompts either checkbox or radio buttons.

Normally checkbox are used for end user to select true or false methods where return value will true if checkbox click or false, one or zero. It all depends how end user uses the checkbox in his or her programming languages.

Radio buttons are used to end user in the programming languages where to select one radio buttons out of given radio buttons.

Where each radio buttons are marked with own assigned values. Based upon user selecting the radio buttons return will be assigned value of selected radio button.

If select option is multiple, each category of radio button is placed in grouping.

6 0
3 years ago
An operating system coordinates the BLANK of a computers operation.
devlian [24]
I believe it is D. The Central Processing Unit (CPU) can manage memory and storage. It also makes sure every program has what it needs to keep it up and running. 
8 0
3 years ago
Read 2 more answers
What is the difference between soft copy output devices and hard copy output devices​
Alecsey [184]

the output printed on the paper is called hardcopy output. some examples are printer and plotter.

the output produced on display screen and audio sound is called soft copy output. some examples are moniter and speaker.

3 0
3 years ago
Write a program that allows two players (player X and player O) to play a game of tic-tac-toe. Use a two- dimensional char array
Nimfa-mama [501]

#include <iostream>

using namespace std;

//function prototypes

void showBoard(char[][3]);

bool checkWinner(char[][3], char);

void playerMove(char[][3], char);

int main()

{

  //declare variables needed

  //declare 2D array for the board

  //and initialize with all *

  char board[3][3] = {{'*', '*', '*'},

                      {'*', '*', '*'},

                      {'*', '*', '*'}};

  int moves = 0;  //variable to keep track

                  //of number of moves

                  //to determine tie

  cout << "TIC - TAC - TOE\n\n";

  //while loop to repeat until 9 moves are done

  while(true){

      //display board

      showBoard(board);

      cout << "Player 1 moves\n";

      //get player X move

      playerMove(board, 'X');

      //increment moves counter

      moves++;

      //if this is a winning move

      //store winner and terminate

      if(checkWinner(board, 'X')){

          showBoard(board);

          cout << "\nPlayer 1 (X) wins!\n";

          return 0;

      }

      //if 9 moves are done

      //break from loop

      if(moves == 9)

          break;

      //display board again

      showBoard(board);

      cout << "Player 2 moves\n";

      //do the same thing for player O

      playerMove(board, 'O');

      moves++;

      if(checkWinner(board, 'O')){

          showBoard(board);

          cout << "\nPlayer 2 (O) wins!\n";

          return 0;

      }

  }

  //if we have gone this far and program

  //still has not terminated (no winner)

  //it means this is a tie

  showBoard(board);

  cout << "This game is a tie!\n";

  //return 0 to mark successful completion of program

  return 0;

}

//this function is helpful because we need to show

//the board repetitively during the program

void showBoard(char board[][3]){

  cout << endl;

  //loop on the rows

  for(int row = 0; row < 3; row++){

      //loop on the columns

      for(int col = 0; col < 3; col++)

          cout << board[row][col] << "    ";

      //display newline after each row

      cout << endl << endl;

  }

  cout << endl;

}

//this function checks if second argument

//is a winning player

bool checkWinner(char board[][3], char player){

  //boolean variable to check

  //for winner later

  bool flag;

  //CHECK FOR WINNER IN ROWS

  for(int row = 0; row < 3; row++){

      //initialize flag to true

      flag = true;

      //loop within a row

      for(int col = 0; col < 3; col++){

          //Notice that the right part of the

          //assignment operator, is an expression

          //with a relational operator (==)

          //this expression will yield either

          //true (1) or false (0)

          //while flag is already true (1)

          //if multiplied by true (1) will result

          //in true(0), or multiplied by false (0)

          //will result in false (0)

          flag *= (board[row][col] == player);

      }

      //after checking within row, if the flag

      //is still true at this point, it means we have

      //three chars of the same kind within the row,

      //thus we have a winner

      if(flag)

          return true;

      else

          continue;

  }

  //CHECK FOR WINNER IN COLUMNS

  //using a similar logic

  for(int col = 0; col < 3; col++){

      flag = true;

      for(int row = 0; row < 3; row++){

          flag *= (board[row][col] == player);

      }

      if(flag)

          return true;

      else

          continue;

  }

  //CHECK FIRST DIAGONAL (row = col)

  //reset flag to true

  flag = true;

  //check diagonal

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

      flag *= (board[i][i] == player);

  }

  //check if there is winner

  if(flag)

      return true;

  //CHECK OTHER DIAGONAL (row = 2 - col)

  //reset flag to true

  flag = true;

  //check diagonal

  for(int col = 0; col < 3; col++){

      flag *= (board[2-col][col] == player);

  }

  //check if there is winner

  if(flag)

      return true;

  //if all of these have been checked

  //and function still has not returned,

  //it means there is no winner

  return false;

}

//this function gets a move from the player,

//checks if it is valid, and if yes it puts

//it on the board

void playerMove(char board[][3], char player){

  //variables to store user move

  int row, col;

  //get user move

  cout << "Row: ";

  cin >> row;

  cout << "Col: ";

  cin >> col;

  //check if this is valid move

  //you have to check if that tile has

  //already been marked, or if tile

  //of choice is out of bounds of board

  while(board[row-1][col-1] != '*' ||

        row > 3 || row < 0 ||

        col > 3 || row < 0)

          {

      cout << "Invalid move! Try again\n";

      cout << "Row: ";

      cin >> row;

      cout << "Col: ";

      cin >> col;

  }

  //after validation, mark new move

  board[row-1][col-1] = player;

}

8 0
3 years ago
Consider a 4-drive 200gb-per-drive raid array.what is the available data storage
SashulF [63]
It depends on what RAID you're using. Some RAID arrays use multiple drives for redundancy. Therefore, if all four of those drives were on this kind of RAID array, then you would only have 200GB of available storage, as data is duplicated.

In other RAID arrays, speed and performance is the main goal, where data is spit between the four drives, meaning there would be a total of 800GB of available storage.

Finally, you could have a mix between the two if you liked, where 2 drives are paired up in the redundancy RAID, as are the other two. The two pairs are then put up in the performance RAID, allowing for a total of 400GB of available storage.


Long story short, it depends on what kind of RAID you're using, and there are many more RAID configurations than I have mentioned here.
7 0
3 years ago
Other questions:
  • In Windows-based systems, a value that specifies the rights that are allowed or denied in an access control entry (ACE) of an ac
    14·1 answer
  • You must create an instructional video for your company and are required to ensure it is compatible with your company's windows
    6·1 answer
  • Why is it important to back up data on a computer before you burn-in test the cpu?
    9·1 answer
  • Write a statement that declares a PrintWriter reference variable named output and initializes it to a reference to a newly creat
    5·1 answer
  • Draw a flowchart and write pseudocode to represent the logic of a program that allows the user to enter values for the width and
    15·1 answer
  • What structures in which lighting heating and other systems are controlled by computers
    14·1 answer
  • Heelo how do u do python syntax lesson 11 on code academy
    12·1 answer
  • Identify and define the various systems used in creating the Technological Systems.
    15·1 answer
  • How do you write a multiplication formula in excel with an absolute refrence?
    11·1 answer
  • A large retail company hires several new joiners and would like to incorporate Virtual Reality (VR) into their onboarding proces
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!