Binary & Firmware
Related Interactive Tool: Try this workflow directly in your browser.
Open Tool →
Whether you are recovering a bricked laptop BIOS chip, cloning a satellite receiver EEPROM, or flashing an STM32/AVR microcontroller on a workbench, two file formats sit at the center of every hardware programmer: raw Binary (.BIN) and Hexadecimal (.HEX). Understanding how flash programmers interpret these files—and how to convert safely between them without introducing address drift or checksum errors—is essential for every electronics technician and embedded developer.
1. Raw .BIN vs. Intel .HEX: Why Both Exist
A .BIN file is a literal, gapless mirror of flash memory starting at address 0x00000000. If your Winbond W25Q64 SPI NOR flash chip holds 8 megabytes (64 Mbit), its raw dump is exactly 8,388,608 bytes—no addresses, no metadata, and no checksums. By contrast, Intel HEX (.hex) encodes binary data into human-readable ASCII lines starting with a colon (:), carrying byte count, 16-bit load address, record type, hex payload, and a two's-complement verification checksum at the end of every line.
# Anatomy of a single Intel HEX record: :10 0100 00 214601360121470136007EFE09D21901 40 | | | | +-- Checksum (0x40) | | | +------------------------------------ 16 Data Bytes | | +--------------------------------------- Record Type (00 = Data) | +------------------------------------------- 16-bit Offset (0x0100) +----------------------------------------------- Byte Count (0x10 = 16 bytes) 2. Hardware Programmers & Common Chip Sizes
Bench technicians using CH341A, XGecu TL866II Plus / T48, RT809H, or ST-Link V2 constantly verify dump sizes before erasing a chip:
- 24C02 / 24C64 I2C EEPROMs: 256 bytes to 8 KB (TV settings, automotive immobilizer/airbag modules).
- W25Q32 / MX25L32 (32 Mbit SPI NOR): Exactly
4,194,304bytes (routers, DVB-S2 receivers). - W25Q64 (64 Mbit SPI NOR): Exactly
8,388,608bytes (older laptop UEFI BIOS, smart TVs). - W25Q128 (128 Mbit SPI NOR): Exactly
16,777,216bytes (modern laptop BIOS + Intel ME region).
3. Step-by-Step Safe EEPROM Read, Patch & Flash Workflow
- Double-Read Before Erasing: Always read the target chip twice with your programmer and compare SHA-256 hashes. If the two reads differ, your SOIC-8 test clip has poor pin contact—never erase the chip until two consecutive reads match 100%.
- Inspect Header & Strings Locally: Drop your backup dump into our BIN to HEX Converter to inspect the opening bytes (confirming it is not all
FF FF FF FFor00 00 00 00), and check firmware versions using BIN to TXT. - Preserve Device-Specific Calibration Blocks: Before flashing a donor dump onto a router or motherboard, note the offsets of your original MAC address, serial number, and Wi-Fi ART calibration partition so you can transplant them intact.
- Pad Unused Flash with 0xFF: Erased NOR flash bits default to logic
1(0xFF), not0x00. When converting sparse HEX ranges into a flat BIN, padding gaps with0xFFavoids unnecessary flash wear.
4. Embedding Binary Blobs in Arduino & ESP32 C Code
If your goal is compiling a binary asset (like an OLED bitmap or gzipped web dashboard) directly into microcontroller flash rather than writing an external EEPROM, use our BIN to C / H Array Converter to emit a ready-to-include const unsigned char[] header with exact byte length.
5. Real-World Repair Case Study: Recovering a Bricked SPI BIOS Chip
Consider a classic laptop motherboard repair scenario: a Windows BIOS update loses power midway, leaving the laptop with a black screen and spinning fans. Desoldering or clipping onto the 8-pin Winbond W25Q64FV SPI NOR chip with a CH341A or XGecu T48 programmer yields an 8,388,608-byte .bin dump. When you open the vendor's official update package, however, it ships as an Intel .hex file or a .cap UEFI capsule that is 2,048 bytes larger than the physical flash chip.
Writing that oversized capsule straight to the SPI chip shifts the entire Intel Flash Descriptor (5A A5 F0 0F) by 0x800 bytes, guaranteeing a dead board. By inspecting the opening bytes in our BIN / HEX Workbench, confirming exact alignment against your original backup dump, and verifying that the DMI/serial block and Intel Management Engine (ME) region sit at their proper offsets, you produce a clean 8,388,608-byte flashable binary on the first attempt.
6. Frequently Asked Questions on EEPROM & Firmware Conversion
Why does my 3.3V SPI chip read all 0xFF on a CH341A? Many unmodded black-PCB CH341A programmers output 5V logic on data pins while supplying 3.3V VCC, or fail to power the chip in-circuit when the motherboard's standby rail draws current. Always use a 1.8V adapter for 1.8V chips (like W25Q64FW) and desolder the chip if in-circuit reads fail verification.
Can I convert Motorola S-Record (.s19/.srec) files the same way? S-Records use S1/S2/S3 line prefixes rather than Intel HEX colons (:). Convert to flat binary with objcopy -I srec -O binary or inspect the raw byte offsets directly in hex before flashing.
How do I check if a satellite receiver .bin dump is encrypted? Run it through our BIN to TXT Extractor: unencrypted Sunplus, ALi, or GX6605S dumps reveal clear bootloader prompts and channel-table strings, whereas encrypted updates show high-entropy binary blocks with zero readable headers.
7. Advanced Bench Checklist: Voltage Levels, Write Protection & Verification
Before powering any SPI NOR or I2C EEPROM programmer on your bench, run through four physical checks that prevent permanent silicon damage. First, verify the exact VCC rating printed on the chip datasheet—modern laptop UEFI chips ending in FW or JW operate strictly at 1.8V, whereas older FV/BV chips run at 3.3V. Applying 3.3V directly to a 1.8V flash chip destroys its internal charge pump instantly. Second, inspect the status registers (SR1/SR2) if your programmer throws a write-verify failure; hardware Write Protect (WP#) or Block Protect bits (BP0–BP2) lock specific boot sectors until explicitly cleared in software.
Third, keep a clean folder hierarchy naming every dump with board model, chip part number, and date (for example, ThinkPad_T480_W25Q128FV_orig_20261120.bin) alongside a companion SHA-256 hash file. Finally, when patching raw hex regions or converting dumps with our DUMP to BIN / HEX Tool and ROM to BIN Converter, confirm that the final byte count matches the exact flash boundary down to the last byte before clicking Program.
Try the Free Interactive Tool
Put this guide into practice immediately—no signup or installation required:
Launch BIN to HEX / HEX to BIN on Adawaty Pro ->
Originally published at Adawaty Pro.
