Skip to content

Commit ce29388

Browse files
committed
Add another demo (2-bit comparator for unsigned numbers)
1 parent f2c1d7b commit ce29388

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

demos/2bit_comparator.logic.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": 1,
3+
"description": "Logic that compares two 2-bit unsigned integer numbers (A and B). Outputs signals tell if A < B (A_LT_B, 'less than'), A = B (A_EQ_B, 'equals') or A > B (A_GT_B, 'greater than').",
4+
"inputs": ["B1", "B0", "A1", "A0"],
5+
"outputs": {
6+
"A_LT_B": [0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0],
7+
"A_EQ_B": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
8+
"A_GT_B": [0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0]
9+
}
10+
}

0 commit comments

Comments
 (0)