Bulls and Cows

Bulls and Cows hides a four-digit code, and no digit is used twice. Enter a guess of four different digits. A bull is a digit in the right place. A cow is a digit that belongs in the code but sits in another place. Read each reply, then try a tighter guess, until you have four bulls.

Loading game…

Rules and help

Bulls and Cows is a number guessing game. The code is four digits from 0 to 9, each used once, and it may start with 0. You learn it only by guessing.

How to play

  • A guess. Enter four different digits, then press Guess. Type them or tap them. Delete or Backspace removes the last digit, and Enter submits. A repeated guess is turned away.
  • Bulls. A bull is a digit in the code and in that same place.
  • Cows. A cow is a digit in the code and in a different place. Each digit counts once, and the place decides which.
  • The round. Four bulls finds the code. Guesses counts the tries. Best is your fewest on this device, and it updates only when a win is shorter. Guesses are unlimited.
  • New code. Hides a new code and clears the list. The old code is discarded. Best stays. The round remains in this browser until you start a new one.

Tips

  • Zero bulls and zero cows rules those four digits out. Leave them out of later guesses.
  • On a mixed reply, move one digit or swap two. The next line shows whether that digit was a bull or a cow.
  • When a digit is certainly in the code, try it in each open place before you add a new one.
  • Keep the earlier rows in view. The latest reply makes sense beside the ones above it.

Playing on a phone or tablet

Tap digits to fill the four places, then tap Guess. Delete removes the last digit. The list of guesses sits beside the keys on a wide screen and under them on a phone, and it scrolls when a round runs long. New code is in the bar above the board.

Frequently asked questions

How do you play bulls and cows?
A four-digit code is hidden, and no digit is repeated. The first digit may be 0. Guess four different digits. Each guess reports bulls and cows. The round ends at four bulls, which means every digit is in the right place. You may take as many guesses as you need.
What do a bull and a cow mean?
A bull is a digit in the code and already in the right place. A cow is a digit in the code sitting in a different place. One digit in your guess produces one of those results, and the place decides which.
How do you narrow a bulls and cows code?
Keep every reply. Zero bulls and zero cows removes all four digits in that guess. On a mixed reply, move one digit to a new place or swap two digits, and let the next reply show whether it was a bull or a cow. Then try a digit you trust in each open place.