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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:57:36+00:00 2026-06-13T05:57:36+00:00

Simple question, I have some customised java that allows to have 32 bit HW

  • 0

Simple question, I have some customised java that allows to have 32 bit HW variables.
I would like to asign such a variable a constant 32-bit value, however, this command fails
in the following scenario:

HWINTVar a = const.var(toHWint(32), 0xf1234567);

but works in this scenario:

HWINTVar a = const.var(toHWint(32), 0x11234567);

The error message in the first case is that a critical number of bits can be lost in constant values, and the reason for this is that the constants that I am passing to this method are signed. Is there a simple way how I can tell in Java to interpret this constant value as unsigned values? I tried:

 HWINTVar a = const.var(toHWint(32), (unsigned int) 0xf1234567);
 HWINTVar a = const.var(toHWint(32), (unsigned integer) 0xf1234567);

but this obvioulsy cant work in Java as it does not support unsigned data types. Any idea how this could be done?

Cheers!

  • 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-13T05:57:37+00:00Added an answer on June 13, 2026 at 5:57 am

    The only way to represent that constant correctly is as a long literal, i.e. 0xf1234567L

    Assuming you are able, change the definition of const.var so that it takes a long for its second parameter, and extract the bottom 32 bits to put them in your HWINTVar.

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

Sidebar

Related Questions

greetings, i have a simple question. I have some page that i use for
I have a (somewhat) simple question about android. I have some classes that contain
Hello i have a very simple question, I have initialized some variables and started
Pretty simple question. I have a few ASP RequiredFieldValdators checking some text boxes. Out
I have public site with some forms. Simple question: What kind of informations should
Question simple and quick: I have started to use Netbeans to write some code
simple question maybe but can't find solution. I have button for refresh/update some contents
A simple question I'm sure, but I can't figure it out. I have some
I have a simple question. In my app, I have a some buttons for
My question is simple: if I have some class Man and I want to

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.