I'm trying to write a program to convert machine code from a text file to assembly language. I can read the file lines no problem as strings, but was given the hint to use bit shifting to break down the machine code line for the parts MIPS instructions.
For example, the file contains information on each line like:
I want to do something like have the instruction=3c011001, and then, for example, get the op code like opCode=instruction>>26. However, this doesn't work because the instruction is read in as a string.