Emulator.Global
Class Value

java.lang.Object
  extended by Emulator.Global.Value
All Implemented Interfaces:
Constants

public class Value
extends java.lang.Object
implements Constants

********************** Created By: Yuval Tzur Date: 14/12/12 Time: 19:11 Description: Value is defines a binary value. It must have a size (Number of bits); It is used to allow easy manipulation on binary values. ***********************


Field Summary
 
Fields inherited from interface Emulator.Global.Constants
_0, _1, AC, ADDR_REGISTER_SIZE, ALU, ALU_IN0, ALU_IN1, ALU_OUT, AR, BUS, BUS_SIZE, DATA_COMPONENTS, DATA_REGISTER_SIZE, DATA_TABLE_SIZE, DR, E, FGI, FGO, I, IEN, INPR, IO_REGISTER_SIZE, IR, M, MEMORY_SIZE, OUTR, PC, R, S, TARGET_REACHED, TIMEOUT, TIMER, TIMER_LIMIT, TR, TR0, TR1, UNREACHABLE
 
Constructor Summary
Value(boolean[] value)
           
Value(int size)
           
Value(int size, int value)
           
Value(java.lang.String value)
           
 
Method Summary
 void complement()
           
 boolean[] get_content()
           
 int get_decimal()
           
 java.lang.String get_hexadecimal()
           
 int get_size()
           
 void increment()
           
 void set_content(boolean[] value)
           
 void set_content(int value)
           
 void set_content(java.lang.String value)
           
 void set_content(Value value)
           
static boolean[] toBinary(int size, int value)
           
static boolean[] toBinary(java.lang.String value)
           
static int toDecimal(boolean[] value)
           
static int toDecimal(java.lang.String value)
           
static java.lang.String toHexadecimal(boolean[] value)
           
static java.lang.String toHexadecimal(int size, int value)
           
static java.lang.String toHexadecimal(java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Value

public Value(int size)

Value

public Value(boolean[] value)

Value

public Value(int size,
             int value)

Value

public Value(java.lang.String value)
Method Detail

set_content

public void set_content(boolean[] value)

set_content

public void set_content(int value)

set_content

public void set_content(java.lang.String value)

set_content

public void set_content(Value value)

get_size

public int get_size()

get_content

public boolean[] get_content()

get_decimal

public int get_decimal()

get_hexadecimal

public java.lang.String get_hexadecimal()

toBinary

public static boolean[] toBinary(int size,
                                 int value)

toBinary

public static boolean[] toBinary(java.lang.String value)

toDecimal

public static int toDecimal(boolean[] value)

toDecimal

public static int toDecimal(java.lang.String value)

toHexadecimal

public static java.lang.String toHexadecimal(boolean[] value)

toHexadecimal

public static java.lang.String toHexadecimal(int size,
                                             int value)

toHexadecimal

public static java.lang.String toHexadecimal(java.lang.String value)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

complement

public void complement()

increment

public void increment()