Finding the remainder in binary division.
I am trying to calculate a frame check sequence from the following binary strings:
String firstString ="110101"
String secondString ="101000110100000"
By doing:
long remainder = Long.parseLong(secondString) % Long.parseLong(firstString);
System.out.println(remainder +"remainder");
Which gives me the result as a long (surprise surprise :P ).
Is there a way to tell java to return the binary remainder 01110 ?
thanks for having a read again!!

