Bin Conversions
Results 1 to 5 of 5

Thread: Bin Conversions

  1. #1

    Bin Conversions

    I know this topic is practically overused, but here's my version. It includes Octal which seems rarely included, but it is used in some dumps. Had to learn some octal for my Cobol(*nightmare*) class, don't ask. But anyways, i attached it.

  2. #2
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,884
    Not to bad. You don't see octal because it really isn't used much anymore. Unles of course you want to progam in Cobol. That was such a fun class Or something like that.

    BTW> convering everything to binary then to decimal works, but is not the "proper" way to do it. Someone mentioned this in the other thread on hex to dec.

    The proper way for octal is
    (#*8^x)+(#*8^x)+.......+(#)
    Where # is the digit, and X is the colum number with the far right column =0
    and for hex is...
    (#*16^x)+(#*16^x)+.......+(#)
    and of course binary....
    (#*2^x)+(#*2^x)+.......+(#)

    That is a lot easier to remember then a giant table of numbers...
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

  3. #3
    I realize it's not the proper way, but I'm not a math person, and it's easier for me to convert 1 hex digit to 4 bits, then to think and do math.


    ---Aku. Soku. Zan.

  4. #4
    AO Antique pwaring's Avatar
    Join Date
    Aug 2001
    Posts
    1,409
    Octal is useful if you're working in a *nix environment, since the file permissions are mapped to octal e.g. 777 gives everyone rwx (read, write, execute) access, whereas 700 denies access to anyone except the owner of the file (and root of course).

    If you have a calculator on hand and want to convert large numbers, then the way souleman suggests is the most useful. However, when working everything out by hand it is easier to convert to binary as a middle step (unless of course you are converting to/from binary anyway, in which case it's even easier).
    Paul Waring - Web site design and development.

  5. #5
    AntiOnline Senior Member souleman's Avatar
    Join Date
    Oct 2001
    Location
    Flint, MI
    Posts
    2,884
    [quote]Octal is useful if you're working in a *nix environment, since .....{/quote]
    Good point.. although it is just as easy thinking decimal or hex in that case, since it is always 0 to 7.

    I was just telling the "proper" way to convert from xxx to dec. Going to bin first is always easier if you are doing it by hand....
    \"Ignorance is bliss....
    but only for your enemy\"
    -- souleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides