Hex, decimal and binary conversion... make it simple

hugoxp1

Member
Hi,


Maybe I will say something that for most of the users is "is already more than well known"... but for those like me... I'll post any way :)

When I was "googling" on the internet for a converter online from decimal to binary and to hex I've found that the only thing that we need is to use the windows calculator in scientific mode (win 7 is the "programing mode") and if we write a decimal value we only need to click in the radio buttons Hex, Bin... to convert that decimal value in Hex, Bin...etc and vice versa...
 

John West

Senior Member
It's certainly well known to me, and I expect to a lot of others here as well. But it one of those things that is not intuitively obvious. One must dig to find it. Therefore, spreading the word on it is a good Idea. Thanks.
 

Dippy

Moderator
I use the calculator conversion quite a lot - though I would prefer it if leading zero padding for the binary and 4bit / 8bit spacing to make it easier to read were available as options. (You 'll see what I mean if you look at Westy's table. )

A couple of compilers I use have an optional always-on-top ASCII/Hex/Dec/Bin table which is handy too.
 

westaust55

Moderator
If you want leading zeros shown, then one way is to do the calculation in Excel and set the cell format as "custom" and "0000"
 

Dippy

Moderator
Yuk,fire up Excel..? Should be an Editor/Compiler tool really.

Come on Westy write us a little executable/installable so we can have a floating conversion calculator ;)
 

Technical

Technical Support
Staff member
...I've found that the only thing that we need is to use the windows calculator in scientific mode (win 7 is the "programing mode") and if we write a decimal value we only need to click in the radio buttons Hex, Bin... to convert that decimal value in Hex, Bin...etc and vice versa...
This is exactly why there is a Calculator shortcut on the View menu within Programming Editor....
 

John West

Senior Member
I'd pulled that down and looked it over when I first installed the PE. I said "Hey, this is really well thought out." Then I immediately forgot about it. Sigh.
 

Jamster

Senior Member
i found "borrowing" someones calculator and putting it in to binary mode is a great april fools joke, expecially if they have maths!
 

Janne

Senior Member
i found "borrowing" someones calculator and putting it in to binary mode is a great april fools joke, expecially if they have maths!
Yeah, the trick works well, as there are only 10 types of people in the world: Those who understand binary, and those who don't.
 

william47316

New Member
i have a text file with all 8 bit bin hex and octal values and the ascii character and a short description
Code:
based on the terminal font this text file shows each character code as a text character
                        alt+      gives you
