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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:41:38+00:00 2026-06-01T14:41:38+00:00

i work on a 64 bit intel processor…i was learning about big and little

  • 0

i work on a 64 bit intel processor…i was learning about big and little endian and what i understood was that these are byte orderings within a word such that in a 64 bit data, msb will have lowest address in big endian form and the highest address in little endian form…now i have a problem:

I wrote this code
to determine whether my processor was little or big endian…
I input

0102030405060708 (this is in hex) 

and hoped to get 08 and 07 and 06 and… and 01 as answer

but instead got 0 and 25 and 50 and -125 and -13 and 501 and -41 and 66.
when I wrote the same code taking ‘s’ as 2 byte(short), the output for 0102 was 2 and 1 (which is in accordance with little endian)…so what went wrong here?

  • 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-01T14:41:40+00:00Added an answer on June 1, 2026 at 2:41 pm

    You are storing your input value as a double, which stores the value as a floating point value. Try using a long long instead, which is a 64 bit integer, and should store the value as you expect.

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

Sidebar

Related Questions

I initially thought that 64 bit instructions would not work on OS-X 10.5. I
I hear about it a bit in tutorials that I watch, that certain things
I have a MacBook Pro with a 64-bit Intel Core 2 Duo processor, and
I am trying to gather some details about how its possible that 32 bit
I am writing a cryptography application and need to work with 128 bit integers.
I'm in a bit of a pickle at work. My department designs a number
We have quite a bit of reusable code at work (a good thing). Whenever
Work on asp.net vs05. I have three type of value Like:IsDesign,IsPrinting,IsInstall they are bit
it works fine on 64 bit machines but for some reason will not work
I'm having a bit of trouble getting my form validation to work. As of

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.