Programming Assignment 1
Java Requirements

Call your file Arithmetic.java. Implement the following class and static methods. The following comments apply to all of them.

All integers are stored in binary as arrays of bits, with the least significant bit stored at index 0.

All results are required to be normalized, meaning that the most significant bit is 1. The number 0 should have size 0.

class Arithmetic
{
  //=================================================================
  // inc(A) returns an array of bits representing A+1.
  //=================================================================

  public static byte[] inc(byte[] A)
  {
    ...
  }

  //=================================================================
  // sum(A,B) returns an array of bits representing A+B.
  //=================================================================

  public static byte[] sum(byte[] A, byte[] B)
  {
    ...
  }

  //=================================================================
  // product(A,B) returns an array of bits representing A*B.
  //=================================================================

  public static byte[] product(byte[] A, byte[] B)
  {
    ...
  }
}

You can add any number of private methods.