-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
877 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,71 @@ | ||
# go-BitmapLogicSimulator | ||
# go-BitmapLogicSimulator | ||
|
||
This is an implementation of Bitmap Logic Simulator. | ||
Original article is [https://realhet.wordpress.com/2015/09/02/bitmap-logic-simulator/](https://realhet.wordpress.com/2015/09/02/bitmap-logic-simulator/). | ||
|
||
The application is implemented with OpenGL. | ||
|
||
## How does it work? | ||
### Rules | ||
Usage is very simple. Draw circuit in your favorate image editor, and load the image! | ||
|
||
The rules are also simple. | ||
|
||
``` | ||
'.' = dark pixel, insulation | ||
'#' = bright pixel, conductive | ||
'bright' means the value of either red or green or blue is greater than 223. 'dark' is the other color. | ||
So color can be various. | ||
``` | ||
|
||
``` | ||
........... | ||
.#########. | ||
........... | ||
.####...... | ||
....######. | ||
........... | ||
some wires | ||
``` | ||
|
||
``` | ||
........... | ||
.....#..... | ||
.....#..... | ||
.####.####. | ||
.....#..... | ||
.....#..... | ||
........... | ||
wire crossing | ||
``` | ||
|
||
``` | ||
........... | ||
....##..... | ||
.####.####. | ||
....##..... | ||
........... | ||
NOT gate (Input is left and output is right. Four directions are possible.) | ||
``` | ||
|
||
So, there is 5 possible certain components. | ||
AND gate can be constructed like this. | ||
|
||
``` | ||
.......... | ||
..##...... | ||
.##.##.... | ||
..##.##... | ||
.....#.##. | ||
..##.##... | ||
.##.##.... | ||
..##...... | ||
.......... | ||
``` | ||
|
||
OR gate can be constructed using two wires merged. | ||
|
||
### Simulation | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package gobls | ||
|
||
type Circuit struct { | ||
} |
Oops, something went wrong.