I have currently implemented a mips programme which reads in four Base64 characters into registers $s0, $s1, $s2, $s3. I understand that decoding into base 64 characters is taking 6 bit characters and re grouping them into 8 bits. I found this Java code online that writes the decoding process like this:
for (i = numberQuadruple - 1; i > 0; i--) {
decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4);
decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
decodedData[encodedIndex++] = (byte) (b3 << 6 | b4);}
and I know the OR operator is to put two chars together and the shift left and shift right operators is to shift the bits in place but I'm not sure how exactly it does that and how to implement this in assembly?