Binary puzzle: zeros and ones

No three alike in a line, as many 0s as 1s in each row and column, no two lines the same. Daily puzzles from 6 × 6 to 14 × 14, hints and a solver.

A binary puzzle is a logic grid filled with two symbols, 0 and 1. No more than two equal symbols may sit next to each other in a row or column. Every row and column holds as many 0s as 1s, three of each in a row of six, and no two rows or columns may be identical.

Today's 8 × 8 puzzle

Loading today's puzzle

Symbols and rule marks
Your best times

No puzzle solved without help yet in this browser.

Play a binary puzzle online: fill a grid with 0s and 1s by logic alone. A new puzzle comes every day in each size from 6 × 6 to 14 × 14. More can be made at three levels, and a solver works through grids copied from a book. Each hint names the rule that settles a square.

Three rules, and how the squares are filled

Each puzzle starts as a grid in which some squares already show a 0 or a 1, the printed digits. Every blank takes one of the two symbols, and the rules allow only one way to finish. Each given digit limits what its row and its column can still hold, so the grid is filled by deduction, one settled square at a time, never by guessing.

  1. No three in a row: at most two equal symbols may sit next to each other in a row or a column. A line may read 0 0 1 but never 0 0 0, and diagonals do not count.
  2. As many 0s as 1s: every row and every column holds half its squares of each symbol. A line of six holds three of each, and a line of fourteen holds seven.
  3. No two lines alike: no two rows may be the same, and no two columns. A row may match a column. The game calls this rule 3, and some puzzles in print leave it out.

Because the second rule splits every line in half, the sides are even: an odd side cannot hold equal counts. PeterFrank, the Belgian publisher, also prints odd sizes in which each line holds one extra 1. Its 13 × 13 example has 6 zeros and 7 ones to a line. The game offers even sizes only.

The two symbols need not be digits. Under "Symbols and rule marks" the grid can show 0 and 1, O and X as in noughts and crosses, or two colours. The colours are blue and amber, with a white dot on each given square. "Mark rule breaks as I play", on at the start, outlines a run of three alike, a line with too many of one symbol and two equal full lines.

A tap moves a square from blank to the first symbol, then to the second and back to blank. On a keyboard the arrow keys move between squares, and 0 or O and 1 or X fill one. Backspace or Delete clears a square, and Home and End jump along the row. The digits printed at the start cannot be changed.

How do you solve a binary puzzle?

By deduction: each move fills only a square the rules already settle, and nothing is ever guessed. The game's hints use five kinds of step, easiest first, and every puzzle it makes can be finished with them alone.

  1. Pair: two equal symbols sit side by side, so the squares at both ends take the other symbol, or three would touch.
  2. Gap: one empty square sits between two equal symbols, so it takes the other symbol for the same reason.
  3. Count: a row or column already holds half its squares of one symbol, so completing the row or column means giving each of its empty squares the other.
  4. Whole line: every way to finish a line within the rules puts the same symbol in a square, so that square is settled.
  5. Rule 3: a square is settled by comparing with a finished row or column, because the other symbol would make its line a copy of that one.

Pairs and gaps come from the rule against three in a row, counts from the rule of equal numbers, and the last step from the rule against equal lines. A grid is solved when every square is filled and none of the three rules is broken; the clock stops at that moment.

A 6 × 6 puzzle worked step by step

This easy 6 × 6 puzzle starts with 9 printed digits and 27 empty squares. Rows are numbered from the top and columns from the left.

The 6 × 6 puzzle with its printed digits, columns 1 to 6 across the top
Row123456
10
200
300
400
5
600

The hints take it in this order, each step building on the squares filled before it.

  1. Pair. In row 2 the 0s in columns 1 and 2 form a pair (both printed), so the square in column 3 takes 1.
  2. Pair. In column 2 the 0s in rows 2 and 3 sit together (both given at the start), which puts a 1 in rows 1 and 4 of that column.
  3. Pair. In column 4 the 0s in rows 3 and 4 touch (both there from the start), and rows 2 and 5 of that column must take 1.
  4. Pair. In row 2 the 1s in columns 3 and 4 form a pair (from steps 1 and 3), so the square in column 5 takes 0.
  5. Pair. In column 5 the 0s in rows 1 and 2 sit together (one printed, one from step 4), which puts a 1 in row 3 of that column.

Step 6 is the first gap. In row 3 the 0s in columns 2 and 4 (both there from the start) leave a gap in column 3, which takes 1. Step 12 is the first count. Row 2 already holds three 0s, in columns 1, 2 and 5, so its last blank, in column 6, takes 1.

