(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 12.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 9198, 241] NotebookOptionsPosition[ 8064, 208] NotebookOutlinePosition[ 8443, 224] CellTagsIndexPosition[ 8400, 221] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Basic Examples", "Subsection", CellID->285421464], Cell["Binary-coded ternary for 9:", "Text", CellChangeTimes->{{3.744762408244501*^9, 3.7447624216516123`*^9}}, CellID->1858558449], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"BinaryCodedTernary\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"BinaryCodedTernary\""}], ResourceFunction["BinaryCodedTernary"], BoxID -> "BinaryCodedTernary"], "[", "9", "]"}]], "Input", CellChangeTimes->{{3.7447623959250603`*^9, 3.744762416039283*^9}}, CellLabel->"In[60]:=", CellID->1642206728], Cell[BoxData[ RowBox[{"{", RowBox[{"0", ",", "1", ",", "0", ",", "1", ",", "1", ",", "1"}], "}"}]], "Output", CellChangeTimes->{{3.744762400134698*^9, 3.7447624165770817`*^9}}, CellLabel->"Out[60]=", CellID->1108646252] }, Open ]], Cell["Binary-coded ternary for numbers up to 30:", "Text", CellChangeTimes->{{3.7447624941009493`*^9, 3.744762501780683*^9}}, CellID->1449435992], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ArrayPlot", "[", RowBox[{ RowBox[{"PadLeft", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{ InterpretationBox[ TagBox[ StyleBox[ StyleBox[ FrameBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->Rational[10, 13] Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ StyleBox["\<\"BinaryCodedTernary\"\>", "ResourceFunctionLabel"], ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited]} }]], "ResourceFunctionFrame"], FrameBoxOptions->{Background->GrayLevel[0.5, 0.15], BaseStyle->{ "StandardForm", LineSpacing -> {0, 0}, LineBreakWithin -> False}, FrameMargins->{{3, 3}, {0, 0}}, FrameStyle->Directive[ GrayLevel[0.5, 0.35], AbsoluteThickness[0.5]], RoundingRadius->4}, GridBoxOptions->{FrameStyle->GrayLevel[1, 0], GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Automatic}}}, GridBoxFrame->{"Columns" -> {{True}}, "Rows" -> {{True}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{ "Columns" -> {{0.25}}, "Rows" -> {-0.1, {}, 0}}}], {"FunctionResourceBox", RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "\"BinaryCodedTernary\""}], ResourceFunction["BinaryCodedTernary"], BoxID -> "BinaryCodedTernary"], "[", "n", "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "30"}], "}"}]}], "]"}], "]"}], ",", RowBox[{"Mesh", "\[Rule]", "True"}]}], "]"}]], "Input", CellChangeTimes->{{3.744762431281258*^9, 3.744762470905525*^9}}, CellLabel->"In[62]:=", CellID->1763709623], Cell[BoxData[ GraphicsBox[{ RasterBox[{{1, 0, 0, 1, 1, 0, 0, 0}, {1, 0, 0, 1, 1, 1, 0, 0}, {1, 0, 1, 0, 0, 1, 0, 0}, {1, 0, 1, 0, 1, 0, 0, 0}, {1, 0, 1, 0, 1, 1, 0, 0}, {1, 0, 1, 1, 0, 1, 0, 0}, {1, 0, 1, 1, 1, 0, 0, 0}, {1, 0, 1, 1, 1, 1, 0, 0}, {1, 1, 0, 1, 0, 1, 0, 0}, {1, 1, 0, 1, 1, 0, 0, 0}, {1, 1, 0, 1, 1, 1, 0, 0}, {1, 1, 1, 0, 0, 1, 0, 0}, {1, 1, 1, 0, 1, 0, 0, 0}, {1, 1, 1, 0, 1, 1, 0, 0}, {1, 1, 1, 1, 0, 1, 0, 0}, {1, 1, 1, 1, 1, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 0, 0}, {1, 1, 0, 1, 0, 1, 0, 0}, {1, 1, 0, 1, 1, 0, 0, 0}, {1, 1, 0, 1, 1, 1, 0, 0}, {1, 1, 1, 0, 0, 1, 0, 0}, {1, 1, 1, 0, 1, 0, 0, 0}, {1, 1, 1, 0, 1, 1, 0, 0}, {1, 1, 1, 1, 0, 1, 0, 0}, {1, 1, 1, 1, 1, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 0, 0}, {1, 1, 1, 1, 0, 1, 0, 0}, {1, 1, 1, 1, 1, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 0, 0}, {1, 1, 1, 1, 1, 1, 0, 0}}, {{0, 0}, {8, 30}}, {0, 1}], { {GrayLevel[ NCache[-1 + GoldenRatio, 0.6180339887498949]], StyleBox[ LineBox[{{{0, 30}, {8, 30}}, {{0, 29}, {8, 29}}, {{0, 28}, {8, 28}}, {{ 0, 27}, {8, 27}}, {{0, 26}, {8, 26}}, {{0, 25}, {8, 25}}, {{0, 24}, {8, 24}}, {{0, 23}, {8, 23}}, {{0, 22}, {8, 22}}, {{0, 21}, {8, 21}}, {{0, 20}, {8, 20}}, {{0, 19}, {8, 19}}, {{0, 18}, {8, 18}}, {{0, 17}, {8, 17}}, {{0, 16}, {8, 16}}, {{0, 15}, {8, 15}}, {{0, 14}, {8, 14}}, {{0, 13}, {8, 13}}, {{0, 12}, {8, 12}}, {{0, 11}, {8, 11}}, {{0, 10}, {8, 10}}, {{0, 9}, {8, 9}}, {{0, 8}, {8, 8}}, {{0, 7}, {8, 7}}, {{0, 6}, { 8, 6}}, {{0, 5}, {8, 5}}, {{0, 4}, {8, 4}}, {{0, 3}, {8, 3}}, {{0, 2}, {8, 2}}, {{0, 1}, {8, 1}}, {{0, 0}, {8, 0}}}], Antialiasing->False]}, {GrayLevel[ NCache[-1 + GoldenRatio, 0.6180339887498949]], StyleBox[ LineBox[{{{0, 0}, {0, 30}}, {{1, 0}, {1, 30}}, {{2, 0}, {2, 30}}, {{3, 0}, {3, 30}}, {{4, 0}, {4, 30}}, {{5, 0}, {5, 30}}, {{6, 0}, {6, 30}}, {{7, 0}, {7, 30}}, {{8, 0}, {8, 30}}}], Antialiasing->False]}}}, Frame->False, FrameLabel->{None, None}, FrameTicks->{{None, None}, {None, None}}, GridLinesStyle->Directive[ GrayLevel[0.5, 0.4]], ImageSize->{79.93772331244503, Automatic}, Method->{ "DefaultBoundaryStyle" -> Automatic, "DefaultPlotStyle" -> Automatic}]], "Output", CellChangeTimes->{{3.744762456381722*^9, 3.744762471321851*^9}}, CellLabel->"Out[62]=", CellID->950854220] }, Open ]] }, Open ]] }, WindowSize->{808, 855}, WindowMargins->{{436, Automatic}, {Automatic, 50}}, FrontEndVersion->"12.0 for Mac OS X x86 (64-bit) (April 8, 2019)", StyleDefinitions->"Default.nb", $CellContext`ClosingSaveDialog -> False ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 56, 1, 70, "Subsection",ExpressionUUID->"42401fd4-b218-4ce5-903b-59db0cda2026", CellID->285421464], Cell[639, 25, 132, 2, 70, "Text",ExpressionUUID->"3372f96f-405b-4020-847e-c3077a40c44f", CellID->1858558449], Cell[CellGroupData[{ Cell[796, 31, 1906, 46, 70, "Input",ExpressionUUID->"1fa79bc1-077e-4b92-a202-dba0d9d401d9", CellID->1642206728], Cell[2705, 79, 229, 6, 70, "Output",ExpressionUUID->"752ff80a-64e9-4e7c-80dc-4274e6a2e0c9", CellID->1108646252] }, Open ]], Cell[2949, 88, 147, 2, 70, "Text",ExpressionUUID->"7f80e21e-2d84-4136-b6bb-8a40aad5d55b", CellID->1449435992], Cell[CellGroupData[{ Cell[3121, 94, 2487, 63, 70, "Input",ExpressionUUID->"cc9dabcc-bc4a-4cc6-a8df-5531e06ac299", CellID->1763709623], Cell[5611, 159, 2425, 45, 70, "Output",ExpressionUUID->"231677da-e6aa-44e8-9e30-da661d01dc89", CellID->950854220] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)