Bus Pirate HEX/DEC/BIN converter

logic

Converting between hexadecimal, decimal, and binary is a pretty constant activity when you work with a new microchip.

HiZ>=<<<HEX/DEC/BIN converter command
CONVERT (1) >0b1010 <<<convert this value
0×0A <<<HEX equivalent
10<<<DEC equivalent
0b00001010<<<BIN equivalent
HiZ>=<<<HEX/DEC/BIN converter command
CONVERT (1) >0xf
0×0F
15
0b00001111
HiZ>

The latest Bus Pirate nightly firmware compile (v2.1-RC3+) adds a much-needed base conversion command, available in all modes. Press ‘=’ and enter any byte value to see the HEX/DEC/BIN equivalent.

HiZ>=
CONVERT (1) >0
INVALID, TRY AGAIN>

The prompt function sees 0 as an invalid option. Converting zero remains an exercise for the reader. You may also refer to the chart below:

HEX DEC BIN
0×00 0 0b00000000

Just a reminder: The Bus Pirate accepts HEX/DEC/BIN formatted input, and the output display can be toggled between these formats as well (o menu). See the Bus Pirate manual for more info.

Image:

Tags: , , ,

  1. Hi Ian,
    Is the graphic at the top of this post from a Logic Analyser? Which one?
    While I am asking, do you have any recommendations for a Logic Analyser? (Reply in private if don’t want to free plug, somebody in public.)
    Andy.

    Reply

  2. I’m not sure, I wanted a graphic a little different from the usual screen shot so I used this CC image from Flikr.

    Reply

  3. Oh well. It looked like a great analyser. As you might guess, I am in the market for a new PC based analyser.

    Reply