I'm currently working a project where I use MARIE Assembly Language to create a version of Hamming code. My initial work has been to first have the user input the 8 bits for the data bits, and to then have the program output the correct 12-bit code word.
In order to find the correct values for the parity bits, I thought that the easiest way might be to load each data bit, which corresponds to a certain parity bit, and to count the number of 1s. However, I have yet to have found a way to have Marie count bits. I know there is no direct instruction to make Marie count bits, but does anyone have any advice on which instruction(s) might lead me towards an answer? I apologize in advance if clarity is lacking, and if it is please let me know so I can edit my question accordingly.