My Project
logic.h
Go to the documentation of this file.
1 
9 // Include files
10 #include <assert.h>
11 #include <stdio.h>
12 
13 // Enumerated type for a single bit.
14 typedef enum { FALSE=0, TRUE=1 } BIT;
15 
16 // Function Declarations (gates)
17 BIT not_gate(BIT A);
18 BIT or_gate(BIT A, BIT B);
19 BIT and_gate(BIT A, BIT B);
20 BIT xor_gate(BIT A, BIT B);
21 
22 // Function Declarations (circuits)
23 BIT rs_latch(BIT S, BIT R);
24 BIT d_latch(BIT D, BIT WE);
25 int adder(int O1, int O2, BIT carryIn, BIT *carryOut);
26 BIT multiplexer(BIT A, BIT B, BIT C, BIT D, BIT S1, BIT S0);
27 void decoder(BIT A, BIT B, BIT *O0, BIT *O1, BIT *O2, BIT *O3);
BIT or_gate(BIT A, BIT B)
Definition: logic.c:49
BIT rs_latch(BIT S, BIT R)
Definition: logic.c:75
BIT not_gate(BIT A)
Definition: logic.c:24