|
18 | 18 | <li class="uk-active"><a href="#">Diagram</a></li> |
19 | 19 | <li><a href="#">Table</a></li> |
20 | 20 | <li><a href="#">Trace</a></li> |
| 21 | + <li><a href="#">Examples</a></li> |
21 | 22 | </ul> |
22 | 23 | <div class="grow"></div> |
23 | 24 | <div class="uk-button-group"> |
|
46 | 47 | <tbody></tbody> |
47 | 48 | </table> |
48 | 49 | </li> |
| 50 | + <li id="examples-view"> |
| 51 | + <ul uk-accordion> |
| 52 | + <li> |
| 53 | + <a class="uk-accordion-title" href>Unary multiplication by 2</a> |
| 54 | + <div class="uk-accordion-content"> |
| 55 | + <p>A machine that reads from the tape an integer in unary notation (n is represented by a list of n occurrences of the symbol 1) and writes it back doubled.</p> |
| 56 | + <p><a href="?fetch=https%3A%2F%2Fraw.githubusercontent.com%2Ffbbdev%2Fturing%2Fmain%2Fexamples%2FunaryDup.txt">Load in the simulator</a></p> |
| 57 | + <p><i>Instructions:</i> click the link above; when the machine has been loaded, click the tape head (the cell with a large black border), type <code>1</code> as many times as you like, press the <code>Enter</code> key and hit the play button.</p> |
| 58 | + </div> |
| 59 | + </li> |
| 60 | + <li> |
| 61 | + <a class="uk-accordion-title" href>Binary increment by one</a> |
| 62 | + <div class="uk-accordion-content"> |
| 63 | + <p>A machine that reads from the tape an integer in binary notation and writes it back incremented by one.</p> |
| 64 | + <p><a href="?fetch=https%3A%2F%2Fraw.githubusercontent.com%2Ffbbdev%2Fturing%2Fmain%2Fexamples%2FbinaryIncr.txt">Load in the simulator</a></p> |
| 65 | + <p><i>Instructions:</i> click the link above; when the machine has been loaded, click the tape head (the cell with a large black border), type a sequence of <code>1</code>s and <code>0</code>s, press the <code>Enter</code> key and hit the play button.</p> |
| 66 | + <p>After the machine halts, if you hit the stop button, then the play button again it will keep incrementing the number more and more.</p> |
| 67 | + </div> |
| 68 | + </li> |
| 69 | + <li> |
| 70 | + <a class="uk-accordion-title" href>Binary addition</a> |
| 71 | + <div class="uk-accordion-content"> |
| 72 | + <p>A machine that reads from the tape two integers in binary notation, separated by a blank, and writes back their sum.</p> |
| 73 | + <p><a href="?fetch=https%3A%2F%2Fraw.githubusercontent.com%2Ffbbdev%2Fturing%2Fmain%2Fexamples%2FbinaryAdd.txt">Load in the simulator</a></p> |
| 74 | + <p><i>Instructions:</i> click the link above; when the machine has been loaded, click the tape head (the cell with a large black border), type a sequence of <code>1</code>s and <code>0</code>s, press <code>Space</code>, then type again a sequence of <code>1</code>s and <code>0</code>s, press the <code>Enter</code> key and hit the play button.</p> |
| 75 | + </div> |
| 76 | + </li> |
| 77 | + </ul> |
| 78 | + </li> |
49 | 79 | </ul> |
50 | 80 | </div> |
51 | 81 | <div id="editor"> |
|
0 commit comments