(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.1' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 182016, 4083]*) (*NotebookOutlinePosition[ 182671, 4106]*) (* CellTagsIndexPosition[ 182627, 4102]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[{ \(Circuit\ model\ of\ classical\ computation\[IndentingNewLine]\), "\ \[IndentingNewLine]", \(\("\<(This notebook needs to input classicgatefigs.nb)\>";\)\), "\ \[IndentingNewLine]", \(\)}], "Input"], Cell[BoxData[ \(Circuit\ classical\ computation\ model\ of\)], "Output"] }, Open ]], Cell[BoxData[ \(\(andgate[bit1_, bit2_] = Which[bit1 \[Equal] 0\ && \ bit2 \[Equal] 0, 0, bit1 \[Equal] 0\ && \ bit2 \[Equal] 1, 0, bit1 \[Equal] 1 && bit2 \[Equal] 0, 0, bit1 \[Equal] 1\ && \ bit2 \[Equal] 1, 1, 1 \[Equal] 1, "\"];\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Show[and[1, 2]]\)\(\[IndentingNewLine]\) \)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -0.214286 0.238095 -0.426738 0.294302 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g 1 Mabswid [ ] 0 setdash .02381 .16187 m .2619 .16187 L s .02381 .45617 m .2619 .45617 L s .2619 .01472 m .7381 .01472 L s .7381 .01472 m .7381 .60332 L s .7381 .60332 m .2619 .60332 L s .2619 .60332 m .2619 .01472 L s gsave .5 .30902 -91.7812 -14.75 Mabsadd m 1 1 Mabs scale currentpoint translate 0 29.5 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 22.500 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 22.500 moveto (&) show 120.562 22.500 moveto 0.000 0.000 rmoveto 1.000 setlinewidth grestore .7381 .30902 m .97619 .30902 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg_ooool00ol@413o0000olc"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {0.894793, 1.44999, \ 0.0146705, 0.0118686}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ \(\("\< Truth table for and gate\>";\)\), "\[IndentingNewLine]", \(\(andtruthtable = Flatten[Table[{x, y, "\<|\>", andgate[x, y]}, {x, 0, 1}, {y, 0, 1}], 1];\)\), "\[IndentingNewLine]", \(TableForm[andtruthtable]\)}], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"0", "0", "\<\"|\"\>", "0"}, {"0", "1", "\<\"|\"\>", "0"}, {"1", "0", "\<\"|\"\>", "0"}, {"1", "1", "\<\"|\"\>", "1"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[BoxData[ \(\(xorgate[bit1_, bit2_] = Which[bit1 \[Equal] 0\ && \ bit2 \[Equal] 0, 0, bit1 \[Equal] 0\ && \ bit2 \[Equal] 1, 1, bit1 \[Equal] 1 && bit2 \[Equal] 0, 1, bit1 \[Equal] 1\ && \ bit2 \[Equal] 1, 0, 1 \[Equal] 1, "\"];\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(xortruthtable = Flatten[Table[{x, y, "\<|\>", xorgate[x, y]}, {x, 0, 1}, {y, 0, 1}], 1];\)\), "\[IndentingNewLine]", \(TableForm[xortruthtable]\)}], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"0", "0", "\<\"|\"\>", "0"}, {"0", "1", "\<\"|\"\>", "1"}, {"1", "0", "\<\"|\"\>", "1"}, {"1", "1", "\<\"|\"\>", "0"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(Show[xor[1, 2]]\)\)\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -0.214286 0.238095 -0.426738 0.294302 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g 1 Mabswid [ ] 0 setdash .02381 .16187 m .2619 .16187 L s .02381 .45617 m .2619 .45617 L s .2619 .01472 m .7381 .01472 L s .7381 .01472 m .7381 .60332 L s .7381 .60332 m .2619 .60332 L s .2619 .60332 m .2619 .01472 L s gsave .5 .30902 -110.969 -15.5312 Mabsadd m 1 1 Mabs scale currentpoint translate 0 31.0625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (XOR) show 158.938 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .7381 .30902 m .97619 .30902 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {0.894793, 1.44999, \ 0.0146705, 0.0118686}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[BoxData[ \(\(orgate[bit1_, bit2_] = Which[bit1 \[Equal] 0\ && \ bit2 \[Equal] 0, 0, bit1 \[Equal] 0\ && \ bit2 \[Equal] 1, 1, bit1 \[Equal] 1 && bit2 \[Equal] 0, 1, bit1 \[Equal] 1\ && \ bit2 \[Equal] 1, 1, 1 \[Equal] 1, "\"];\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ \(\(ortruthtable = Flatten[Table[{x, y, "\<|\>", orgate[x, y]}, {x, 0, 1}, {y, 0, 1}], 1];\)\), "\[IndentingNewLine]", \(TableForm[ortruthtable]\)}], "Input"], Cell[BoxData[ TagBox[GridBox[{ {"0", "0", "\<\"|\"\>", "0"}, {"0", "1", "\<\"|\"\>", "1"}, {"1", "0", "\<\"|\"\>", "1"}, {"1", "1", "\<\"|\"\>", "1"} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], Function[ BoxForm`e$, TableForm[ BoxForm`e$]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[or[1, 2]]\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -0.214286 0.238095 -0.426738 0.294302 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g 1 Mabswid [ ] 0 setdash .02381 .16187 m .2619 .16187 L s .02381 .45617 m .2619 .45617 L s .2619 .01472 m .7381 .01472 L s .7381 .01472 m .7381 .60332 L s .7381 .60332 m .2619 .60332 L s .2619 .60332 m .2619 .01472 L s gsave .5 .30902 -101.375 -15.5312 Mabsadd m 1 1 Mabs scale currentpoint translate 0 31.0625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (OR) show 139.750 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .7381 .30902 m .97619 .30902 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {0.894793, 1.44999, \ 0.0146705, 0.0118686}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\("\";\)\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[halfdraw[]]\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -0.187831 0.21164 -0.132436 0.0981006 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g gsave .02381 .08339 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (y0) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .02381 .18149 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (x0) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore 1 Mabswid [ ] 0 setdash .02381 .06377 m .23545 .06377 L s .02381 .16187 m .23545 .16187 L s .23545 .01472 m .65873 .01472 L s .65873 .01472 m .65873 .21092 L s .65873 .21092 m .23545 .21092 L s .23545 .21092 m .23545 .01472 L s gsave .44709 .11282 -110.969 -15.5312 Mabsadd m 1 1 Mabs scale currentpoint translate 0 31.0625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (XOR) show 158.938 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .65873 .11282 m .87037 .11282 L s .5 Mabswid .07672 .55427 m .12963 .55427 L s .07672 .16187 m .07672 .55427 L s .12963 .06377 m .12963 .45617 L s 1 Mabswid .12963 .45617 m .34127 .45617 L s .12963 .55427 m .34127 .55427 L s .34127 .40712 m .76455 .40712 L s .76455 .40712 m .76455 .60332 L s .76455 .60332 m .34127 .60332 L s .34127 .60332 m .34127 .40712 L s gsave .55291 .50522 -91.7812 -14.75 Mabsadd m 1 1 Mabs scale currentpoint translate 0 29.5 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 22.500 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 22.500 moveto (&) show 120.562 22.500 moveto 0.000 0.000 rmoveto 1.000 setlinewidth grestore .76455 .50522 m .97619 .50522 L s gsave .76455 .06377 -66 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (S) show 69.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .87037 .55427 -66 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (C) show 69.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg_oo ool00ol0003oooooooooo`12ooooo`005_ooool00ol0003oooooooooo`19ooooo`03o`000?oooooo oooo07Kooooo00?o0000ooooooooool0@_ooool001Kooooo00?o0000ooooooooool0BOooool00ol0 003oooooooooo`1fooooo`03o`000?oooooooooo01[ooooo0_l0000Vooooo`005_ooool00ol0003o ooooooooo`19ooooo`03o`000?oooooooooo07Kooooo00?o0000ooooooooool06Oooool01?l0003o ooooooooool0000Uooooo`005_oooom=o`0007Sooooo00?o0000ooooooooool06?ooool00ol0003o ooooooooo`0Wooooo`00H_ooool00ol0003oooooooooo`1fooooo`03o`000?oooooooooo01Sooooo 00?o0000ooooooooool09oooool006;ooooo00?o0000ooooooooool0M_ooool00ol0003ooooooooo o`0Hooooo`03o`000?oooooooooo02Oooooo001Rooooo`03o`000?oooooooooo07Kooooo00?o0000 ooooooooool06Oooool01?l0003oooooooooool0000Uooooo`00H_ooool00ol0003oooooooooo`1f ooooo`03o`000?oooooooooo01[ooooo0ol0000Uooooo`00H_ooool00ol0003oooooooooo`1foooo o`03o`000?oooooooooo04;ooooo001Rooooo`03o`000?oooooooooo07Kooooo00?o0000oooooooo ool0@_ooool006;ooooo00?o0000ooooooooool0M_ooool00ol0003oooooooooo`12ooooo`00H_oo ool00ol0003oooooooooo`1fooooo`03o`000?oooooooooo04;ooooo001Rooooo`03o`000?oooooo oooo07Kooooo00?o0000ooooooooool0@_ooool006;ooooo00?o0000ooooooooool0M_ooool00ol0 003oooooooooo`12ooooo`00H_ooool00ol0003oooooooooo`1fooooo`03o`000?oooooooooo04;o oooo001Rooooo`03o`000?oooooooooo07Kooooo00?o0000ooooooooool0@_ooool006;ooooo00?o 0000ooooooooool0M_ooool00ol0003oooooooooo`12ooooo`00H_oooomjo`0004Cooooo003ooooo ob7ooooo003oooooob7ooooo003oooooob7ooooo003oooooob7ooooo0000\ \>"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {0.881642, 1.34997, \ 0.0165043, 0.0356059}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[BoxData[ \(halfadder[x0_, y0_] := {xorgate[x0, y0], andgate[x0, y0]}\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ \(\("\< Truth table for halfadder\>";\)\), "\[IndentingNewLine]", \(\(halfaddertruthtable = Flatten[Table[{x, y, "\<|\>", halfadder[x, y]}, {x, 0, 1}, {y, 0, 1}], 1];\)\), "\[IndentingNewLine]", \(TableForm[halfaddertruthtable]\)}], "Input"], Cell[BoxData[ InterpretationBox[GridBox[{ {"0", "0", "\<\"|\"\>", GridBox[{ {"0"}, {"0"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"0", "1", "\<\"|\"\>", GridBox[{ {"1"}, {"0"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"1", "0", "\<\"|\"\>", GridBox[{ {"1"}, {"0"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"1", "1", "\<\"|\"\>", GridBox[{ {"0"}, {"1"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], TableForm[ {{0, 0, "|", {0, 0}}, {0, 1, "|", {1, 0}}, {1, 0, "|", {1, 0}}, {1, 1, "|", {0, 1}}}]]], "Output"] }, Open ]], Cell[BoxData[""], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ \(\("\";\)\[IndentingNewLine]\), "\ \[IndentingNewLine]", \(Show[fulldraw[1, 2]]\), "\[IndentingNewLine]", \(\)}], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0793651 -0.279587 0.196201 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g gsave .10317 .15206 -72 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 69.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (c) show 81.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .10317 .34826 -72 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 69.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (y) show 81.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .10317 .54446 -72 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 69.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (x) show 81.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore 1 Mabswid [ ] 0 setdash .10317 .30902 m .18254 .30902 L s .10317 .50522 m .18254 .50522 L s .18254 .21092 m .34127 .21092 L s .34127 .21092 m .34127 .60332 L s .34127 .60332 m .18254 .60332 L s .18254 .60332 m .18254 .21092 L s gsave .2619 .40712 -101.438 -15.2812 Mabsadd m 1 1 Mabs scale currentpoint translate 0 30.5625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (HA) show 139.875 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .34127 .50522 m .42063 .50522 L s .34127 .30902 m .42063 .30902 L s .5 Mabswid .10317 .11282 m .34127 .11282 L s 1 Mabswid .34127 .11282 m .42063 .11282 L s .34127 .30902 m .42063 .30902 L s .42063 .01472 m .57937 .01472 L s .57937 .01472 m .57937 .40712 L s .57937 .40712 m .42063 .40712 L s .42063 .40712 m .42063 .01472 L s gsave .5 .21092 -101.438 -15.2812 Mabsadd m 1 1 Mabs scale currentpoint translate 0 30.5625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (HA) show 139.875 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .57937 .30902 m .65873 .30902 L s .57937 .11282 m .65873 .11282 L s .5 Mabswid .34127 .50522 m .65873 .50522 L s .57937 .11282 m .97619 .11282 L s 1 Mabswid .65873 .30902 m .7381 .30902 L s .65873 .50522 m .7381 .50522 L s .7381 .21092 m .89683 .21092 L s .89683 .21092 m .89683 .60332 L s .89683 .60332 m .7381 .60332 L s .7381 .60332 m .7381 .21092 L s gsave .81746 .40712 -101.375 -15.5312 Mabsadd m 1 1 Mabs scale currentpoint translate 0 31.0625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (OR) show 139.750 24.062 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .89683 .40712 m .97619 .40712 L s gsave .89683 .15206 -84 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def /MISOfy { /newfontname exch def /oldfontname exch def oldfontname findfont dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding MacintoshRomanEncoding def currentdict end newfontname exch definefont pop } def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier %%BeginResource: font Courier-MISO %%BeginFont: Courier-MISO /Courier /Courier-MISO MISOfy %%EndFont %%EndResource %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 69.000 13.000 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (x) show 75.000 13.000 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (\\305) show 81.000 13.000 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (y) show 87.000 13.000 moveto %%IncludeResource: font Mathematica1Mono %%IncludeFont: Mathematica1Mono /Mathematica1Mono findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (\\305) show 93.000 13.000 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (c) show 105.000 13.000 moveto %%IncludeResource: font Courier-MISO %%IncludeFont: Courier-MISO /Courier-MISO findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .97619 .34826 -75 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 69.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (c) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (') show 87.000 13.000 moveto 0.000 0.000 rmoveto 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgooooo`?o00002oooool001cooooo00?o0000ooooooooool05Oooool00ol0003oooooooooo`0[ ooooo`03o`000?oooooooooo01?ooooo00?o0000ooooooooool0:oooool00ol0003oooooooooo`0Z ooooo`03o`000?oooooooooo02_ooooo00?o0000ooooooooool03Oooool01Ol0003ooooooooooooo oooo000000[ooooo000Kooooo`03o`000?oooooo000001Kooooo00?o0000ooooooooool0:oooool0 0ol0003oooooooooo`0Cooooo`03o`000?oooooooooo02_ooooo00?o0000ooooooooool0:_ooool0 0ol0003oooooooooo`0[ooooo`03o`000?oooooooooo00gooooo00?o0000ooooooooool03?ooool0 01_ooooo00?o0000ooooool000005_ooool00ol0003oooooooooo`0[ooooo`03o`000?oooooooooo 01?ooooo00?o0000ooooooooool0:oooool00ol0003oooooooooo`0Zooooo`03o`000?oooooooooo 02_ooooo00?o0000ooooooooool03Oooool01Ol0003ooooooooooooooooo000000[ooooo000Joooo o`;o000000?oooooo`000?l000005Oooool00ol0003oooooooooo`0[ooooo`03o`000?oooooooooo 01?ooooo00?o0000ooooooooool0:oooool00ol0003oooooooooo`0Zooooo`03o`000?oooooooooo 02_ooooo00?o0000ooooooooool03_ooool3o`0000_ooooo000dooooo`03o`000?oooooooooo02_o oooo00?o0000ooooooooool04oooool00ol0003oooooooooo`0[ooooo`03o`000?oooooooooo02[o oooo00?o0000ooooooooool0:oooool00ol0003oooooooooo`0Eooooo`03o`000?oooooooooo00Co oooo000dooooo`03o`000?oooooooooo02_ooooo00?o0000ooooooooool04oooool00ol0003ooooo ooooo`0[ooooo`03o`000?oooooooooo02[ooooo00?o0000ooooooooool0:oooool00ol0003ooooo ooooo`0Eooooo`03o`000?oooooooooo00Cooooo000dooooo`03o`000?oooooooooo02_ooooo00?o 0000ooooooooool04oooool00ol0003oooooooooo`0[ooooo`03o`000?oooooooooo02[ooooo00?o 0000ooooooooool0:oooool00ol0003oooooooooo`0Looooo`00=?ooool00ol0003oooooooooo`0[ ooooo`03o`000?oooooooooo01?ooooo00?o0000ooooooooool0:oooool00ol0003oooooooooo`0Z ooooo`03o`000?oooooooooo02_ooooo00?o0000ooooooooool07?ooool003Cooooo00?o0000oooo ooooool0:oooool00ol0003oooooooooo`0Cooooo`03o`000?oooooooooo02_ooooo00?o0000oooo ooooool0:_ooool00ol0003oooooooooo`0[ooooo`03o`000?oooooooooo01cooooo000dooooo`03 o`000?oooooooooo02_ooooo00?o0000ooooooooool04oooool00ol0003oooooooooo`0[ooooo`03 o`000?oooooooooo02[ooooo00?o0000ooooooooool0:oooool00ol0003oooooooooo`0Looooo`00 =?ooool00ol0003oooooooooo`0[ooooo`03o`000?oooooooooo01?ooooo00?o0000ooooooooool0 :oooool00ol0003oooooooooo`0Zooooo`03o`000?oooooooooo02_ooooo00?o0000ooooooooool0 7?ooool003Cooooo00?o0000ooooooooool00_ooool00olQ8B7o0000o`000003o`000004ob4Q8Ooo oooooooooc8b"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-0.315626, 1.42499, \ 0.0440113, 0.017803}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(\(fulladder[x_, y_, c_] := Module[{carry1}, carry1 = \(halfadder[x, y]\)[\([2]\)]; ybit1 = \(halfadder[x, y]\)[\([1]\)]; ybit2 = \(halfadder[ybit1, c]\)[\([2]\)]; sumbit = \(halfadder[ybit1, c]\)[\([1]\)]; carrybit = orgate[carry1, ybit2]; {sumbit, carrybit}]\)\(\[IndentingNewLine]\) \)\)\)], "Input"], Cell[BoxData[ \(\("\";\)\)], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\("\"\ \[IndentingNewLine]\[IndentingNewLine] TableForm[ Flatten[Table[{x, y, c, fulladder[x, y, c]}, {x, 0, 1}, {y, 0, 1}, {c, 0, 1}], 2]]\[IndentingNewLine]\[IndentingNewLine] \)\)\)], "Input"], Cell[BoxData[ \("x y c sum/carry"\)], "Output"], Cell[BoxData[ InterpretationBox[GridBox[{ {"0", "0", "0", GridBox[{ {"0"}, {"0"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"0", "0", "1", GridBox[{ {"1"}, {"0"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"0", "1", "0", GridBox[{ {"1"}, {"0"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"0", "1", "1", GridBox[{ {"0"}, {"1"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"1", "0", "0", GridBox[{ {"1"}, {"0"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"1", "0", "1", GridBox[{ {"0"}, {"1"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"1", "1", "0", GridBox[{ {"0"}, {"1"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]}, {"1", "1", "1", GridBox[{ {"1"}, {"1"} }, RowSpacings->0.25, ColumnSpacings->1, RowAlignments->Baseline, ColumnAlignments->{Left}]} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}], TableForm[ {{0, 0, 0, {0, 0}}, {0, 0, 1, {1, 0}}, {0, 1, 0, {1, 0}}, {0, 1, 1, {0, 1}}, {1, 0, 0, {1, 0}}, {1, 0, 1, {0, 1}}, {1, 1, 0, {0, 1}}, {1, 1, 1, {1, 1}}}]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[full[1, 1]]\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -0.214286 0.238095 -0.132436 0.294302 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g 1 Mabswid [ ] 0 setdash .02381 .08829 m .2619 .08829 L s .02381 .52974 m .2619 .52974 L s .02381 .30902 m .2619 .30902 L s .2619 .01472 m .7381 .01472 L s .7381 .01472 m .7381 .60332 L s .7381 .60332 m .2619 .60332 L s .2619 .60332 m .2619 .01472 L s gsave .5 .30902 -101.438 -15.2812 Mabsadd m 1 1 Mabs scale currentpoint translate 0 30.5625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (FA) show 139.875 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .7381 .45617 m .97619 .45617 L s .7381 .16187 m .97619 .16187 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg?ooool00ol0003oooooooooo`1:ooooo`00Boooool00ol0003o ooooooooo`0_ooooo`03ob4Q8Ol0003o000000go00001Oooool00olb"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {0.894793, 0.44999, \ 0.0146705, 0.0118686}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[fourbitdraw]\)], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0680272 0.0147151 0.0941766 [ [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath 0 g 1 Mabswid [ ] 0 setdash .09184 .10889 m .15986 .10889 L s .09184 .20307 m .15986 .20307 L s .15986 .0618 m .29592 .0618 L s .29592 .0618 m .29592 .25016 L s .29592 .25016 m .15986 .25016 L s .15986 .25016 m .15986 .0618 L s gsave .22789 .15598 -101.438 -15.2812 Mabsadd m 1 1 Mabs scale currentpoint translate 0 30.5625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (HA) show 139.875 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .29592 .20307 m .36395 .20307 L s .29592 .10889 m .36395 .10889 L s .5 Mabswid .09184 .2737 m .29592 .2737 L s .09184 .34433 m .29592 .34433 L s .09184 .39142 m .5 .39142 L s .09184 .46205 m .5 .46205 L s .09184 .50914 m .77211 .50914 L s .09184 .57977 m .77211 .57977 L s 1 Mabswid .29592 .20307 m .36395 .20307 L s .29592 .34433 m .36395 .34433 L s .29592 .2737 m .36395 .2737 L s .36395 .17952 m .5 .17952 L s .5 .17952 m .5 .36788 L s .5 .36788 m .36395 .36788 L s .36395 .36788 m .36395 .17952 L s gsave .43197 .2737 -101.438 -15.2812 Mabsadd m 1 1 Mabs scale currentpoint translate 0 30.5625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (FA) show 139.875 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .5 .32079 m .56803 .32079 L s .5 .22661 m .56803 .22661 L s .5 .32079 m .56803 .32079 L s .5 .46205 m .56803 .46205 L s .5 .39142 m .56803 .39142 L s .56803 .29724 m .70408 .29724 L s .70408 .29724 m .70408 .4856 L s .70408 .4856 m .56803 .4856 L s .56803 .4856 m .56803 .29724 L s gsave .63605 .39142 -101.438 -15.2812 Mabsadd m 1 1 Mabs scale currentpoint translate 0 30.5625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (FA) show 139.875 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .70408 .43851 m .77211 .43851 L s .70408 .34433 m .77211 .34433 L s .70408 .43851 m .77211 .43851 L s .70408 .57977 m .77211 .57977 L s .70408 .50914 m .77211 .50914 L s .77211 .41497 m .90816 .41497 L s .90816 .41497 m .90816 .60332 L s .90816 .60332 m .77211 .60332 L s .77211 .60332 m .77211 .41497 L s gsave .84014 .50914 -101.438 -15.2812 Mabsadd m 1 1 Mabs scale currentpoint translate 0 30.5625 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 82.188 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (FA) show 139.875 23.562 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 32.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .90816 .55623 m .97619 .55623 L s .90816 .46205 m .97619 .46205 L s gsave .09184 .08535 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (y0) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .09184 .17952 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (x0) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .09184 .25016 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (y1) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .09184 .32079 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (x1) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .09184 .36788 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (y2) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .09184 .43851 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (x2) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .09184 .4856 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (y3) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore gsave .09184 .55623 -69 -10 Mabsadd m 1 1 Mabs scale currentpoint translate 0 20 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (x3) show 75.000 13.000 moveto %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHgooooo`006oooool0 1?l0003oooooooooool0000?ooooo`03o`000?lQ8B7o000000Co000000Coooooo`00;_ooool00ol0003o ooooooooo`0Tooooo`03o`000?oooooooooo013ooooo00?o0000ooooooooool09?ooool00ol0003o ooooooooo`2>ooooo`00;_ooool00ol0003oooooooooo`0Tooooo`03o`000?oooooooooo013ooooo 00?o0000ooooooooool09?ooool00ol0003oooooooooo`2>ooooo`00;_ooool00ol0003ooooooooo o`0Tooooo`03o`000?oooooooooo013ooooo00?o0000ooooooooool09?ooool00ol0003ooooooooo o`2>ooooo`00;_ooool00ol0003oooooooooo`0Tooooo`03o`000?oooooooooo013ooooo00?o0000 ooooooooool09?ooool00ol0003oooooooooo`2>ooooo`00;_ooool00ol0003oooooooooo`0Toooo o`03o`000?oooooooooo013ooooo00?o0000ooooooooool09?ooool00ol0003oooooooooo`2>oooo o`00;_ooool00ol0003oooooooooo`0Tooooo`03o`000?oooooooooo013ooooo00?o0000oooooooo ool09?oooolDo`0007gooooo000^ooooo`03o`000?oooooooooo02Cooooo00?o0000ooooooooool0 4?ooool00ol0003oooooooooo`0Tooooo`03o`000?oooooooooo08kooooo000^ooooo`03o`000?oo oooooooo02Cooooo00?o0000ooooooooool04?ooool00ol0003oooooooooo`0Tooooo`03o`000?oo oooooooo08kooooo000Dooooo`?o00005oooool00ol0003oooooooooo`0Tooooo`03o`000?oooooo oooo013ooooo00?o0000ooooooooool09?ooool00ol0003oooooooooo`2>ooooo`005Oooool00ol0 003oooooooooo`0Fooooo`03o`000?oooooooooo02Cooooo00?o0000ooooooooool04?ooool00ol0 003oooooooooo`0Tooooo`03o`000?oooooooooo08kooooo000Fooooo`03o`000?oooooooooo00;o oooo0ol0000@ooooo`03o`000?oooooooooo02Cooooo00?o0000ooooooooool04?ooool00ol0003o ooooooooo`0Tooooo`03o`000?oooooooooo08kooooo000Fooooo`03o`000?oooooooooo00?ooooo 00?o0000ooooooooool03oooool00ol0003oooooooooo`0Tooooo`03o`000?oooooooooo013ooooo 00?o0000ooooooooool09?ooool00ol0003oooooooooo`2>ooooo`005Oooool00ol0003oooooo`00 0004ooooo`03o`000?oooooooooo00oooooo:?l0000Booooo`03o`000?lQ8B7o000000Oo000000?o ooooo`006oooool2o`0004_ooooo00Co0000oooooooooooo oooo0_l0000?ooooo`03oeEEEOl0003oIVIV00Wooooo00?oV9RHo`000?lbooooo`007?ooool00ol0003oooooooooo`19ooooo`04o`000?ooooooooooooooo`;o 00003oooool00onYZJWo0000oa0@4009ooooo`03ob4Q8Ol0003oV9RH00?ooooo00?o0000oooooooo ool0S_ooool006Sooooo00Co0000oooooooooooooooo0_l0000@ooooo`;o000000?ocoooo o`00J?ooool01?l0003oooooooooooooool8o`0000cooooo00?o410@o`000?nYZJT00oooool00onH V9So0000oc8booooo`00J?ooool01?l0003oooooooooooooool2o`0000Wooooo0_l00008oooo o`07ob4Q8Ol0003oZJVYoooooomVIVKo0000oeEEE@07ooooo`03o`000?oooooooooo013ooooo:?l0 001Fooooo`00J?ooool01?l0003oooooooooooooool2o`0000Wooooo0_l00008ooooo`07ohN7Qol0 003oEEEEooooool@413o0000olco`0000Gooooo00?o"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-0.368231, -0.156283, \ 0.0513466, 0.0370895}}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[BoxData[ \(fourbitadder[xfourbitstring_, yfourbitstring_] := Module[{x0, x1, x2, x3, y0, y1, y2, y3}, x0 = xfourbitstring[\([4]\)]; x1 = xfourbitstring[\([3]\)]; x2 = xfourbitstring[\([2]\)]; x3 = xfourbitstring[\([1]\)]; y0 = yfourbitstring[\([4]\)]; y1 = yfourbitstring[\([3]\)]; y2 = yfourbitstring[\([2]\)]; y3 = yfourbitstring[\([1]\)]; carry0 = \(halfadder[x0, y0]\)[\([2]\)]; sum0 = \(halfadder[x0, y0]\)[\([1]\)]; carry1 = \(fulladder[x1, y1, carry0]\)[\([2]\)]; sum1 = \(fulladder[x1, y1, carry0]\)[\([1]\)]; carry2 = \(fulladder[x2, y2, carry1]\)[\([2]\)]; sum2 = \(fulladder[x2, y2, carry1]\)[\([1]\)]; \[IndentingNewLine]carry3 = \(fulladder[x3, y3, carry2]\)[\([2]\)]; sum3 = \(fulladder[x3, y3, carry2]\)[\([1]\)]; {carry3, sum3, sum2, sum1, sum0}]\)], "Input"], Cell[BoxData[{ \(\(registerx = {1, 1, 0, 0};\)\), "\[IndentingNewLine]", \(\(registery = {0, 1, 1, 1};\)\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(fourbitadder[registerx, registery]\)], "Input"], Cell[BoxData[ \({1, 0, 0, 1, 1}\)], "Output"] }, Open ]], Cell[BoxData[{ \(\(registerx = {1, 0, 0, 1};\)\), "\[IndentingNewLine]", \(\(registery = {0, 1, 1, 1};\)\)}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ \(fourbitadder[registerx, registery]\)], "Input"], Cell[BoxData[ \({1, 0, 0, 0, 0}\)], "Output"] }, Open ]], Cell[BoxData[{ \(We\ can\ think\ of\ the\ addition\ of\ the\ two\ strings\ of\ four\ bit\ \ registers\), "\[IndentingNewLine]", \(as\ a\ mapping, or\ function\[IndentingNewLine]\), "\[IndentingNewLine]", \(f : \(\({0, 1}\ \ \ [x3, y3, x2, y2, x1, y1, x0, y0]\)\(\ \)\(\[RightArrow]\)\([z4, z3, z2, z1, z0]\)\(\ \ \)\)\)}], "Input"], Cell[BoxData[{ \(Evaluation\ of\ this\ function\ is\ called\ a\ computation . \ We\ constructed\ a\ gate\), "\[IndentingNewLine]", \(that\ evaluates\ this\ function\ through\ a\ combination\ of\ \ fundamental, \ Boolean\ gates\ that\ map\ two\ bits\ into\ one . \ The\ circuit\ model\ of\ computation\), "\[IndentingNewLine]", \(holds\ that\ all\ classical\ computations\ can\ be\ analyzed\ in\ terms\ \ of\ a\ few\ basic\), "\[IndentingNewLine]", \(Boolean\ \(\(gates\)\(.\)\)\)}], "Input"] }, FrontEndVersion->"5.1 for Macintosh", ScreenRectangle->{{0, 1024}, {0, 719}}, WindowSize->{776, 617}, WindowMargins->{{69, Automatic}, {Automatic, 24}}, Magnification->1 ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 229, 5, 75, "Input"], Cell[2008, 60, 76, 1, 27, "Output"] }, Open ]], Cell[2099, 64, 334, 6, 43, "Input"], Cell[CellGroupData[{ Cell[2458, 74, 84, 2, 43, "Input"], Cell[2545, 78, 13901, 251, 186, 1847, 98, "GraphicsData", "PostScript", \ "Graphics"], Cell[16449, 331, 130, 3, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[16616, 339, 275, 5, 59, "Input"], Cell[16894, 346, 399, 12, 85, "Output"] }, Open ]], Cell[17308, 361, 334, 6, 43, "Input"], Cell[CellGroupData[{ Cell[17667, 371, 205, 4, 43, "Input"], Cell[17875, 377, 399, 12, 85, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[18311, 394, 79, 1, 43, "Input"], Cell[18393, 397, 16345, 288, 186, 2160, 108, "GraphicsData", "PostScript", \ "Graphics"], Cell[34741, 687, 130, 3, 27, "Output"] }, Open ]], Cell[34886, 693, 333, 6, 43, "Input"], Cell[CellGroupData[{ Cell[35244, 703, 202, 4, 43, "Input"], Cell[35449, 709, 399, 12, 85, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[35885, 726, 47, 1, 27, "Input"], Cell[35935, 729, 15133, 273, 186, 2159, 108, "GraphicsData", "PostScript", \ "Graphics"], Cell[51071, 1004, 130, 3, 27, "Output"] }, Open ]], Cell[51216, 1010, 187, 4, 75, "Input"], Cell[CellGroupData[{ Cell[51428, 1018, 49, 1, 27, "Input"], Cell[51480, 1021, 27801, 610, 186, 8708, 370, "GraphicsData", "PostScript", \ "Graphics"], Cell[79284, 1633, 130, 3, 27, "Output"] }, Open ]], Cell[79429, 1639, 90, 1, 27, "Input"], Cell[CellGroupData[{ Cell[79544, 1644, 294, 5, 75, "Input"], Cell[79841, 1651, 1321, 40, 133, "Output"] }, Open ]], Cell[81177, 1694, 26, 0, 27, "Input"], Cell[CellGroupData[{ Cell[81228, 1698, 189, 4, 75, "Input"], Cell[81420, 1704, 40045, 891, 186, 13293, 556, "GraphicsData", "PostScript", \ "Graphics"], Cell[121468, 2597, 130, 3, 27, "Output"] }, Open ]], Cell[121613, 2603, 407, 8, 91, "Input"], Cell[122023, 2613, 91, 1, 27, "Input"], Cell[CellGroupData[{ Cell[122139, 2618, 298, 6, 107, "Input"], Cell[122440, 2626, 64, 1, 27, "Output"], Cell[122507, 2629, 2354, 73, 245, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[124898, 2707, 49, 1, 27, "Input"], Cell[124950, 2710, 14854, 274, 186, 2225, 114, "GraphicsData", "PostScript", \ "Graphics"], Cell[139807, 2986, 130, 3, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[139974, 2994, 50, 1, 27, "Input"], Cell[140027, 2997, 39423, 1014, 186, 17577, 740, "GraphicsData", \ "PostScript", "Graphics"], Cell[179453, 4013, 130, 3, 27, "Output"] }, Open ]], Cell[179598, 4019, 931, 16, 155, "Input"], Cell[180532, 4037, 127, 2, 43, "Input"], Cell[CellGroupData[{ Cell[180684, 4043, 67, 1, 27, "Input"], Cell[180754, 4046, 49, 1, 27, "Output"] }, Open ]], Cell[180818, 4050, 127, 2, 43, "Input"], Cell[CellGroupData[{ Cell[180970, 4056, 67, 1, 27, "Input"], Cell[181040, 4059, 49, 1, 27, "Output"] }, Open ]], Cell[181104, 4063, 372, 7, 75, "Input"], Cell[181479, 4072, 533, 9, 91, "Input"] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)