Bus Pirate HEX/DEC/BIN converter

logic

See the latest version in the documentation wiki.

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
0x0A <<<HEX equivalent
10<<<DEC equivalent
0b00001010<<<BIN equivalent
HiZ>=<<<HEX/DEC/BIN converter command
CONVERT (1) >0xf
0x0F
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
0x00 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:

Join the Conversation

3 Comments

  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.

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

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.