Here you can find the source of shiftRightN(int[] x, int n)
static int shiftRightN(int[] x, int n)
//package com.java2s; public class Main { static int shiftRightN(int[] x, int n) { // int c = 0, nInv = 32 - n; // for (int i = 0; i < 4; ++i) // { // int b = x[i]; // x[i] = (b >>> n) | c; // c = b << nInv; // } // return c; int b = x[0], nInv = 32 - n; x[0] = b >>> n;//w w w. java 2s. c om int c = b << nInv; b = x[1]; x[1] = (b >>> n) | c; c = b << nInv; b = x[2]; x[2] = (b >>> n) | c; c = b << nInv; b = x[3]; x[3] = (b >>> n) | c; return b << nInv; } static int shiftRightN(int[] x, int n, int[] z) { // int c = 0, nInv = 32 - n; // for (int i = 0; i < 4; ++i) // { // int b = x[i]; // z[i] = (b >>> n) | c; // c = b << nInv; // } // return c; int b = x[0], nInv = 32 - n; z[0] = b >>> n; int c = b << nInv; b = x[1]; z[1] = (b >>> n) | c; c = b << nInv; b = x[2]; z[2] = (b >>> n) | c; c = b << nInv; b = x[3]; z[3] = (b >>> n) | c; return b << nInv; } }