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
Kay [80]
3 years ago
12

Design a method for representing the state of a tic-tac-toe board in computer memory. can you fit your representation into three

bytes?
Computers and Technology
2 answers:
ra1l [238]3 years ago
7 0
The combination of Xs,Os, and blanks will approximately be somewhere between 2048 and about 4048. The combination’s total is 19, 683, but since the Xs and Os number will always be equal or off by 1, many cases are eliminated. Thus, the board is represented in 11 or 12 bits.
mote1985 [20]3 years ago
4 0

Answer:

A Tic-Tac-Toe board consist of 9 fields. Each field can take 3 states: Empty, Circle, Cross. To represent each state you need 2 bits: 00, 01, 10.

With two bits for each field, you can easily represent whole board in 3 bytes, by using two bits as each field, and each byte as row of board.

You might be interested in
All linear programming problems have all of the following properties EXCEPT
lyudmila [28]

Answer:

alternative optimal solutions

Explanation:

8 0
3 years ago
Read 2 more answers
How many arguments are required for the sum function?
podryga [215]
Provide us with this "sum" function, and we can tell you. We aren't psychic.
7 0
3 years ago
Which items may interfere with a wireless connection and may cause disruptions or delays in submitting assignments in blackboard
GarryVolchara [31]

The items that may cause to interfere a wireless connection causing a delay then in homework or assignment submission would then be large metals such as c. microwave ovens. Hope this answer would then be of big help to you.

4 0
3 years ago
Read 2 more answers
What is the maximum number of communication paths for a team of twenty people?
MAVERICK [17]
Each of the 20 people has 19 other people to communicate to. If you add that all up you get 20*19 paths, but then each path is counted twice (back and forth), so we divide this by 2. 20*19/2 = 190.

The general forumula is n(n-1)/2
6 0
3 years ago
Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all th
Whitepunk [10]

Answer:

Following are the statement in C++ Language is given below

total=0; // variable declaration

cin >> amount; // Read the input

while(amount >=0) //iterating the loop

{

if(amount>0) // checking condition

total=total+amount; // perform operation

}

Explanation:

Following is the description of the statement

  • Declared a variable "total" and initialized with them 0 to them.
  • Read the input in the "amount" variable by using cin.
  • iterating the loop when the amount is greater then 0.
  • Checking the condition if(amount>0) then adding the total variable and amount and storing them into the total variable.

8 0
3 years ago
Other questions:
  • The _____ icon looks like a clipboard with a page of paper attached. Cut Copy Paste Clipboard
    5·1 answer
  • To change a chart's data series, make the chart active, then in the data group on the chart tools design tab, click the _____ bu
    9·1 answer
  • How do you create a reference page in apa format with all websites?
    5·1 answer
  • What is master slide and tell about master slide
    6·1 answer
  • What is a quick way to close the header or footer view in a microsoft word document?
    12·1 answer
  • How do I insert a row above the selected row in between row and row 2 revenue xls
    5·1 answer
  • ________ are chunks of software - installed on one's computer, tablet, or smartphone - that are gateways to games, online resour
    8·1 answer
  • Your assignment is to write an assembly language program which read a string and print it in uppercase. This program asks the us
    11·1 answer
  • What is wrong with the following code?
    11·1 answer
  • palindrome is a string that reads the same forwards as backwards. Using only a xed number of stacks, and a xed number of int and
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!