Skip to main content Skip to local navigation

A Binary File Editor for My Students

ImHex editor logo.
ImHex editor logo.

As I ponder fun activities to do with my 2nd year computer architecture students it has become clear to me that I need them to be able to view binary files. There are a number of editors out there capable of doing this, but I don't want to foist vim or emacs on them. Nor do I want to use a proprietary program. The ideal program is one that

  1. is open source,
  2. has a graphical front end
  3. is compatible with Windows, macOS and Linux, and
  4. has a way of disassembling binaries.

The ImHex editor fits the bill. It even has an online version and a GitHub page. The on-machine version contains a little tutorial when you fire it up for the first time... although the first time you do the OS may block you. Try again.

The program has add-ons that include disassemblers. You can access the disassemblers via the View -> Disassemblers menu.

Wow.

Disassembler window in ImHex can disassemble a RISC-V binary file.
Disassembler window in ImHex can disassemble a RISC-V binary file.

It also seems to be able to disassemble 16-bit 8086 binary files like the ones used by CoreWars 8086 (project page) and output by NASM (online).

This won't replace architecture-specific IDEs like Segger's Embedded Studio, Microchip's MPLAB X or NXP's MCUXpresso or general-purpose tools like VS Code, but it's a handy tool for examining binaries, nibble by nibble.


a pen

James Andrew Smith is a Professional Engineer and Associate Professor in the Electrical Engineering and Computer Science Department of York University’s Lassonde School, with degrees in Electrical and Mechanical Engineering from the University of Alberta and McGill University.  Previously a program director in biomedical engineering, his research background spans robotics, locomotion, human birth, music and engineering education. While on sabbatical in 2018-19 with his wife and kids he lived in Strasbourg, France and he taught at the INSA Strasbourg and Hochschule Karlsruhe and wrote about his personal and professional perspectives.  James is a proponent of using social media to advocate for justice, equity, diversity and inclusion as well as evidence-based applications of research in the public sphere. You can find him on Twitter.  You can find him on BlueSky. Originally from Québec City, he now lives in Toronto, Canada.