/LogicDraw

Raster editor and simulator of logic circuits

Primary LanguageKotlinMIT LicenseMIT

banner

Build Status

LogicDraw is an application to perform simulations of logic gates, in which you can paint your circuit like in raster graphics editor.

Application is in early development, so be aware that critical bugs can occur. I don't take responsibility for lost maps and blueprints. But if such thing happens, please submit a new issue.

Elements

Wires

Element Idle color Active color
Wire
Dark wire
Cross
Dark cross

Dark wire and cross have much smaller contrast, so they are helpful in making good-looking displays.

Controllers

Element Idle color Active color
Input
Controller

On non-controllable gates, Controller works like regular input.

Flip-flops

Element Idle color Active color
TFlipFlop
Memory (DFlipFlop)

Flip-flops react to rising-edge signal (option to change it will be added in the future).

Gates

Element Idle color Active color
Or gate
Nor gate
And gate
Nand gate
Xor gate
Xnor gate
Delay gate
PWM generator
Stop gate
Key gate
Programmer gate

Stop gate is for circuit debug purposes, so it should not be generally used. It stops the world clock on rising-edge signal.

Key gate is a binding to real-world keyboard, high-level signal disables it.

Programmer gate outputs stored data bit by bit on rising-edge signal.

Display

Element Idle color Active color
White pixel
Red pixel
Green pixel

White, Red and Green pixels work just like regular Wire.

Misc

Element Idle color Active color
Description

How to run it

To run the project, just type: ./gradlew desktop:run (gradlew desktop:run on Windows CMD)

Example circuits

BCD adder:

bcdadder

27 bit divider with 7 bit fraction:

divider

White 7 segment display with bcd decoders, showing result from the division above:

display

4 digit shift register (digits are typed by keyboard):

shift