Emulator.Global
Class Value
java.lang.Object
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.
***********************
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Value
public Value(int size)
Value
public Value(boolean[] value)
Value
public Value(int size,
int value)
Value
public Value(java.lang.String value)
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()