Question: C++ problems 1 0 1 0 0 0 Binary Match Representation Representation We then assign a label to each row and column to make it
C++ problems



1 0 1 0 0 0 Binary Match Representation Representation We then assign a label to each row and column to make it easier to locate where the players' marks Row 1 X X 1 0 1 5 Row 2 Row 3 o o o 0 0 0 Binary Match Representation Representation We have Row 1: The row containing the binary representation 101. Row 2: he row containing the binary representation e11. Row 3: The row containing the binary representation eee. You might have noticed that our Tic-Tac-Toe uses three bits per row to represent a match. This means that each row can be represented by an integer number between 0 and 7 The picture below shows all of these numbers and their binary representation. 0 0 1 0 1 0 Each of the rows above can be easily represented with a variable that holds an integer number. An appropriate data type for this task would be unsigned short or unsigned int A variable of type unsigned short can hold up to 2 bytes of information. A variable of type unsigned int can hold up to 4 bytes of information. Because we only need three bits per row we can use three unsigned short variables
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
