Puzzle 88 of 100

A half subtractor

Goal

Subtract B from A: make Y high while A and B differ, and BO high while A is low and B is high. The drawing is a half adder, so BO is wrong.

Die
39 by 23 squares
Layers
Metal, Polysilicon, Contact, N active, P active, N well, Metal 2, Via
Inputs
A, B
Outputs
Y, BO
Supply
VDD
Ground
GND

Go to the solution

New in this puzzle

Borrowing

Subtracting one bit from another gives a difference and a borrow. The difference is the exclusive OR, the same as a sum. The borrow is high while A is low and B is high, because the next bit up must lend one.

Hint

The borrow is high only while A is low and B is high. The NOR of A and B is already drawn, and a NOR gate of A and that output gives the borrow. Remove the metal that joins the carry to BO.

Solution

This is the game's reference drawing for the puzzle. It meets the goal and passes the design rules. Other drawings can pass as well.

Top View of the solved die for puzzle 88, A half subtractor, with the Side View below it.
Top View of the solved die, captured from the game. Paths that carry a high level at the moment shown are lit. The Side View below cuts through the row between the dashed lines.
The game window in Isometric View with the solved die for puzzle 88, A half subtractor, the guide, and the scope.
The whole game window in Isometric View. The scope on the right compares each output with its target band, and the message above it confirms that the drawing passes.
Solution drawing for puzzle 88, A half subtractor, drawn on a numbered grid with every layer in its game color and pattern.
The solution on the grid. Squares are numbered from the top left corner, so you can count them. The dashed outline marks the squares you draw, change, or erase; the rest is drawn when the puzzle opens.

Legend

  • Metal289 squares
  • Polysilicon87 squares
  • Contact64 squares
  • N active36 squares
  • P active72 squares
  • N well195 squares
  • Metal 2183 squares
  • Via34 squares
  • Input padA, B
  • Output padY, BO
  • Supply padVDD
  • Ground padGND
  • Squares you draw, change, or erase93 squares

About the drawing

  • The drawing uses 549 of the die's 897 squares.
  • Part of the drawing is in place when the puzzle opens. To finish it, paint 58 empty squares, change 30 drawn squares, and erase 5 squares.
  • It forms 18 transistors: 9 N transistors and 9 P transistors. Each one is a place where polysilicon crosses active silicon.
  • 64 contacts join metal to the polysilicon or active silicon under it.
  • 34 vias join metal 2 to the metal under it.
Starting drawing for puzzle 88, A half subtractor, on a numbered grid.
The drawing when the puzzle opens. The dashed outline marks the squares the solution changes.