Operating System - HP-UX
1833178 Members
2971 Online
110051 Solutions
New Discussion

Re: Decoding hex decimal address

 
SOLVED
Go to solution
A.Vishwanath_2
Advisor

Decoding hex decimal address

Can you pls help me to decode the following hexadecimal address 0x1f5d0400.

TIA
Vishwanath
7 REPLIES 7
harry d brown jr
Honored Contributor

Re: Decoding hex decimal address

526,189,568

live free or die
harry
Live Free or Die
Jose Mosquera
Honored Contributor

Re: Decoding hex decimal address

Hi,

Open your windows calculator, scientific view, set into Hex mode, paste 1f5d0400 and change to Dec mode. That's all.

You must obtain 526189568.

Rgds.
SAHA
Honored Contributor

Re: Decoding hex decimal address

How it works:

(1x16^7+15x16^6+5x16^5+13x16^4+0x16^3+4x16^2+0x16^1+0x16^0)=526189568


a=10
b=11
c=12
d=13
e=14
f=15

Thanks,
You must PASS failure on way to success !!!
harry d brown jr
Honored Contributor

Re: Decoding hex decimal address

or better :

# perl -e 'print 0x1f5d0400,"\n";'
526189568
#

live free or die
harry
Live Free or Die
Mark Grant
Honored Contributor

Re: Decoding hex decimal address

It's a sort of British racing green with two zeros's at the end which probably signifies "white".

The above two posts are acurate if you wish to "decode" your hex number to decimal. However, you haven't actually specified this so I've assumed you want to decode it to a colour instead.
Never preceed any demonstration with anything more predictive than "watch this"
Fabio Ettore
Honored Contributor
Solution

Re: Decoding hex decimal address

Hi,

I would guess that you refer to SCSI resets in syslog.log where you see 0x1f5d0400.
If it is so then I can say you:

1f = it is a device of class DISK
5d = bus 'I don't know what is the exact number'
04 = target 'it should be 4'
00 = lun 0

Definitively it should be something like
/dev/dsk/cXt4d0.

Is that your problem?

Best regards,
Ettore
WISH? IMPROVEMENT!
Bruno Ganino
Honored Contributor

Re: Decoding hex decimal address

Hi Vishwanath
The following example shows how you may convert from decimal to hex using the bc command.

user@hpux> bc
ibase=10
obase=16
2012933361
77FAECF1



In the preceding 2012933361 is the decimal value, and 77FAECF1 is the hexadecimal equivalent.
Use Ctrl-D or your End-of-File character to exit bc

Bruno
Torino (Turin) +2H