-
Notifications
You must be signed in to change notification settings - Fork 13
/
circuits_help.js
10644 lines (7955 loc) · 308 KB
/
circuits_help.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
LogicEmu
Copyright (c) 2018-2023 Lode Vandevenne
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/*
This JS file contains help circuits for viewing and editing,
and injects them into a dropdown from logicemu.js
*/
registerCircuitGroup('help');
registerCircuit('Main Help', `
0"# LogicEmu Main Help"
0"Table of contents:"
0"INSERT:toc"
0"Welcome to LogicEmu! LogicEmu emulates logic circuits. It has a whole bunch"
0"of circuits included to play with, including binary adders, multipliers,"
0"flip-flops, NAND-only logic, ..., and also allows creating new circuits."
0"E.g. like this AND gate with switches and LED:"
s..>a..>l
^
s....
0"LogicEmu is cell-based. A side effect of that is the notation isn't standard"
0"notation. On the other hand, this has as advantage that a lot of logic fits"
0"on a single screen and it's quite flexible. Also, each cell is an ASCII"
0"character, which has advantages for editing and sharing circuits."
0"It's a digital logic emulator, but not an electrical simulator. Power sources"
0"and voltages are abstracted away, and only two signals, 0 and 1, are"
0"emulated."
0"This tutorial is multiple screens long, so scroll down to see all"
0"# User Interface"
0"The top bar has buttons of the user interface, such as selecting built-in"
0"circuits, pausing, changing graphics options, editing, ... Hover over each"
0"button and dropdown to see their explanation."
0"The rest of this tutorial explains what the different symbols and components"
0"in circuits do. Another tutorial goes in more detail over the user interface."
0"# Input / Output / Wires"
0"In general, a circuit has input switches, some processing logic, possibly"
0"some state, and finally output LEDs. So the simplest circuit has a switch"
0"and a LED with a wire in between."
0"Toggle the switch (s) with the mouse to toggle the LED (l)."
s....>l
0"There are in fact 4 types of cells visible in the above circuit:"
s 0": the input switch which can be toggled with the mouse to output 0 or 1"
.. 0": wire which connects things"
> 0": arrowhead: input from the wire to the LED"
l 0": the output LED"
0"A 'p' is a push button instead of a switch:"
p....>l
0"As you can see, the electrical circuits above are not closed. That is"
0"because we only simulate the logic here. Power sources and closing of"
0"the electrical circuit are implicit"
0"This switch is a simple component here, but in real life it would actually be"
0"quite involved: it needs a pullup/pulldown resistor (or be a SPDT switch)"
0"to toggle between the two voltages (and not float), and needs a"
0"debouncing circuit."
0"Wires can cross or split. If they cross, the signals don't interfere."
0"Wire split (indicated with a little dot at the connection, or . in text"
0"mode): The input switch activates all connected outout devices. This is also"
0"known as fanout."
l
^
.
.
s......>l
.
.
v
l
0"Wire crossing (indicated with the wires rendered slightly disconnected, or a"
0"'+' or 'x' in text mode): Both switch/LED pairs work independently and don't"
0"interact:"
s
. l l
. ^ ^
. s... ..>l ; /
s...+..>l x x
. s... ..>l / ;
. / ;
v s s
l
0"Diagonal wire crossing at the arrowhead itself (causing 2 diagonal crossing"
0"inputs):"
s...... l
>
s...... l
0"LEDs can also come in various different colors (using numeric digits in the"
0"source code, but the numbers will be invisible below)"
s.............>l0 0"0: red (default color)"
s.............>l1 0"1: orange"
s.............>l2 0"2: yellow"
s.............>l3 0"3: green"
s.............>l4 0"4: blue"
s.............>l5 0"5: purple"
s.............>l6 0"6: pink"
s.............>l7 0"7: white"
s.............>l8 0"8: test signal: toggles between red (off) and green (on)"
s.............>l9 0"9: LCD"
0"# Logic Gates"
0"Actual logic is done with logic gates. AND, OR and XOR gates are"
0"represented with the letters a, o and e respectively (e stands for"
0"exclusive or)"
0"AND gate: the LED only goes on if both input switches are enabled:"
s..>a..>l
^
s....
0"OR gate: the LED goes on if any input switch is enabled:"
s..>o..>l
^
s....
0"XOR gate: the LED goes on if any single input switch is enabled, but not both:"
s..>e..>l
^
s....
0"More theory about these logic gates is in several of the built-in circuits"
0"from the 'circuits' drop-down. This tutorial here is about viewing circuits"
0"with LogicEmu, while other circuits are tutorials for actual logic."
0"Inverted gates NAND, NOR and XNOR are indicated with capital letters"
0"instead of small letters. Respectively A, O and E."
0"NAND:"
s..>A..>l
^
s....
0"NOR:"
s..>O..>l
^
s....
0"XNOR:"
s..>E..>l
^
s....
0"A simple NOT gate can be done with O with a single input:"
s..>O..>l
0"So to summarize, the 6 main logic gates are:"
3"a: AND "
3"o: OR "
3"e: XOR "
3"A: NAND "
3"O: NOR (+NOT)"
3"E: XNOR "
0"3-input gates are also possible, and XOR gates then work like parity gates"
0"(outputs 1 if an odd amount of inputs is 1)"
s....
v
s..>e..>l
^
s....
s....
v
s..>A..>l
^
s....
0"0-input and 1-input gates are also possible. A 0-input AND gate outputs"
0"true due to the empty product (or, because it has no 'off' inputs):"
a....>l s....>a....>l
o....>l s....>o....>l
e....>l s....>e....>l
A....>l s....>A....>l
O....>l s....>O....>l
E....>l s....>E....>l
0"There also exist constants, displayed with '0' and '1' in graphics mode or"
0"as 'f' and 'F' ('fixed value') in text mode:"
f....>l s....>f....>l
F....>l s....>F....>l
0"A fixed value with a decimal number can also output a decimal number in"
0"binary:"
llllllllll
^^^^^^^^^^
f500######
0"They can also come in a form where all the output bits are inverted. The border"
0"color of the entire component is lit up to indicate this (in text mode, you"
0"can instead see a small f for normal fixed value, capital F for inverted)"
llllllllll
^^^^^^^^^^
F500######
0"There also exist negated inputs. Normal inputs are indicated with an"
0"arrow head, negated inputs instead with a little circle (or in text"
0"mode, that is m]w[ for NESW respectively):"
s..]l
0"For example logic gates can get negated inputs that way:"
s..]o...>l
s..]a...>l
^
s....
0"NOTE: In real life electronics, logic gates normally don't have such"
0"easy way of negating inputs and invertors are needed. In real life,"
0"what you will see more often, is circuits where a regular and a negated"
0"version of a signal runs through the whole system, like so:"
l
^
o<.
^ .
.>a a<.
. ^ ^ .
%>O------.-+-+-+-------- 0"A'"
"A"s--.----------+-.-+-------- 0"A"
%>O--------+---.-------- 0"B'"
"B"s--.----------.------------ 0"B"
0"To make gates with more than 3 inputs, their size can be increased"
0"In text mode, you can see that character '#' is used for this"
s..>e..>l
#
s..>#
#
s..>#
#
s..>#
0"An example of combining multiple logic gates: The full adder: (NOTE: This is"
0"an example for the notation here. There are circuits explaining full adders"
0"included in the dropdowns above. If you do not know yet what a full adder"
0"means, just enjoy the response to the switches :)"
s..>a>o..>l
> ^
s..>e>a
>
s....>e..>l
0"# Flip-Flops"
0"This describes the built in 'flip-flop' devices. Note that, as in"
0"real life, all of these can be made from the logic gates above. It is"
0"very useful to have idealized built-in ones however. This tutorial"
0"only explains how to view them, see the flip-flop tutorial to get the"
0"description what flip-flops do and how they work."
0"A 'gate' with a 'c' instead of 'a', 'o', 'e' represent a single-input"
0"T flip-flop or frequency halver (the c stands for counter here since multiple
0"together form a binary counter)."
0"Everytime the switch is toggle from off to on, the c toggles to the other"
0"state, so it halves the frequency of the signal. This is a component that"
0"keeps a state and is positive edge triggered"
s..>c..>l
0"Multiple of them makes a binary counter"
l l l l
^ ^ ^ ^
s..>c..>c..>c..>c
0"Real ideal flip-flops can be made from 'c', 'd', 'j', 'k', 't', 'q' 'Q' and 'y',"
0"they can be combined to make SR, JK, D or T flip-flops."
0"Here is how to interpret each letter:"
0"- c: the clock input. When the clock input goes from low to high the flip-flop"
0" will toggle if needed"
0"- j: the S input for SR flip-flop or the J input for JK flip-flop"
0"- k: the R input for SR flip-flop or the K input for JK flip-flop"
0"- d: the D input for D flip-flop"
0"- t: the T input for T flip-flop"
0"- q: output, or asynchronous S input. Note that c, j, k, d and t can also"
0" already be used as outputs"
0"- Q: negated output, or asynchronous R input"
0"- y: enable input: if present, only reacts to inputs if this is on. May also"
0" replace c, then the object is a latch instead of a flip-flop. Asynch q and Q"
0" still override this."
0"Most other parts will also output signal so using q and Q is not required for"
0"that. These parts can be combined in any way, with # (visible in text mode)"
0"as filler"
s..>d..>l
# 0"D flip-flop: when triggering c, the output will remember the state of d"
s..>c
s..>t..>l
# 0"D flip-flop: when triggering c, the output will toggle if t is on"
s..>c
s..>j#q..>l
###
s..>c## 0"Serves as SR or as JK flip-flop"
###
s..>k#Q..>l
p
v
s..>j#q..>l
###
s..>c## 0"Same with asynch set/reset inputs added"
###
s..>k#Q..>l
^
p
s..>q..>l
# 0"SR latch: no clock, output remembers single switch"
s..>Q..>l
s-->d-->l 0"D-latch (enable input instead of clock)"
#
s-->y
s-->c-->l
s-->t-->l
s-->d-->l 0"All parts combined in 1 flip-flop"
s-->j-->l 0"Not realistic, but possible."
s-->k-->l 0"J+K combination overridden by D"
s-->q-->l
s-->Q-->l
S-->y-->l
s-->t-->l
s-->d-->l
s-->j-->l 0"All parts combined in 1 flip-flop, without clock"
s-->k-->l 0"Not realistic, but possible."
s-->q-->l 0"J+K combination overridden by D"
s-->Q-->l
S-->y-->l
0"# Integrated Circuits"
0"An integrated circuit or chip needs to be defined only once, and can then be"
0"reused in multiple places. It is defined by having an 'I' next to it"
0"and is used with a small 'i'. To define multiple chips, numbers are"
0"used to distinguish them."
0"Here is a full adder chip defined and labeled with number 12"
I12
l
^
.
l<....o<a e .....s
^ ^^^/
a e .
^^^
. .
. .
s s
0"And here we use multiple instances of chip 12:"
l l l l l
^ ^ ^ ^ ^
| | | | |
l<-i12<-s l<-i12<i12<i12<i12<-s
^ ^ ^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | | | |
s s s s s s s s s s
0"Chips support nesting, one chip can be used in the definition of another."
0"Here we are defining chip number 24 as two connected 12's, and using it"
l l
^ ^ l l
| | ^ ^
l<-i12<i12<-sI24 l<i24#<s
^ ^ ^ ^ ^^^^
| | | | ssss
s s s s
0"# Special devices"
0"The delay (or buffer), indicated with 'd', introduces a 1-tick delay"
s-->d-->l
s-->d-->d-->d-->d-->d-->d-->d-->d-->l
0"or it can have a higher delay indicated with a number:"
4
s-->d-->l
2
0
s-->d-->l
0"The pulse, indicated with 'q' or 'Q', create a single short pulse on any"
0"positive input edge. This is only so when standalone or when combined with y,"
0"in other scenarios they'll behave like q and Q of flip-flop explained earlier."
s-->q-->l
s-->Q-->l
s-->q-->l
s-->y
s-->Q-->l
s-->y
0"A pulse duration can be made longer with a number:"
1
0
s-->q-->l
0"Note that the pulse can also be made with a delay and an AND gate instead,"
0"or with a c looping back to itself, the single q is just a shortcut:"
..... ...
. v v .
s-.>d]a->l s..>c..>l
0"A timer 'r' or 'R' blinks with a certain speed. The number indicates the"
0"duration, in emulation ticks per timer change. The period of the timer is"
0"two changes. For the normal emulation speed, that means the number gives"
0"the timer period in tenths of a second. The fast or slow emulation speeds"
0"alter this."
0"The default speed, when no number is given or number 0, is a period of 20"
0"ticks, which means about 1 second (or 0.5 seconds per change) for the normal"
0"emulation speed."
10r------>l
2r------>l
5r------>l
0"A small 'r' means it's initially of while 'R' is initially on:"
r------>l
R------>l
0"A music note 'N' acts like a speaker, producing a tone of a given frequency."
0"NOTE: this only works if your browser supports Web Audio. The browser may"
0"also require interaction with the page, by clicking something, before audio"
0"can play."
0"If not supported, the N's will still indicate when they're enabled."
p-->N349
p------>N369
p-->N391
p------>N415
p-->N440
p-->N466
p------>N493
p-->N523
p------>N554
p-->N587
p------>N622
p-->N659
p-->N698
0"Values above 100000 indicate different audio wave shapes:"
p-->N000440 0"sine"
p-->N100440 0"square"
p-->N200440 0"triangle"
p-->N300440 0"sawtooth"
p-->N400000 0"white noise"
0"Multiple inputs control the volume in binary:"
N###440
^^^^
||||
ssss
"8421"
0"Multiple input groups control different properties. The number now is the"
0"maximum frequency. Both freq and vol must have a non-zero value to hear"
0"anything."
0"if a music note has an y-input, it's an enable-input and the music note only"
0"produces sound if it's on"
N########################y#2000
^^^ ^^^^ ^^^^ ^
||| |||| |||| |
sss sSss ssss S
1"shape" 1"freq" 1"vol""enable"1
0"Kinetic output comes in various forms, depending on a number"
0"These have various symbols in graphical mode, or use letter 'K' in text mode."
0"Numbers 0 (or none), 1, 2 and 3 represent different output devices"
s--->K 0"no number: same as 0."
s--->K0 0"motor / gear"
s--->K1 0"fan / wind / cooling"
s--->K2 0"heating"
s--->K3 0"pump / sprinkler / liquid"
s--->K4 0"electromagnet"
0"for completeness: other simple output types not using 'K' (excludes dot matrix screen, ascii, ...):"
s--->l 0"light / lamp / LED"
s--->l9 0"LCD"
s--->N 0"speaker"
s--->T 0"binary"
0"These outputs such as fan, electromagnet, ... have no other effect other than"
0"showing a different icon if enabled (unless their sensor versions are used,"
0"see below). As output, they're no different than what an LED does, displaying"
0"output. But it can be used to indicate that this output represents some"
0"particular type of action."
0"These components can also be used as detectors instead. As a detector, they"
0"will typically only detect output by one of their matching type in a certain"
0"radius in the neighborhood. Some have slightly different behavior."
0"Gear: activates all neighbors eventually, but has a radius of 1:"
l<--KKKKKKKKKKKKK
K
s-->KKKKKKKKKKKKK
0"Gears will activate if neighboring gears are active, except if exactly 3"
0"neighbors are active."
KKKK
p--->KKKKKKKKKKKK KKKKKKKKKKK<--p
KKKK
0"Fan: only detects active fans with an input, but not fans that indirectly detect air, and have a larger radius, but"
0"notice that fans too far away from the active one detect nothing:"
0"Without inputs, the fan is, instead, an airflow sensor."
K1 K1 K1 K1 K1
K1 K1 K1 K1 K1
K1 K1 K1 K1 K1
s-->K1 K1 K1 K1
K1 K1 K1 K1 K1
K1 K1 K1 K1 K1
K1 K1 K1 K1 K1
0"Heat: similar to fan but smaller radius:"
0"Without inputs, the fan is, instead, a heat sensor."
K2 K2 K2 K2
K2 K2 K2 K2
s-->K2 K2 K2
K2 K2 K2 K2
K2 K2 K2 K2
0"Water: unlike fan and heat, all water 'pipes' will transmit the water on to"
0"next pipes, and some gap between pipes is allowed:"
s-->K3 K3 K3 K3 K3 K3 K3 K3 3K-->l
0"Electromagnet: similar to fan and heat, with much larger radius, but only transmits"
0"in straight directions (N, E, S, W), not the entire circular pattern:"
0"Without inputs, this acts as a sensor for electromagnets in those 4 directions."
4K-->l
s-->K4 4K-->l
s-->K4 4K-->l
s-->K4 4K-->l
4K-->l
0"Note: only those that do not have any inputs (arrows pointed at them) will act"
0"as sensors, those with inputs will only activate if their input is enabled, not"
0"from neighboring matching devices."
0"Higher numbered variants of K have more active effects:"
0"Numbers 5-9 represent TNT of different strengths which can permanently disable devices in a certain radius"
l<S
l<S
s-->K5
l<S
l<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<S
s---->K6 l<S
l<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
0"The effect can also propagate to others, and be detected if a detector is at safe distance:"
K K K K K K
6 6 6 6 6 6
s-->K K K K K K------>c>l
6 6 6 6 6 6
K K K K K K
6 6 6 6 6 6
0"Note: size 7..9 are larger and not shown here to not affect the other circuits around here."
0"Numbers 10-14 represent EMP of different strengths which can temporarily disable devices in a certain radius"
l<S
l<S
s-->K10
l<S
l<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<S
s---->K11l<S
l<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
0"If the EMP disables its own input switch, it will cause flickering:"
s-->K11
0"Note: size 12..14 are larger and not shown here to not affect the other circuits around here."
0"Numbers 15-19 represent jamming signal of different strengths which can temporarily randomize devices in a certain radius"
l<S
l<S
s-->K15
l<S
l<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<S
s---->K16l<S
l<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
l<Sl<Sl<S
0"Note: size 17..19 are larger and not shown here to not affect the other circuits around here."
0"Number 20 represents a cover or hatch, that when off, makes what's below it invisible."
############
# #
#"revealed"#
# #
s-->K20 #
# #
# s.....>l #
# #
############
0"An RGB LED 'D' takes a red, green and blue input:"
8"R"s--->D<---s"B"6
^
|
|
|
s
"G"
0"('D' comes from display as will be seen below.)"
0"RGB LEDs with less or more than 3 inputs also exist and use various"
0"color palettes:"
D D### D########
^ ^^^^ ^^^^^^^^^
s ssss sssssssss
0"With more input groups as configured below and at least a dot (c) or fill (q)"
0"input, D is the Dot Matrix Display. An optional enable 'y' input is also"
0"supported."
0"With binary addressing:"
D#######y<S"enable"
########c<p"dot"
########q<p"fill"
########
########<s"b"
:s>########<S"g"
ys>########<s"r"
:s>########<s"i"
^^^
sss
"x"
0"With line based matrix addressing:"
s>D#######y<S"enable"
s>########c<p"dot"
S>########q<p"fill"
s>########
s>########<s"b"
S>########<S"g"
s>########<s"r"
s>########<s"i"
^^^^^^^^
ssSssSss
0"A capital M forms a multiplexer, demultiplexer or controlled swap, depending on"
0"the configuration. Mouse over them to see a tooltip that explains each one."
0"Mux:"
4"control"4 4"control"4
l l l
^ ^ ^
: . . .
i . : . .
ns..>M..>l0"out" is..>M##..>l3"out"
p # n ###
us..># ps..>###
t ^ u ###
s . ts..>###
: . s ###
s :s..>###
4"control"4 ^ ^
. .
. .
s s
4"control"4
0"Demux:"
4"control"4 4"control"4
l l l
^ ^ ^
. . .
. : . . :
5"in"s..>M..>lo 5"in"s..>M##..>lo
# u ### u
#..>lt ###..>lt
^ : ### p
. ###..>lu
. ### t
s ###..>ls
4"control"4 ^ ^ :
. .
. .
s s
4"control"4
0"Controlled swap:"
l
^
.
.
s..>M..>l
#
s..>#..>l
^
.
.
s
0"A terminal can display ASCII characters to a screen and read them from"
0"the keyboard. If it has a blinking cursor, you can type in it. The"
0"EOF LED indicates that nothing was typed or everything typed was"
0"already output (content entered with the 'read' switch rather than typed"
0"does not count for this). If there is no blinking cursor, click it with the"
0"mouse first, then you can type in it"
0"The c input and output are for the keyboard: output command and EOF signal"
0"The C input is for the screen to input ascii characters"
lllllll0"ASCII output, from keyboard"
^^^^^^^
|||||||
T######C<--p0"read ASCII from input switches to screen"
#######c<--p0"output keyboard ASCII"
#######c-->l"EOF"
#######
^^^^^^^
|||||||
SsssssS0"ASCII input, to screen"
0"1000001 = letter A"
0"Without read/write flags, it can instead display or read decimal numbers"
T#######"decimal"
^^^^^^^^
||||||||
sSsssssS"binary"
0"Place cursor in here with mouse, then type a number. Letters don't work,"
0"but a minus sign, and prefix 0x for hex, work. Negative numbers will use"
0"twos complement binary output."
llllllll
^^^^^^^^
T#######
0"With the following configurations, the terminal works instead as a decimal"
0"counter, with optional features such as reset, down count, and set from data"
0"For counters, y, c, C, q and Q have the meanings indicated."
llllllll llllllll llllllll
^^^^^^^^ ^^^^^^^^ ^^^^^^^^
T#######c<p0"up" T#######c<p0"up" T#######c<p0"up"
########Q<p0"reset"########Q<p0"reset"
########C<p0"down"
llllllll llllllll llllllll
^^^^^^^^ ^^^^^^^^ ^^^^^^^^
T#######q<p0"set"T#######c<p0"up" T#######y<s0"enable"
^^^^^^^^ ########q<p0"set" ########c<p0"up"
ssssssss ^^^^^^^^ ########C<p0"down"
ssssssss ########q<p0"set"
########Q<p0"reset"
^^^^^^^^
ssssssss
0"A capital U forms an ALU (arithmetic logic unit) with built-in support for"
0"various advanced mathematical operations. While these can be made from"
0"individual logic gates, having it available as a single unit saves space"
0"in higher level circuits. The number next to the U determines the operation."
0"The full list is in the editing tutorial instead. A tooltip and a label on"
0"the component (if there's enough space) will also show the operation."
0"Example: 2-input operation example: 8-bit adder"
T#######
^^^^^^^^
llllllll
^^^^^^^^
l<U16##############<s
^^^^^^^^ ^^^^^^^^
ssssssss ssssssss
" ...8421 ...8421"
" A B"
0"1-input operation example: 8-bit increment"
T#######
^^^^^^^^