jeudi 11 juillet 2019

Bitshifting, how to use set, test and clear

Okay, quick notice, this is a lab for my class, and I am by no means requesting answers for the entire lab, only a certain section because I have tried everything I can think of but it's not working. I am asking about the PRINT function. The only reason I provided the entire lab was to give you context so you are not completely confused.

So I believe I need to convert m_value to binary and then print. I can't just print out m_value, that just gives me an int.

https://i.stack.imgur.com/UZt9i.png My lab

okay, so my main objective is to get the print function working. I simply just do not know how to do it. I am 70 percent sure my test function is correct, I do not see how to do it any other way. So I think it is just something small within my print function.

The final output should be in binary.

my code https://docs.google.com/document/d/1_5variXZolfO0IGrkM86pT8hQCn4BWMEu8gGi79QaSE/edit?usp=sharing

Aucun commentaire:

Enregistrer un commentaire