bin            hex    oct    dec    ASCII char    description or key
00000000        00    0    0
00000001        01    1    1    
00000010        02    2    2    
00000011        03    3    3    
00000100        04    4    4    
00000101        05    5    5    
00000110        06    6    6    
00000111        07    7    7    
00001000        08    10    8    
00001001        09    11    9
00001010        0A    12    10
00001011        0B    13    11
00001100        0C    14    12
00001101        0D    15    13
00001110        0E    16    14    
00001111        0F    17    15    
00010000        10    20    16    
00010001        11    21    17    
00010010        12    22    18    
00010011        13    23    19    
00010100        14    24    20    
00010101        15    25    21    
00010110        16    26    22    
00010111        17    27    23    
00011000        18    30    24    
00011001        19    31    25    
00011010        1A    32    26    
00011011        1B    33    27    
00011100        1C    34    28
00011101        1D    35    29
00011110        1E    36    30
00011111        1F    37    31
00100000        20    40    32     < >
00100001        21    41    33    !
00100010        22    42    34    "
00100011        23    43    35    #
00100100        24    44    36    $
00100101        25    45    37    %
00100110        26    46    38    &
00100111        27    47    39    '
00101000        28    50    40    (
00101001        29    51    41    )
00101010        2A    52    42    *
00101011        2B    53    43    +
00101100        2C    54    44    ,
00101101        2D    55    45    -
00101110        2E    56    46    .
00101111        2F    57    47    /
00110000        30    60    48    0
00110001        31    61    49    1
00110010        32    62    50    2
00110011        33    63    51    3
00110100        34    64    52    4
00110101        35    65    53    5
00110110        36    66    54    6
00110111        37    67    55    7
00111000        38    70    56    8
00111001        39    71    57    9
00111010        3A    72    58    :
00111011        3B    73    59    ;
00111100        3C    74    60    <
00111101        3D    75    61    =
00111110        3E    76    62    >
00111111        3F    77    63    ?
01000000        40    100    64    @
01000001        41    101    65    A
01000010        42    102    66    B
01000011        43    103    67    C
01000100        44    104    68    D
01000101        45    105    69    E
01000110        46    106    70    F
01000111        47    107    71    G
01001000        48    110    72    H
01001001        49    111    73    I
01001010        4A    112    74    J
01001011        4B    113    75    K
01001100        4C    114    76    L
01001101        4D    115    77    M
01001110        4E    116    78    N
01001111        4F    117    79    O
01010000        50    120    80    P
01010001        51    121    81    Q
01010010        52    122    82    R
01010011        53    123    83    S
01010100        54    124    84    T
01010101        55    125    85    U
01010110        56    126    86    V
01010111        57    127    87    W
01011000        58    130    88    X
01011001        59    131    89    Y
01011010        5A    132    90    Z
01011011        5B    133    91    [
01011100        5C    134    92    \
01011101        5D    135    93    ]
01011110        5E    136    94    ^
01011111        5F    137    95    _
01100000        60    140    96    `
01100001        61    141    97    a
01100010        62    142    98    b
01100011        63    143    99    c
01100100        64    144    100    d
01100101        65    145    101    e
01100110        66    146    102    f
01100111        67    147    103    g
01101000        68    150    104    h
01101001        69    151    105    i
01101010        6A    152    106    j
01101011        6B    153    107    k
01101100        6C    154    108    l
01101101        6D    155    109    m
01101110        6E    156    110    n
01101111        6F    157    111    o
01110000        70    160    112    p
01110001        71    161    113    q
01110010        72    162    114    r
01110011        73    163    115    s
01110100        74    164    116    t
01110101        75    165    117    u
01110110        76    166    118    v
01110111        77    167    119    w
01111000        78    170    120    x
01111001        79    171    121    y
01111010        7A    172    122    z
01111011        7B    173    123    {
01111100        7C    174    124    |
01111101        7D    175    125    }
01111110        7E    176    126    ~
01111111        7F    177    127
10000000        80    200    128    &#8364;
10000001        81    201    129
10000010        82    202    130    &#8218;
10000011        83    203    131    &#402;
10000100        84    204    132    &#8222;
10000101        85    205    133    &#8230;
10000110        86    206    134    &#8224;
10000111        87    207    135    &#8225;
10001000        88    210    136    &#710;
10001001        89    211    137    &#8240;
10001010        8A    212    138    &#352;
10001011        8B    213    139    &#8249;
10001100        8C    214    140    &#338;
10001101        8D    215    141
10001110        8E    216    142    &#381;
10001111        8F    217    143
10010000        90    220    144
10010001        91    221    145    &#8216;
10010010        92    222    146    &#8217;
0010011        93    223    147    &#8220;
10010100        94    224    148    &#8221;
10010101        95    225    149    &#8226;
10010110        96    226    150    &#8211;
10010111        97    227    151    &#8212;
10011000        98    230    152    &#732;
10011001        99    231    153    &#8482;
10011010        9A    232    154    &#353;
10011011        9B    233    155    &#8250;
10011100        9C    234    156    &#339;
10011101        9D    235    157
10011110        9E    236    158    &#382;
10011111        9F    237    159    &#376;
10100000        A0    240    160
10100001        A1    241    161    ¡
10100010        A2    242    162    ¢
10100011        A3    243    163    £
10100100        A4    244    164    ¤
10100101        A5    245    165    ¥
10100110        A6    246    166    ¦
10100111        A7    247    167    §
10101000        A8    250    168    ¨
10101001        A9    251    169    ©
10101010        AA    252    170    ª
10101011        AB    253    171    «
10101100        AC    254    172    ¬
10101101        AD    255    173
10101110        AE    256    174    ®
10101111        AF    257    175    ¯
10110000        B0    260    176    °
10110001        B1    261    177    ±
10110010        B2    262    178    ²
10110011        B3    263    179    ³
10110100        B4    264    180    ´
10110101        B5    265    181    µ
10110110        B6    266    182    ¶
10110111        B7    267    183    ·
10111000        B8    270    184    ¸
10111001        B9    271    185    ¹
10111010        BA    272    186    º
10111011        BB    273    187    »
10111100        BC    274    188    ¼
10111101        BD    275    189    ½
10111110        BE    276    190    ¾
10111111        BF    277    191    ¿
11000000        C0    300    192    À
11000001        C1    301    193    Á
11000010        C2    302    194    Â      
11000011        C3    303    195    Ã
11000100        C4    304    196    Ä
11000101        C5    305    197    Å
11000110        C6    306    198    Æ
11000111        C7    307    199    Ç
11001000        C8    310    200    È
11001001        C9    311    201    É
11001010        CA    312    202    Ê
11001011        CB    313    203    Ë
11001100        CC    314    204    Ì
11001101        CD    315    205    Í
11001110        CE    316    206    Î
11001111        CF    317    207    Ï
11010000        D0    320    208    Ð
11010001        D1    321    209    Ñ
11010010        D2    322    210    Ò
11010011        D3    323    211    Ó
11010100        D4    324    212    Ô
11010101        D5    325    213    Õ
11010110        D6    326    214    Ö
11010111        D7    327    215    ×
11011000        D8    330    216    Ø
11011001        D9    331    217    Ù
11011010        DA    332    218    Ú
11011011        DB    333    219    Û
11011100        DC    334    220    Ü
11011101        DD    335    221    Ý
11011110        DE    336    222    Þ
11011111        DF    337    223    ß
11100000        E0    340    224    à
11100001        E1    341    225    á
11100010        E2    342    226    â
11100011        E3    343    227    ã
11100100        E4    344    228    ä
11100101        E5    345    229    å
11100110        E6    346    230    æ
11100111        E7    347    231    ç
11101000        E8    350    232    è
11101001        E9    351    233    é
11101010        EA    352    234    ê
11101011        EB    353    235    ë
11101100        EC    354    236    ì
11101101        ED    355    237    í
11101110        EE    356    238    î
11101111        EF    357    239    ï
11110000        F0    360    240    ð
11110001        F1    361    241    ñ
11110010        F2    362    242    ò
11110011        F3    363    243    ó
11110100        F4    364    244    ô
11110101        F5    365    245    õ
11110110        F6    366    246    ö
11110111        F7    367    247    ÷
11111000        F8    370    248    ø
11111001        F9    371    249    ù
11111010        FA    372    250    ú
11111011        FB    373    251    û
11111100        FC    374    252    ü
11111101        FD    375    253    ý
11111110        FE    376    254    þ
11111111        FF    377    255    ÿ
 
Top