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 7866501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:25:09+00:00 2026-06-03T00:25:09+00:00

The code that I can’t understand does this : int decodeTimeStampByte(final byte timeByte) {

  • 0

The code that I can’t understand does this :

int decodeTimeStampByte(final byte timeByte) {
   return timeByte & (~64);
}

So for instance, if I get the byte 4c (which is ASCII L), what exactly would the above function do to it? How about the byte 44?

  • 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-03T00:25:11+00:00Added an answer on June 3, 2026 at 12:25 am

    The ‘~’ is bitwise ‘not’, so 64 = 0x40 = 0100000b and ~64 = 1011111b (the lower 5 bits set).

    Then ‘&’ is bitwise ‘and’ and it leaves just the 5 lower bits of timeByte. So, basically, it is a truncation of timeByte to 0..63 range.

    decodeTimeStampByte(4c) = 0xC (12)

    decodeTimeStampByte(44) = 44

    P.S. Yes, I forgot the higher bits. ~64 = 1011111b.

    It is either a bug in the code or some intention to leave the sign bit (the 7-th bit) in place.

    P.P.S. Seems like an ancient bit-hack to squeeze some more performance

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

Sidebar

Related Questions

i have this code that can do fast search on database. it works excellent
I have this code that can't send a Facebook request until now. NSDictionary *firstDict
by default the recent pages code that can be found does not do what
I have this line of code that can throw null exceptions. singleAddress.FullAddress = cc.MailingAddressStreet1.ToString()
I am using this code to create an Alarm in a activity that can
I am writing some code that can migrate some device persisted data to a
Is there any program code that can help me to pop up the virtual
Can anybody give an example of c++ code that can easily convert a decimal
Can I write a C++ code that can be compiled and used for extending
I have a section of code that can be summarised as follows; void MyFunc()

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.