indicators
Class Gates

java.lang.Object
  extended by indicators.Gates

public class Gates
extends Object

An application for indicator functions are binary, logical gates. This class provides static creators for a collection of the most common logical gates. Additionally, there is a creator to build n-bit-adder circuits for variable n.

Version:
1.1
Author:
Marc Pouly

Constructor Summary
Gates()
           
 
Method Summary
static Indicator[] Adder_1(BinaryVariable in1, BinaryVariable in2, BinaryVariable inc, BinaryVariable out, BinaryVariable outc)
          This static method translates a 1-Bit-Adder1 circuit to an array of indicator functions.
static Indicator[] Adder_N(BinaryVariable[] in, BinaryVariable inc, BinaryVariable[] out, BinaryVariable outc)
          This static method translates a N-Bit-Adder1 circuit to an array of indicator functions.
static Indicator[] adder(int size)
           
static Indicator AND_GATE(BinaryVariable in1, BinaryVariable in2, BinaryVariable out)
          This static method translates an AND-Gate to an indicator function.
static Indicator LINE(BinaryVariable line, int value)
          This static method translates an input line to an indicator function.
static Indicator NOT_GATE(BinaryVariable in, BinaryVariable out)
          This static method translates a NOT-Gate to an indicator function.
static Indicator OR_GATE(BinaryVariable in1, BinaryVariable in2, BinaryVariable out)
          This static method translates an OR-Gate to an indicator function.
static Indicator XOR_GATE(BinaryVariable in1, BinaryVariable in2, BinaryVariable out)
          This static method translates an XOR-Gate to an indicator function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gates

public Gates()
Method Detail

AND_GATE

public static final Indicator AND_GATE(BinaryVariable in1,
                                       BinaryVariable in2,
                                       BinaryVariable out)
This static method translates an AND-Gate to an indicator function.

Parameters:
in1 - The first input line.
in2 - The second input line.
out - The output line.
Returns:
The indicator function for this gate.

OR_GATE

public static final Indicator OR_GATE(BinaryVariable in1,
                                      BinaryVariable in2,
                                      BinaryVariable out)
This static method translates an OR-Gate to an indicator function.

Parameters:
in1 - The first input line.
in2 - The second input line.
out - The output line.
Returns:
The indicator function for this gate.

XOR_GATE

public static final Indicator XOR_GATE(BinaryVariable in1,
                                       BinaryVariable in2,
                                       BinaryVariable out)
This static method translates an XOR-Gate to an indicator function.

Parameters:
in1 - The first input line.
in2 - The second input line.
out - The output line.
Returns:
The indicator function for this gate.

NOT_GATE

public static final Indicator NOT_GATE(BinaryVariable in,
                                       BinaryVariable out)
This static method translates a NOT-Gate to an indicator function.

Parameters:
in - The input line.
out - The output line.
Returns:
The indicator function for this gate.

Adder_1

public static final Indicator[] Adder_1(BinaryVariable in1,
                                        BinaryVariable in2,
                                        BinaryVariable inc,
                                        BinaryVariable out,
                                        BinaryVariable outc)
This static method translates a 1-Bit-Adder1 circuit to an array of indicator functions.

Parameters:
in1 - Input line 1.
in2 - Input line 2.
inc - Input line for carry bit.
out - Output line.
outc - Carry output line.
Returns:
The indicator functions for this circuit.

Adder_N

public static final Indicator[] Adder_N(BinaryVariable[] in,
                                        BinaryVariable inc,
                                        BinaryVariable[] out,
                                        BinaryVariable outc)
This static method translates a N-Bit-Adder1 circuit to an array of indicator functions.

Parameters:
in - Array of input lines.
inc - Input line for carry bit.
out - Array of output lines.
outc - Carry output line.
Returns:
The indicator functions for this circuit.

LINE

public static final Indicator LINE(BinaryVariable line,
                                   int value)
This static method translates an input line to an indicator function.

Parameters:
line - The variable representing the line.
value - The value put on this line.
Returns:
The indicator function for this input line.

adder

public static Indicator[] adder(int size)
Parameters:
size - The input size of the adder circuit to construct.
Returns:
An array of indicators that build an adder circuit of the given input size.