I need a decent calculator for working in Hex

Discussion in 'Mac Apps and Mac App Store' started by Xenesis, Oct 23, 2006.

  1. Xenesis macrumors regular

    Xenesis

    Joined:
    Sep 3, 2006
    Location:
    Australia
    #1
    One of my hobbies involves fiddling around with Hex editors. Now while just dabbling around is okay, I often find myself needing to convert numbers to Decimal to get my head around them.

    That being said, the OSX Calculator can do that right? Yep. But it's endlessly frustrating, because OSX Calculator doesn't allow one to type directly into hex (Eg, I wanna Write 0x0A, I have to type 10 in Dec). While this is fine for simple numbers, when I want to translate 048A3D to Dec, it's an exercise in frustration. Not to mention the amount of menu clicking to convert from Dec to Hex.

    I guess what I'm looking for is something that works in a way similar to how Windows Calculator handles Hex (Can type numbers directly into hex, one click numbering system conversion).

    Anyone got any good programs they use?
     
  2. Xenesis thread starter macrumors regular

    Xenesis

    Joined:
    Sep 3, 2006
    Location:
    Australia
    #3
    Hmm...I suppose I should have said this earlier..I'm using Panther (10.3), and hence I can't use Widgets.
     
  3. telecomm macrumors 65816

    telecomm

    Joined:
    Nov 30, 2003
    Location:
    Rome
    #4
    It's shareware (and I suspect there's freeware somewhere that'll do what you need), but PCalc might have this functionality.

    Edit: You might have a look at this too (it's freeware, but I don't know if it even supports other notations).
     
  4. Xenesis thread starter macrumors regular

    Xenesis

    Joined:
    Sep 3, 2006
    Location:
    Australia
  5. officerdick macrumors regular

    Joined:
    May 4, 2006
    #6
    i can type HEX direclty into the bundeled calculator. its a decent tool for HEX, just press Clover+3 and you gat a programmer calculator. (works in tiger donnt know if its the same in panther)
     
  6. Xenesis thread starter macrumors regular

    Xenesis

    Joined:
    Sep 3, 2006
    Location:
    Australia
  7. officerdick macrumors regular

    Joined:
    May 4, 2006
    #8
    just found this dont know if its any help

    Hidden capabilities in the Panther Calculator

    Norman Palardy

    Navigate to where the Calculator is installed (likely the Applications folder.)
    Control click the application and select "Show Package Contents."
    Navigate to Contents/Resources in the Calculator Contents. In this folder you will find:
    ExpressionSheet.calcview
    Graphing-2D.calcview
    Hexadecimal.calcview
    Move these to the Contents/Plugins folder
    Start the calculator and behold; 2d graphing, an expression worksheet mode, and a hexadecimal calculator with boolean operations
     
  8. telecomm macrumors 65816

    telecomm

    Joined:
    Nov 30, 2003
    Location:
    Rome
    #9
    So try an older version of PCalc (2.2.2), which runs on any OS beyond OS 8, and has exactly the functionality you need. Is it really that hard to figure out, it took me like 20 seconds? :rolleyes:
     
  9. savar macrumors 68000

    savar

    Joined:
    Jun 6, 2003
    Location:
    District of Columbia
    #10
    I 2nd that recommendation. It's a good calculator.
     
  10. Magnus Reftel macrumors member

    Joined:
    May 16, 2006
    #11
    Python

    When I need to work with hex (or actually doing any maths at all), I fire up the Python interactive shell. Just start a terminal and type
    python
    Any Python expression you enter there will be evaluated and displayed. Since integers are displayed in decimal, you can convert from hex to decimal by just writing your number in hex notation like so:
    0x1fff
    To convert the other way around, I usually use the string formatting operator like so:
    "%x" % (123)
    This works for all kinds of expressions, so you can do things like
    0xa000 + 100
    to get a decimal offset from a hex base in decimal or
    "%x" % (0xa000 + 100)
    to get it in hex.
     

Share This Page