Skip to content

Mobile application to generate logic circuits and simulate their operation

Notifications You must be signed in to change notification settings

AxelAlemanD/Logic-circuit-Editor-and-simulator

Repository files navigation

Logic circuit: Editor and simulator


Android Java AndroidStudio


Mobile application to generate logic circuits and simulate their operation

Features:

  • Support for input controls (Switch)
  • Support for logic gates (AND, OR, NOT, NAND, NOR)
  • Results displayed by means of a graph
  • Allows you to add N amount of items
  • Allows connection between logic gates
  • Allows you to move items freely on the canvas
  • Simulates the output of the generated logic circuit

Visuals

Available Components

The application offers the following logic gates:

  • AND gate
  • OR gate
  • NOT gate
  • NAND gate
  • NOR gate

It also offers input controls that allow changing the state of the logic gates:

  • Switch
  • Clock
avalaible_components.mp4

Add Components

To add a component, simply click on the icon of the component you want to add

add_components.mp4

Input Controls

Input controls allow the user to interact with them

  • Switch

    In the case of the Switch, it changes state every time the user clicks on it.

    switch_control.mp4
  • Clock

    In the case of the Clock, after adding it, it allows to define every how many seconds its state will change

    clock_control.mp4

    Note: Each component has a unique identifier that is made up of the name of the component + a counter that increases as components are added. This facilitates the connection between components

Connect components

Each component has an exit point (A); in the case of logic gates, these also have one or two entry points (B, C).

To make a connection between the components, click on the exit point (A), this will display a Dialog in which you can select a certain entry point from the available components.

connect_components.mp4

Start simulation

To start the simulation, click on the play button.

  • If I add at least one component, the simulation will start without problems, visually showing the change of state of the components; Blue = 1; Black = 0.
start_simulation.mp4
  • If you have not added any components, the simulation will fail to start and you will be prompted to add a component.
not_start_simulation.mp4

View graph in real time

The application allows to display the graph in real time once the simulation starts.

show_graph.mp4

Change the sampling time

Additionally, you can modify the sampling time for the output graph.

To do this, click on the upper menu, then click on Settings and finally define every few seconds the output of the circuit will be taken to be graphed.

change_sample_rate.mp4

Delete circuit

To clean the circuit, simply click on the button with the broom icon located on the right side of the screen, this will clean the added components as well as the generated graph.

delete_circuit.mp4

About

Mobile application to generate logic circuits and simulate their operation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages