Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a truth table In this two player game, each player holds up either 0, 1, 2, or 3 fingers behind his or her back.

Create a truth table

In this two player game, each player holds up either 0, 1, 2, or 3 fingers behind his or her back. If the sum of the number of fingers both players is holding up is even, player 1 wins. If the sum is odd, player two wins. In addition, the sum of the fingers held up must be at least 2 and cannot be more than 5. If the sum is out of bounds then the players must try again and no one wins. For example, if player 1 held up 1 finger and player two held up 3 fingers the sum would be 4 (an even number) and player 1 would win. As a second example, if both players held up 3 fingers, the sum would be 6 and the players would have to try again since 6>5.

You will use 4 binary inputs. These binary inputs will represent the number of fingers held up by each of the two players. Inputs P11 and P12 will be used to represent the number of fingers held up by player 1 in binary with P11 being the MSB and P12 being the LSB of a 2-digit binary number. Inputs P21 and P22 will be used to represent the number of fingers held up by player 2.

You must drive 3 digital binary outputs as follows:P1 wins- 1 if player 1 wins (even sum of fingers), 0 otherwise

P2 wins- 1 if player 2 wins (odd sum of fingers), 0 otherwise

Out of bounds-1 if sum of fingers held up is 0, 1, or 6

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions

Question

Mention the bases on which consumer market can be segmented.

Answered: 1 week ago

Question

Explain consumer behaviour.

Answered: 1 week ago

Question

Explain the factors influencing consumer behaviour.

Answered: 1 week ago