The hints finish the grid in 23 steps, none of them harder than a count, which is what makes it an easy puzzle. Every row and column of the solution holds three 0s and three 1s, and no two rows or columns match.

The solution of the 6 × 6 example
Row123456
1110100
2001101
3001011
4110010
5100101
6011010

Medium and hard grids, hints and checks

Medium and hard puzzles run out of pairs, gaps and counts before the grid is full. A medium grid then needs the whole-line step: trying every way to finish one row or column and keeping the squares they agree on. A hard grid also needs the last step, where a square follows from comparing a nearly full line with a finished one. Pencil marks and counters for each line are not offered.

"Hint" first looks for mistakes: when a filled square does not match the solution, it marks that square. Otherwise it shows the easiest step that follows, outlines the squares it rests on, highlights the squares it fills, explains the step in a sentence and offers "Fill it in". A gap in the example reads "Row 3: the empty square between two squares holding 0 takes 1, or three in a row would hold 0."

"Check" marks every filled square that does not match the solution for 4 seconds. "Undo" and "Redo" step back and forward. "Start again", tapped twice, clears the filled squares and the clock, though hints and checks already used still count. "Show solution", also tapped twice, fills the grid, and that puzzle then no longer counts for best times.

The Tower of Hanoi on this site works the same way for a different kind of puzzle: one player, and a hint from any position.

Sizes from 6 × 6 to 14 × 14 and the three levels

A line of six squares can be filled with 0s and 1s in 64 ways, but only 14 of them keep the first two rules. A full 6 × 6 grid that keeps all three can be built in 4,140 ways, and the numbers grow fast with the size.

Rows and full grids that keep the rules, by grid size
GridOf each symbol per lineSquaresRows that keep the rulesFull grids
6 × 6336144,140
8 × 8464344,111,116
10 × 1051008448,183,195,384
12 × 1261442084,972,955,852,202,492
14 × 147196518no published count

The On-Line Encyclopedia of Integer Sequences (OEIS) lists the row counts as sequence A177790 and the grid counts as A253316. The reference cases check some of them against the game's own arithmetic. This site recounted the 8 × 8 figure, 4,111,116, by searching every grid. For 14 × 14 no count of full grids has been published.

Every puzzle the game makes has a unique solution, reached without guessing, and its level follows from the hardest step it needs. Easy puzzles need only pairs, gaps and counts, medium ones also the whole-line step, and hard ones the equal-lines step as well. The game takes printed digits away one by one while the level's steps still finish the grid, so none of the remaining digits could be dropped at that level.

Both "Today's puzzle" and "New puzzle" offer every size from 6 × 6 to 14 × 14, and a first visit opens on 8 × 8.

Today's puzzle, new puzzles and best times

"Today's puzzle" gives one grid in each size every day, the same for everyone and in every language, at the medium level. The numbering starts on 2 November 2026, and the day is the visitor's own local date, so a new set starts at local midnight.

"New puzzle" makes as many more as wanted: choose a size and a level, then "Make a puzzle". The puzzle's number travels in the page's link, so a shared link opens the same grid.

Counters under the grid show the time, the empty squares left and the hints and checks used. The clock starts with the first filled square and stops on "Pause", which hides the grid, and whenever the browser tab is hidden. A solved grid shows the time and the help used, and "Copy result" copies a line of text with the link.

Best times are kept for each size and level, and only a solve without a hint, a check or the shown solution counts. Today's results are remembered for 60 days, and a puzzle in progress, with its squares, time and help used, carries on after a reload. There are no accounts and no online rankings.

Solving a grid from a newspaper or book

"Solve a grid" takes a puzzle from paper, with the width and the height chosen separately: any even number of squares from 4 to 16. Published puzzles are not always square, and some run to 16 × 16.

The digits from the page go in with taps, one for 0 and two for 1, and four buttons then work on them.

  • "Next step" shows the easiest step that follows, with "Fill it in", or says "No square follows from the rules alone at this point."
  • "Check the grid" says whether the grid has no solution, which means a typed digit is wrong, or exactly one solution. In that case it adds whether logic alone finishes the grid or trial and error is needed. It also says when there is more than one solution, so the grid needs more clues.
  • "Show solution" fills in the solution, or one of several.
  • "Clear grid", tapped twice, empties the grid.

A checkbox turns rule 3 off for puzzles that leave it out. Simon Tatham's manual for Unruly, part of his Portable Puzzle Collection, describes the same rule as an option that is off by default.

The typed grid is kept in the page's link after the # sign, so the link can be saved or shared. Browsers never send that part of an address to a server.

"Print puzzles" offers two printouts: "Print this puzzle and its answer", or a set of 2, 4 or 6 new puzzles in the current size and level.

