Firmware work lives in hexadecimal: flash addresses, region boundaries, register values and file offsets are all written as hex. Datasheets mix in binary for register bits, and file sizes appear in decimal. This converter switches between the four bases and handles numbers far larger than a typical calculator, so a 32 MB flash address is no problem.
How to use it
- Type the number. With Detect from prefix,
0xmeans hex,0bbinary,0ooctal and plain digits decimal; a trailingh(7FFFFFh) is also read as hex. - Or choose the base explicitly.
- Read the value in all four bases, the number of bits it needs and, for sizes, the byte count.
Binary output is grouped in fours so each group matches one hex digit.
Why hex is used for addresses
One hex digit is exactly four bits, so hex lines up with the binary structure of memory. Flash regions start on round hex boundaries such as 0x1000 or 0x500000, and sizes such as 0x1000000 (16 MB) are easier to recognise than 16,777,216. The last address of a chip is its size minus one: a 16 MB chip ends at 0xFFFFFF. Chip sizes are covered by SPI Flash Size Calculator (BIOS Chip Mbit to MB).
Worked example: a region in a hex editor
A flash descriptor shows the BIOS region from 0x00500000 to 0x00FFFFFF. In decimal the start is 5,242,880 and the region spans 11,534,336 bytes — 11 MB. Converting the start address lets you jump to it in a hex editor that wants decimal offsets, and confirms that the region ends at the very last byte of a 16 MB chip. The descriptor itself is explained in The Intel Flash Descriptor: Regions, Locks and Why It Matters.
Reading register bits
Datasheets for SPI flash and charger ICs describe registers bit by bit. A status register value of 0x9C is 1001 1100 in binary: bits 2, 3, 4 and 7 are set. In SPI flash, bits like these are often block-protection and write-protect flags, which matter when a programmer cannot write a chip; see SPI Flash Write Protection and Status Register Bits.
FAQ
What does the h suffix mean?
Some tools and datasheets write hex as 7FFFFFh instead of 0x7FFFFF. Both mean the same.
Why does 0x1000000 equal 16 MB?
0x1000000 is 2²⁴ = 16,777,216 bytes, which is 16 × 1,048,576 — 16 MiB.
Can it handle negative numbers?
Not in two's complement form. Addresses and sizes are always positive, which is what it is built for.