×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# simple question

## simple question

(OP)
Hi,

I am very new in c++ so excuse me for my question.

Please sb kindly tell me what does the below sentence means?

#### CODE

static const unsigned int d1=0xDEADBEEF ^ (0x1fc4ce47*(d^(d>>13)));

If I want to write a description for this so any programmer no matter what kind of language he or she uses can implement this, what should I say?

Kind regards,

### RE: simple question

(OP)
Sorry I also have another question:

#### CODE

static const unsigned int oWeylOffset=0x8009d14b;

what does the above expression means?

I know the whole meaning of that, my question arises from that I have read that:

unsigned int is 4 Bytes precision but the above number is more than the range of 4 bytes precision integer it is something like 16 Bytes.

You know the problem is that I am a Fortran programmer and here at c++ I am totally confused. If I want to write the above expression in Fortran
Writing the 4 bytes precision is not working

#### CODE

Integer(Kind = 4), Parameter :: oWeylOffset = Z'8009d14b'

So, I have to write :

#### CODE

Integer(Kind = 16), Parameter :: oWeylOffset = Z'8009d14b'

less than this precision the code will be stopped with error.

Any idea? Please help me through this, as the manual says that unsigned int is 4 Bytes precision, how is it possible.

Cheers,

### RE: simple question

Hi

That value perfectly feets 4 bytes :
static const unsigned int oWeylOffset=0x8009d14b;

4 bytes can hold values in range 0..4 294 967 295, more than enough for 2 148 127 051.

#### Quote (ya0037):

Now after your second question I have the feeling you are confused by C's hexadecimal notation. The "0x" prefix means the following number is represented in base 16. So 0xDEADBEEF = 3 735 928 559 and 0x1fc4ce47 = 532 991 559.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!