... fill this in More...
#include "logic.h"
Functions | |
BIT | not_gate (BIT A) |
BIT | or_gate (BIT A, BIT B) |
BIT | rs_latch (BIT S, BIT R) |
... fill this in
BIT not_gate | ( | BIT | A | ) |
Simulates NOT logic gate.
A | input to the NOT gate |
Truth table
A return 0 1 1 0
BIT or_gate | ( | BIT | A, |
BIT | B | ||
) |
Simulates OR logic gate.
A | first input to the OR gate |
B | second input to the OR gate |
Truth table
A B return 0 0 0 0 1 1 1 0 1 1 1 1
BIT rs_latch | ( | BIT | S, |
BIT | R | ||
) |
Simulates RS latch circuit. Asserts if S = R = 0.
S | set input line |
R | reset input line |
Truth table
S R return 0 0 assert 0 1 1 1 0 0 1 1 previous output