How would I go about making a program in Java that would act
How would I go about making a program in Java that would act like an ALU. With 8 bits for each thing going through each logic micro operation such as 10001000 AND 11111111 would equal 10001000. The micro operations it has to have are load, store, shift-left, and shift-right, add, add-with-carry, sub, increment, and, or, xor, and complement,set-a-flag, clear-a-flag, test-a-flag, branch-if-zero, and branch-if-carry. If someone could help me get started or set me on the right path I\'d really appreciate it.
Solution
You will have to design the whole functionality using BitSet datatype in java to have this implemented.
Create a class with BitSet member variable.
Then create functions for each functionality.
Each function will take the member variable and the argument passed (if in case of add, sub, mul, div) to do the operations.
All your operations will be on the BitSet data variable type. it is of vector type and will have boolean value for each bit. This will make your job easier.

