SHIFT >>

Camerart

Member
Hi,
Can someone tell me in words what the lines with >> are doing please?
Camerart.
 

Attachments

  • READ_WRITE.jpg
    READ_WRITE.jpg
    77.5 KB · Views: 14

Camerart

Member
We're not a homework help forum, questions like these are easily found with the most basic of research.

https://en.wikipedia.org/wiki/Bitwise_operation#AND
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators
Hi D,
Ok, thanks for the links.

Can you suggest another Computer forum, where people like me who aren't natural computer program writers can ask general computer questions please. Then I'll remove this on from my bookmarks.
C.
 

_Pete_

Active Member
This is supposed to be a help forum for people who are not natural computer users or programmers. It would seem that the moderators think not. What an absolutely brilliant way to keep members ,NOT. Moderators, effectively, telling people to go away, we don't really want to help anyone. I'm afraid that I don't have a great deal of respect for moderators on any forums. Little people with a lot of, seeming, power. This particular moderator, in my opinion to which I am entitled, has no clue.
 

Darren

Moderator
Staff member
This is supposed to be a help forum for people who are not natural computer users or programmers. It would seem that the moderators think not. What an absolutely brilliant way to keep members ,NOT. Moderators, effectively, telling people to go away, we don't really want to help anyone. I'm afraid that I don't have a great deal of respect for moderators on any forums. Little people with a lot of, seeming, power. This particular moderator, in my opinion to which I am entitled, has no clue.
There's a difference between asking probing and thoughtful questions that instigate discussion versus a question that is basically asking for a definition you can easily Google.
 

Cromewell

Administrator
Staff member
For bitwise reference https://docs.microsoft.com/en-us/cpp/c-language/c-bitwise-operators and https://docs.microsoft.com/en-us/cpp/cpp/left-shift-and-right-shift-operators-input-and-output

At a high level, they are operators that work on the binary representation of your data. And then the operators generally do exactly what you expect them to. AND will give you the binary and of each bit in the 2 numbers, or is the binary or of each bit in the 2 numbers. Xor is exlusive or. i.e. 15 (1111) & 4 (100) = 4 (100), 15 (1111) | 4 (100) = 15 (1111), 15 (1111) ^ 4 (100) = 11 (1011)

Bitwise shift shifts the bits in the direction specified in the requested number of times. i.e. 15 (1111) << 2 = 60 (111100)
 

johnb35

Administrator
Staff member
This is supposed to be a help forum for people who are not natural computer users or programmers. It would seem that the moderators think not. What an absolutely brilliant way to keep members ,NOT. Moderators, effectively, telling people to go away, we don't really want to help anyone. I'm afraid that I don't have a great deal of respect for moderators on any forums. Little people with a lot of, seeming, power. This particular moderator, in my opinion to which I am entitled, has no clue.
Firstly, we really aren't a forum based on programming. The only member here that I know of that knows programming is Cromewell. There may have been more years ago but not sure. Secondly, we don't really like answering homework questions which this seems to be. If we answer, how will the member learn? Thirdly, I do believe you yourself has been talking down to other members up to and including moderators and admins(myself). I'm not gonna pull specific examples but what you have been doing could get your account banned. You may have your opinion but when it comes to talking down to others and staff(which is against forum rules by the way), that's when you need to keep it to yourself. You seem to have the opinion that you are right and everyone else is wrong, but then again so does most men your age I think. So if you would like to stay here then it might be in your best interest to settle down a little. As an admin, if we see a moderator posting stuff that was out of line, then it will be dealt with. Another helpful thought here. It takes good attitude by both staff and regular members in order for a forum to be good and make people want to come back.
 

Camerart

Member
Hi,
Can I clarify why I ask questions instead of 'google'.
When I 'google', I get a cold answer with words like e,g, operators. I've seen and heard that word since I bought my son a Spektrum in the 80s, but it means very little to me, as I have a computer blind spot.
Having said that, by asking questions on forums such as this, once accepted, I have made interesting PCBs with PICs, that I've programmed.
Some times when I 'google', I get the same question I asked decades ago or even last year, so reading through those answers, I get a reinforced reminder, so I can move forward.
Probably there are things that I can do 'naturally' that most of you would find difficult, so perhaps on another forum, I may be helping you.
Let's stay friends, and thanks Cromewell
C.
 

Darren

Moderator
Staff member
Hi,
Can I clarify why I ask questions instead of 'google'.
When I 'google', I get a cold answer with words like e,g, operators. I've seen and heard that word since I bought my son a Spektrum in the 80s, but it means very little to me, as I have a computer blind spot.
Having said that, by asking questions on forums such as this, once accepted, I have made interesting PCBs with PICs, that I've programmed.
Some times when I 'google', I get the same question I asked decades ago or even last year, so reading through those answers, I get a reinforced reminder, so I can move forward.
Probably there are things that I can do 'naturally' that most of you would find difficult, so perhaps on another forum, I may be helping you.
Let's stay friends, and thanks Cromewell
C.

Thats fair. I meant no disrespect by my replies but we get so many drive by users that just ask homework looking questions and never be seen again. The questions you had are the same kind of thing I saw on my entry level digital logic design class, of which I learned by doing my own research. It's clear now you're trying to do more than just get easy answers.

I did not intend to scare you off, and if I came across as rude then I apologize.

@johnb35 I've got few years of programming experience. :p But there's a reason I'm IT and not a software dev. :D
 
Last edited:
Top