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.
- Built and source-checked by Muhammad Abdullah Awais
- Last checked
- 17 sources
- Methodology
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.
- 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.
- 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.
- 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.
- Pair: two equal symbols sit side by side, so the squares at both ends take the other symbol, or three would touch.
- Gap: one empty square sits between two equal symbols, so it takes the other symbol for the same reason.
- 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.
- Whole line: every way to finish a line within the rules puts the same symbol in a square, so that square is settled.
- 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.
| Row | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| 1 | 0 | |||||
| 2 | 0 | 0 | ||||
| 3 | 0 | 0 | ||||
| 4 | 0 | 0 | ||||
| 5 | ||||||
| 6 | 0 | 0 |
The hints take it in this order, each step building on the squares filled before it.
- Pair. In row 2 the 0s in columns 1 and 2 form a pair (both printed), so the square in column 3 takes 1.
- 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.
- 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.
- 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.
- 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.
| Row | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 0 | 1 | 0 | 0 |
| 2 | 0 | 0 | 1 | 1 | 0 | 1 |
| 3 | 0 | 0 | 1 | 0 | 1 | 1 |
| 4 | 1 | 1 | 0 | 0 | 1 | 0 |
| 5 | 1 | 0 | 0 | 1 | 0 | 1 |
| 6 | 0 | 1 | 1 | 0 | 1 | 0 |
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.
| Grid | Of each symbol per line | Squares | Rows that keep the rules | Full grids |
|---|---|---|---|---|
| 6 × 6 | 3 | 36 | 14 | 4,140 |
| 8 × 8 | 4 | 64 | 34 | 4,111,116 |
| 10 × 10 | 5 | 100 | 84 | 48,183,195,384 |
| 12 × 12 | 6 | 144 | 208 | 4,972,955,852,202,492 |
| 14 × 14 | 7 | 196 | 518 | no 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.
Printable puzzles with their answers
"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.
Rows of six squares that keep the rules on their own (OEIS A177790)
- Expected
- 14
- This tool
- 14
Official figure: A177790: Number of paths from (0,0) to (n,n) avoiding 3 or more consecutive east steps and 3 or more consecutive north steps(opens in a new tab)Open this case
Rows of fourteen squares that keep the rules on their own (OEIS A177790)
- Expected
- 518
- This tool
- 518
Official figure: A177790: Number of paths from (0,0) to (n,n) avoiding 3 or more consecutive east steps and 3 or more consecutive north steps(opens in a new tab)Open this case
Full 8 × 8 grids that keep all three rules (OEIS A253316)
- Expected
- 4,111,116
- This tool
- 4,111,116
Official figure: A253316: Number of 2n X 2n Takuzu grids(opens in a new tab)Open this case
Full 10 × 10 grids that keep all three rules (OEIS A253316)
- Expected
- 48,183,195,384
- This tool
- 48,183,195,384
Official figure: A253316: Number of 2n X 2n Takuzu grids(opens in a new tab)Open this case
Sources
The figures and rules on this page were checked against these publications on .
- A253316: Number of 2n X 2n Takuzu grids(opens in a new tab)
The On-Line Encyclopedia of Integer Sequences
- A177790: Number of paths from (0,0) to (n,n) avoiding 3 or more consecutive east steps and 3 or more consecutive north steps(opens in a new tab)
The On-Line Encyclopedia of Integer Sequences
- Solving a Binary Puzzle (Mathematics in Computer Science, 2017)(opens in a new tab)
Putranto H. Utomo and Rusydi H. Makarim, Springer
- Even and Odd Binairo(opens in a new tab)
PeterFrank (Belgium)
- Tic-Tac-Logic: history(opens in a new tab)
Conceptis Ltd.
- Tic-Tac-Logic: techniques(opens in a new tab)
Conceptis Ltd.
- 0h h1(opens in a new tab)
Q42 (Martin Kool)
- 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
- EU trade mark 011842028: TAKUZU(opens in a new tab)
European Union Intellectual Property Office (EUIPO)
- EU trade mark 008217754: BINAIRO(opens in a new tab)
European Union Intellectual Property Office (EUIPO)
- Tic-Tac-Logic: rules(opens in a new tab)
Conceptis Ltd.
- National curriculum in England: computing programmes of study(opens in a new tab)
Department for Education (GOV.UK)
- grid(opens in a new tab)
Cambridge Dictionary
Related tools
- Click speed testCount how fast you click with a mouse, a touch screen or the keyboard over 1 to 100 seconds, with the gaps between presses and a sourced rating.
- Colour memory gameA colour shows for a few seconds, then hides. Rebuild it from memory with hue, saturation and brightness sliders, for up to 10 points a colour.
- Dots and boxesDraw lines, close boxes and play again: dots and boxes against a computer at three levels or a friend on one phone, on boards from 2 by 2 to 8 by 8 boxes.
- Flag quizA country flag quiz with all 195 UN states: pick from 4 names, type the country or find its flag, by region, alone or with up to 4 players.
- Tower of Hanoi gameThe fewest moves are 2^n - 1: 7 for 3 discs, 31 for 5, 1,023 for 10. Play 3 to 10 discs with hints, a solver and the move list.
- Who am I? The forehead guessing gameThe forehead guessing game on one phone: 10 British decks, tilt or tap to score, a round timer, teams, your own words and printable cards.