Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5986813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:43:34+00:00 2026-05-22T22:43:34+00:00

I would be thankful for a good tutorial, that explain for java newbies how

  • 0

I would be thankful for a good tutorial, that explain for java newbies how in java all the “bit shifting” work.

I always stumble across it, but never understood how it works. It should explain all the operations and concepts that are possible with byteshifting/bitmanipulation in java.

This is just an example what I mean, (but I am looking for a tutorial that explains every possible operation):

byte b = (byte)(l >> (8 - i << 3));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:43:34+00:00Added an answer on May 22, 2026 at 10:43 pm

    Well, the official Java tutorial Bitwise and Bit Shift Operators covers the actual operations that are available in Java, and how to invoke them.

    If you’re wondering “what can I do with bit-shifting”, then that’s not Java specific, and since it’s a low-level technique I’m not aware of any list of “cool things you can” do per se. It’d be worth becoming familiar with the definitions, and keeping your eyes open for other code where this is used, to see what they’ve done.

    Note that often bit-twiddling is an efficiency gain at the expense of clarity. For example, a << 1 is usually the same as a * 2 but arguably less clear. Repeated XORs can swap two numbers without using a temporary variable, but it’s generally considered better form to write the code more clearly with the temporary variable (or even better, in a utility method). So in this respect it’s hard to give great examples, because you’re not likely to achieve anything new or profound on an architecture level; it’s all about the low-level details. (And I’d estimate that a vast number of uses of bit-twiddling “in the wild” are instances of premature optimisation.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i would by thankful for an official link (and section) of the specification for
Would it not make sense to support a set of languages (Java, Python, Ruby,
Would having a nice little feature that makes it quicker to write code like
Would it suppose any difference regarding overhead to write an import loading all the
I always thought that replacing the <center> tag with <div style=text-align:center;> will get me
I would be thankful for any help on this: I want to write an
I would be thankful for any help! I'm using the following code to create
I observed the following and would be thankful for an explanation. $amount = 4.56;
I would like to create a service that parses data from a feed and
I would have listview and a lot of items inside. I want that user

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.