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

  • SEARCH
  • Home
  • 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 8993911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:18:08+00:00 2026-06-15T23:18:08+00:00

Can anybody please explain what is happening below;how does the following bit shift works?

  • 0

Can anybody please explain what is happening below;how does the following bit shift works?

Dim pBuffer(11) As Int 
                pBuffer(0)=4 
                'Firmware Version'
                pBuffer(1)=Bit.ShiftRight(Bit.And(firmware_version, 0xFF00),8)
                pBuffer(2)=Bit.And(firmware_version, 0xFF)

Consider firmware_version = 0001

What will be the equivalent java code for this? Can I use Bit.ShiftRight in java? I checked the Java classes and didnt quite understand what will be the equivalent ‘Bit.ShiftRight’ operation in java?

EDIT: Can you explain what exactly is happening here?

pBuffer(1)=Bit.ShiftRight(Bit.And(firmware_version, 0xFF00),8)

How is the AND performed and the bit shift? What is it performed on? Is firmware_version AND 0xFF00 or is it bit shift first? Can you please explain?

  • 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-06-15T23:18:09+00:00Added an answer on June 15, 2026 at 11:18 pm

    VB.NET: Bit.ShiftRight(Bit.And(firmware_version, 0xFF00),8)

    (Bitwise-and of firmware_version and 0xFF00 is shifted right 8 times)

    Java  : (firmware_version & 0xFF00) >> 8 //or >>> for unsigned right-shift
    

    VB.NET: Bit.And(firmware_version, 0xFF)

    Bitwise And of firmware_version with 0xFF

    Java  : (firmware_version & 0xFF)
    

    The & operator in Java performs a bitwise AND operation.

    (Reference)

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

Sidebar

Related Questions

I am new to python,can anybody please explain the following syntax, for i in
Can anybody explain the following Perl code for me, please? I think its in
Can anybody explain me the following code. I did not understand what % does.
Can anybody please explain the following line about the designated initializers: The initializer list
can anybody please explain what are these special tags in php? <?= ?> I
Can anybody please explain multitask learning in simple and intuitive way? May be some
Can anybody please explain how this could possibly happen? I am completely aware of
please can anybody explain this code from C++ Reference site : #include <iostream> #include
Can anybody please explain the meaning of $< and $@ in a Makefile ?
Timestamp is optional parameter, so please can anybody to explain difference between timestamped exe-file

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.