Noob questions: Bitwise operators in screen movement

Why so many programmers prefer to use bitwise operators as opposed to other methods? I understand it is more time efficient in the interest of time, but what are other ways I could accomplish the same thing without these operators

Your going to have to give an example of a use of bitwise operators to get an explanation.

A simple example such as this:

private void render(int xScroll, int yScroll, Screen screen) {
     int x0 = xScroll >> 4; 
     int x1 = xScroll + width >> 4; 
	}

I’m guessing it’s use for whatever that was for was that they wanted division by 16 (tile size perhaps?) but rounding towards negative infinity instead of zero.
Either that or it’s superfluous.

Because Notch did that, and all the hobby programmers followed.

Nah I’m just making a game, and I wanted tile precision, instead of pixel precision. The tiles are 16x16, so that’s just why :slight_smile:

Hmm I just thought of this so , depending on which endian you use if I were to shift 00000001 >>1 would it be 00000000 or 10000000?

In the case of Java, you dont have to care about endianness when working with numbers, except when you are doing I/O.