Re: Is there a tool to convert decimal/octal/hex ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Tue, Jun 01, 2004 at 11:46:21AM -0600, clemens@xxxxxxx wrote:
> > I seem to remember that there used to be a tool in Linux to
> > convert between decimal and octal and Hex, but I havent 
> > stumbled over it in my recent search.
> 
> There are plenty of open source programs like "hexcalc" which you
> can run on X displays, or desktop accessories for Gnome or KDE.
> Follow your menu bar...
> 
> However, the old school way is to use "dc", the UNIX "desktop
> calculator".  It uses Reverse Polish Notation, so some prefer "bc"
> instead (which historically was just a front end to dc).  These are
> probably on almost every variant of UNIX out there.
> 
> Example:
> 
> sprite;~[102]> dc
> 33 16 o p
> 21
> 16 i A o FFFF343 p
> 268432195
> 
> Remember, the UNIX folks of 30 years ago had 10 cps teletypes, so
> terseness was a great virtue.  The same in bc:
> 
> sprite;~[103]> bc
> obase=16
> 33
> 21
> ibase=16
> obase=A
> FFFF343
> 268432195
> 
> Note that hex numbers require capital A-F, since the lowercase
> versions denote some internal operations in bc.
> 
> Romain
> 
> 
Bingo.
Thanks, that will do it.
I remember having an old hex calculator, but thinking back, bc is
the way I did it.

Which is good, since I dont use gnome (which has been suggested)

Thanks again.
-- 
                                        Reg.Clemens
                                        reg@xxxxxxx




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux