PDA

View Full Version : Electrical Engineering (WITH FRICKEN LASER BEAMS)



R0b0t1
07-10-2010, 01:30 AM
Electrical circuits (of the digital variety) are fun. Problem is, you need physical materials to make them... NO LONGER. Presented to SRL is the Turing complete, laser based, fully-capable circuit simulator.

So far the most complex things that have been constructed are a JK flipflop based counter and a 4-bit adding circuit. You're invited to make something more complex.

The software used is located here (http://bland.no-ip.org/files/Lasers.jar), with the source being here (http://bland.no-ip.org/files/lasers-src.zip). (BenLand's site. Guess who wrote it?)

Natives

Are placed by right clicking and selecting the given item. Can be moved by double clicking and dragging, or a selection can be made of multiple objects by clicking and dragging a selection box over them. This box can then be drug by double clicking and dragging, or the selection can be copied and pasted elsewhere. The data is stored on the system clipboard, so you can paste it into notepad or similar and paste from notepad to the program.


Emitter

Opaque: Yes.
Default State: TRUE
Action: Emits a beam in a given direction which will stop when hitting an opaque object. Can be colored. Can be manually disabled. Can be linked to detectors or clocks.


Detector

Opaque: Yes.
Default State: FALSE
Action: Blocks and receives a laser beam. Can be connected to different objects, which will "activate" (switch state from FALSE to TRUE) when a laser hits the detector.


Mirror
Opaque: Yes.
Default State: N/A
Action: Reflects a laser beam in a realistic fashion. Currently, infinite slope is not handled correctly. A vertical mirror's reflected beam will always be from the center of the object.


Clock
Opaque: Yes.
Default State: FALSE, alternating.
Action: A special case of detector that periodically alternates between TRUE and FALSE. The speed at which it does so can be selected via its right-click menu.


Opaque Switch
Opaque: N/A
Default State: FALSE, where FALSE is transparent.
Action: When activated by a detector or clock this object will become opaque. When inactive, it will remain transparent.


Transparent Switch
Opaque: N/A
Default State: TRUE, where TRUE is opaque.
Action: When activated by a detector or clock this object will become transparent. When inactive, it will remain opaque.


Label
Opaque: No.
Default State: N/A
Action: Displays a typed message in a selectable color, preceded by the exclusive disjunction (XOR) symbol (which does not mean anything, but it's the double-click area for moving the object).



Logic Gates

Provided here (and attached in a zipped directory) is a collection of basic logic gates. Provided are AND, NOT, OR, and XOR, from which can be constructed NAND, NOR, and XNOR. Complex circuits are usually just a series of these gates.


AND

http://i28.tinypic.com/2eeh7rq.png


LASERSv2:H4sIAAAAAAAAAGNgYOBgYExhgACu////ZwJxLQMKwJCfgiafiiRfA8SdKLL//4PIJCQ1E4G4A9UIVAXLsCnIgTJZoSaUoirw/88AtAlFFcity1FVOWFXlYGqyhGsioGBCW47AwMzlAZhFgAmRSo nOAEAAA==

LASERSv2:H4sIAAAAAAAAAGNgYGBhYExhgACu////RwJxHgMKwJBvRZNPRZLPAeIqFOn//0FqkpDUNAJxJaoRQMyExmaEYmYAPFwc2KUAAAA=

The AND (conjunction, written as an upwards pointing V or multiplication) function takes two inputs and returns TRUE if an only if (iff) both inputs are TRUE. Two versions exist, one that links each detector to a transparent switch, and one that links a detector to an emitter instead.


NOT

http://i28.tinypic.com/34603km.png


LASERSv2:H4sIAAAAAAAAAGNgYGBlYExigACu////7wbiTgYkwAhEKUgKJqArAMqnIskvxTDg/38QmQPlsgLl9wDxXBQjWPPySxQc/zMA1aKo7AfiYlTLIKrADoNjBgCKzE2jyQAAAA==

The NOT (or negation, written as an exclamation mark or a line over the variable name) function takes one input and returns FALSE if the input was TRUE, or TRUE if the input was false. It consists of a detector linked to an opaque switch blocking an emitter.


OR

http://i25.tinypic.com/35jxpop.png


LASERSv2:H4sIAAAAAAAAAGNgYOBkYExhgACu////rwPiTQwoAEP+FJp8DpTBCpWfgyrt+J/h/39MVfdRVTlBVKUi2XUE5Bb7B7JbnrxwqwWLAlUwYKo5uf/BfUbv5DuRSGqQ3XwdiPehuRnZjLcY8hAzkF0MUrMK1Qj//xB1zDABIGaB0iDMCsRsUDY7AJtS0vRqAQAA

The OR (or [inclusive] disjunction, written as a downwards facing V or as a plus sign) function takes two inputs and returns TRUE iff either of the inputs is TRUE. It consists of two detectors, each tied to an emitter facing inwards to a detector. These objects can be discarded assuming the inputs can be faced towards a single detector.


XOR

http://i29.tinypic.com/24whor9.png


LASERSv2:H4sIAAAAAAAAAGNgYOBmYExhgACu////3wbi5wwoAEP+L5p8KpL8R5B++81SJ0+khtSDRf//x6bm7/4Dy/U1G25kIqnJgaphBcrfAuKLqNY4/gepQ1F1G0gLoapygqhKgtkHxGzofmJkwFTwF11BKpICfaCCTyj 2QFycgqRGCkMNkluBWA/qXiRp//8Qc5ihAkxQzA5xApgNkmMDYk6oGAcA8gV4tbQBAAA=

The XOR (or exclusive disjunction, written as an encircled plus sign or carat) function takes two inputs and returns TRUE iff only one of those inputs is TRUE. This is the least straightforward gate, consisting of two detectors linked to an emitter and an opaque switch, such that activation of one detector blocks the other laser.


NAND, NOR, and XNOR

These gates are constructed by appending a negation to their output. The NAND and NOR gates can be used (exclusively) to construct any other gate. The NAND gate is most useful, being used in more locations than the NOR or XNOR gate.



Constructs

These are larger pieces constructed of gates linked together in various fashions. This section will be updated as more things are constructed.


JK Flipflop

http://i31.tinypic.com/wix9qt.png


LASERSv2:H4sIAAAAAAAAAI2USyiEURTH7zcY4xUixoYZNB7jF SslZppZoURKFlIaRSazsqApFrK1sGLKhqyEPTF5TNlamShZ2WC LLD7nzncm954zHl/9p/vd85vz+s69QogOYYSE9eSDskzT3PLZR7rzl+dc1rYxpdgjYD8U ymOoABiToM2+D/fnaLDViYQGXKaAz53w4Jp/IQ1MK8ABKKaFME35S5m7DIwa6IIyNJPbv4BX2QxarNotGwD3Z0 +njs75+nVEaJqJ39IEOYG5okFompoTmWZIAV4ZoGQhrG+qR8jc rMTZddD//uYpzFRqG0+TfdYjWgbthQ7wLJKUEYKXSqKwUn8NIqyG64zBSyV ZaEnEQHt/2E+IPYyLHLAtgm5084ApIFGNWgLt6lS/RakFV7ERJYcFC77PwKhNCcq8fbbhhthKY5UF6UCrdBJ3PI5OnG +Upf2oQIBFIUA7O9dkxMa5B2aP9T3vR8dWI9tIqHUGfphzlQn+ Y0BknETclowud7lT38kwOMBmXcnU6JUHwmdfz5t8GO9BhNrJLa oFmGf3BjltL6xVBp9BfcaU6YJ1szxtmjl7yBWO8DGUw3qs+wkQ Cra88lKn7mZmU6AQRd9tEqWgWlx7QHW4bgDl4boY1Aiy4bsD1I TvzSAv+pS2AlALru2gEuTkjNaAytFWAapEm7zgqkFy0LNxzwVy g3JBTvxP1heEknWgIAcAAA==

A JK Flipflop is a useful piece of circuitry. It acts as a normal flip flop (stores a bit of memory) and offers the normal set and reset (on/off) functionality. J is set, and K is reset. If both are triggered, the current state "flips". This makes it suitable for counting circuits.


SR Flipflop

http://img806.imageshack.us/img806/557/201007100316141024x768s.png


LASERSv2:H4sIAAAAAAAAAGNgYBBnYExhgACu////nwLiEwwoAEP+AYosA2MOlMkKld+Eqj34P8P//wyMqUimbATihyiKgCoYUNU8ALnE/oHslicv3GrBotjV3N//4D6jd/KdSCRzkF38GYiv4HIxEFsA5fejuJglMCmxCOLoJJhBQKyAYRAj kmuAmBNDAZprgNgKiCX2f9z2cNLrfS5Q1yDLW4LMQJZH881pIM 2D4lpMeRU0eeQQ24yhH+JG5DgEmWGJakQQZhyC4o+HQPyA1Cgj xw8DZvx8AYUImouR4wfkEmZU6UDMyFFEN4WRATVyuDAUYHr8NR AvR7GKOzhIIS0nsyAtJ7/gP8TxHAgLGFigNCPUrUJQtggQs0HZHFDLGaH+4Iay+RggMQFiC wAxL5QtCABDxvtXlQMAAA==

Yakman's SR Flipflop.

The top one is set, the lower is reset. When the power is removed feedback keeps the latch in a constant state.



Half Adder

A half adder adds (well, duh) two bits without an initial carry input. It can be the start of a ripple-carry N-bit adder, and that is about it. The Cout indicates a "carry": the adder's inputs were both high.


Full Adder

A full adder is similar to the half adder, but accepts a third input. This third input is designated Cin and makes it suitable for the body of a ripple-carry adder. If two high bits are added together, this triggers the Cout of the last adder to go high, and causes the next adder to add it with the current input, creating a chain until the next low bit is found, upon which it is turned high.



Circuits

Anything that does more than one basic arithmetic operation will be listed here.

Awkwardsaw
07-10-2010, 01:32 AM
oh god. i now know how im spending the rest of my summer.

BenLand100
07-10-2010, 01:43 AM
Thanks for mentioning the amazing author of said software. LOL JK YOU FORGOT ME

R0b0t1
07-10-2010, 01:46 AM
Noob, it's the site they downoad it from. I think they can put two and two together. :p

And nobody will actually be doing anything with this anyway, so it's not like you lost any publicity.

Yakman
07-10-2010, 02:12 AM
http://img806.imageshack.us/img806/557/201007100316141024x768s.png


LASERSv2:H4sIAAAAAAAAAGNgYBBnYExhgACu////nwLiEwwoAEP+AYosA2MOlMkKld+Eqj34P8P//wyMqUimbATihyiKgCoYUNU8ALnE/oHslicv3GrBotjV3N//4D6jd/KdSCRzkF38GYiv4HIxEFsA5fejuJglMCmxCOLoJJhBQKyAYRAj kmuAmBNDAZprgNgKiCX2f9z2cNLrfS5Q1yDLW4LMQJZH881pIM 2D4lpMeRU0eeQQ24yhH+JG5DgEmWGJakQQZhyC4o+HQPyA1Cgj xw8DZvx8AYUImouR4wfkEmZU6UDMyFFEN4WRATVyuDAUYHr8NR AvR7GKOzhIIS0nsyAtJ7/gP8TxHAgLGFigNCPUrUJQtggQs0HZHFDLGaH+4Iay+RggMQFiC wAxL5QtCABDxvtXlQMAAA==

thought I'd post my SR-flipflop

R0b0t1
07-10-2010, 04:49 AM
You could remove some parts by getting rid of the middle detectors on the OR gates and wiring the Q and !Q to the emitter on the OR gate.