I am unable to answer this question in my homework. Can somebody sample a solution I can reference to understand how to tackle this?
Initialize any random word in memory, e.g. 0x55555555. Only Bit 0 to Bit 30 are valid bits. Write assembly language code to generate the even and odd parity bit. Replace Bit 31 in the word with the parity bit. Write the Even Parity Word to r0 and Odd Parity word to r1. E.g. if the data in memory is 0x55555555.
- Total number of 1’s is 16. Even Parity Bit = 0, Odd Parity Bit = 1.
- r0 = 0x55555555
- r1 = 0xD5555555
ive only managed to make a counter to count the number of 1s as hinted in my class but i am stuck on how to proceed from there.
pseudo code: