Hello all, I had one query. When you append an int to a
string, doesn't the variable get assigned a string. For instance I am having a hard time with the following code.
I am using bit shifting, my output looks great for this program; I have to implement, however, when I try to count how many 0s and 1s it get way off a way off answer. Is there something I am missing?
The out put is the following.
I am basically looking on get the following numbers 26 5 4 which correspond to the following: total # of 1 bits, longest 1 bit sequence, longest 0 bit sequence. Thus, the answer should be 26 5 4. I have tried many different ways to implement this and I keep on gettting the same end result. Am I missing the big picture? Please correct me if I am wrong. You enter a key on the keyboard, which corresponds to a ascii code, which then corresponds to a bit
pattern, which the computer really works with. I know
java uses unicode(could this have something to do with why I am getting this kind of result). Any suggestions much appreciated. Thanks