The puzzles come first, ready for a pencil, and the answers follow on pages of their own, so the solutions stay out of sight. Colour symbols print as digits.

Other names, the first published puzzles and the maths

In English the puzzle also goes by binary sudoku, although it shares only the grid with sudoku, and makers sell it under their own names. PeterFrank in Belgium says it published its first Binairo in the summer of 2009 in "Belgium's largest newspaper", without naming the paper. Conceptis credits Adolfo Zanellati, an Italian puzzle author, with the idea, under the name Tohu wa Vohu, and says PeterFrank invented a similar puzzle at the same time.

Conceptis sells its version as Tic-Tac-Logic. Takuzu (EU trade mark 011842028) and Binairo (EU trade mark 008217754) are registered trade marks of their owners, according to the European Union Intellectual Property Office. The owners are Réalisations-Conceptions-Idées-Jeux for the first and Peter De Schepper and Frank Coussement for the second. This game is not affiliated with any of these makers.

0h h1 is a small version of the game by the Dutch studio Q42, created by Martin Kool, with red and blue tiles. Its version 1.0 appeared on the App Store on 12 November 2014. Simon Tatham's collection has its own version, contributed by Lennard Sprong, with black and white squares.

Marzio De Biasi proved in 2012 that deciding whether a partly filled grid can be completed is NP-complete. In plain terms, no quick method is known that works for every grid of every size. That says nothing about how hard the puzzles here are: each one is built to be finished by the steps described above.

Frequently asked questions

Can a binary puzzle have more than one solution?

Yes, when its printed digits do not pin down every square. Every puzzle this game makes has exactly one, and the solver's check says when a typed grid has several. Rule 3 can decide it. Putranto Utomo and Ruud Pellikaan of Eindhoven University of Technology give an 8 × 8 example with one solution under all three rules and three without it.

What other names does the puzzle go by?

Binary sudoku is a common description in English, and makers sell the same grid under brand names such as Takuzu. The rules match under every name, though some versions leave out the rule against two equal lines. The section on names above lists the makers and their dates.

Why are three of the same in a row not allowed?

It is part of the puzzle's definition, and it is what gives the first deductions. A pair of 0s settles the squares on either side of it as 1s, and two 0s with a gap settle the square between. Two alike in a row are allowed, and so is 0 1 0 1; only a third equal symbol in a straight line breaks the rule.

May a row be the same as a column?

Yes. Rule 3 compares rows only with rows and columns only with columns, never a row with a column, so a row and a column may read exactly the same. The solver and the game both follow that reading of the rule.

Is there a binary puzzle for kids?

There is no separate version for children: the rules are the same at every size. The smallest grid, 6 × 6, at the easy level needs only the three easiest steps, and a printed set puts the answers on pages of their own.

How can a typed puzzle have no solution?

No grid can keep the rules with the digits as typed: one of them is wrong, or the puzzle leaves out rule 3 while its box is ticked. Unticking the box may then find the solution, since a grid without that rule may have two equal lines. The solver's check reads "This grid has no solution. One of the digits typed must be wrong."

Does the game use binary numbers?

No. The two symbols are never read as a number: they could be any two marks, which is why the game also offers O and X or two colours. Binary numbers are a separate topic. The Department for Education's computing programme of study asks pupils at Key Stage 3 to "understand how numbers can be represented in binary". BBC Bitesize describes binary as "a number system that contains two symbols, 0 and 1".

Do my best times leave this browser?

No. Best times, today's results and the puzzle in progress stay in this browser's local storage, under the key "binary-puzzle", and are never sent anywhere. "Clear my results" deletes them, and another browser or device starts with an empty list.

Checked against known answers

Each case below has an answer fixed by its source or worked by hand from it. The tool computes it on every build, and a page that stops matching is not published.

Sources

The figures and rules on this page were checked against these publications on .

  1. A253316: Number of 2n X 2n Takuzu grids(opens in a new tab)

    The On-Line Encyclopedia of Integer Sequences

  2. 0h h1(opens in a new tab)

    Q42 (Martin Kool)

  3. Binary puzzles as an erasure decoding problem (WIC 2015, corrected version 2016)(opens in a new tab)

    Putranto Utomo and Ruud Pellikaan, Eindhoven University of Technology

  4. EU trade mark 011842028: TAKUZU(opens in a new tab)

    European Union Intellectual Property Office (EUIPO)

  5. EU trade mark 008217754: BINAIRO(opens in a new tab)

    European Union Intellectual Property Office (EUIPO)

  6. grid(opens in a new tab)

    Cambridge Dictionary

Related tools