Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am trying to figure out the cpu speed for an AIX box. The CPU speed is given in HEX. How can I convert HEX to a decimal number? Is there a function?

First, remember that the hex digits A - F have the values 10 - 15 (A=10, B=11...F=15).
Then, number the columns from right to left starting with zero.
Then calculate the value of each digit and add them together. If x is the column number, you calculate the value of a column with
digit * 16^x
So, for the hex value 3AE:E = 14 * 16^0 = 14 * 1 = 14
A = 10 * 16^1 = 10 * 16 = 160
3 = 3 * 16^2 = 3 * 256 = 768
15 + 160 + 768 = 943
For $15 or less you can buy a calculator that does hex, octal and binary math in addition to decimal.

I think you'll find there is a Hex calculator in the Scientific mode of the Windows calculator.
I've tried it and it works fine.

Why so complicated?
$ bc
ibase=16
ABC
2748or the other way round
$ bc
obase=16
1000
3E8I would imagine bc was part of AIX.

Or from my earlier post, as LANkrypt0 referenced, ksh has built-in support for very easy base conversions, such as:
((mydec=16#$myhex))

![]() |
Suse Live eval
|
installation
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |