Java BigInteger Calculate chop(BigInteger in, int bits)

Here you can find the source of chop(BigInteger in, int bits)

Description

chop

License

Open Source License

Declaration

private static BigInteger[] chop(BigInteger in, int bits) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.math.BigInteger;

public class Main {
    private static BigInteger[] chop(BigInteger in, int bits) {
        BigInteger left = in.shiftRight(bits);
        BigInteger right = in.subtract(left.shiftLeft(bits));
        return new BigInteger[] { left, right };
    }//ww w .j ava  2 s  . c om
}

Related

  1. bitcoinValueToFriendlyString(BigInteger value)
  2. byte_size(BigInteger bi)
  3. calculateGx(BigInteger p, BigInteger g, BigInteger x)
  4. calculateRx_(BigInteger Rx, BigInteger n)
  5. castToBigInteger(Object val)
  6. clip(BigInteger bi, int numberOfBytes)
  7. clone(BigInteger[] data)
  8. copy_into_byte_array(BigInteger bi, byte[] a)
  9. copyOf(BigInteger[] data, int newLength)