Skip to content

Instantly share code, notes, and snippets.

@primaryobjects
Last active July 25, 2025 23:55
Show Gist options
  • Save primaryobjects/2d54f43846abdeede46080de936eebb4 to your computer and use it in GitHub Desktop.
Save primaryobjects/2d54f43846abdeede46080de936eebb4 to your computer and use it in GitHub Desktop.
Programming in Hex Code (Binary) using AI

Programs Written in Hex Code (Binary) with AI

The following programs were created by Claude Sonnet 4 and ChatGPT (Bing) in binary hex codes. The resulting hex codes were copied into HxD and saved to a .exe or .com file. The resulting executable was run in DOSBox.

Quick Start

  1. Install HxD or ImHex.
  2. Install DOSBox.
  3. In HxD or ImHex, select File > New. Then type 00 and delete it. Skip to step 5. You are now ready to enter code.
  4. In ImHex, select Edit > Resize and enter the value 512. You are now ready to enter code.
  5. Copy and paste any of the program hex code into the new file.
  6. Save the file as file.com.
  7. Run DOSBox.
  8. Mount a local folder to be accessible in DOSBox using the command:
    mount c c:\users\your_user_name\desktop
    c:
    
  9. Type the program name to run it, file.com

Cat

Screenshot 2025-07-25 164518 Screenshot 2025-07-25 120408

Rainbow

rainbow-pic-2 rainbow-pic

Hello

hello imhex-1
EB 4A 1B 5B 33 37 6D 20 20 20 2F 5C 20 2F 5C 0D 0A 1B 5B 33 33 6D 20 20 28 20 20 6F 2E 6F 20 20 29 0D 0A 1B 5B 33 31 6D 20 20 3E 20 5E 20 5E 20 3C 0D 0A 1B 5B 33 34 6D 20 20 20 20 20 56 0D 0A 1B 5B 33 32 6D 20 20 2F 7E 7E 7E 7E 7E 5C 0D 0A 1B 5B 33 32 6D 20 28 28 20 20 20 20 20 29 0D 0A 1B 5B 33 32 6D 20 20 5C 5F 5F 5F 5F 5F 2F 0D 0A 1B 5B 30 6D 24 B4 09 BA 02 01 CD 21 B4 4C CD 21
EB 42 1B 5B 33 33 6D 20 20 2F 5C 5F 5F 5F 2F 5C 0D 0A 1B 5B 33 33 6D 2F 20 20 6F 5F 6F 20 20 5C 0D 0A 1B 5B 33 31 6D 28 20 20 20 3D 5E 3D 20 20 20 29 0D 0A 1B 5B 33 35 6D 20 20 20 5C 2F 20 56 5C 2F 0D 0A 1B 5B 33 32 6D 2F 7E 7E 7E 7E 7E 7E 7E 5C 0D 0A 1B 5B 30 6D 24 B4 09 BA 02 01 CD 21 B4 4C CD 21
EB 50 1B 5B 33 37 6D 20 20 20 20 20 20 DB 5F 5F 5F DB 0D 0A 1B 5B 33 33 6D 20 20 2F 5C 5F 5F 5F 2F 5C 0D 0A 1B 5B 33 33 6D 2F 20 20 6F 5F 6F 20 20 5C 0D 0A 1B 5B 33 31 6D 28 20 20 20 3D 5E 3D 20 20 20 29 0D 0A 1B 5B 33 35 6D 20 20 20 5C 2F 20 56 20 5C 2F 0D 0A 1B 5B 33 32 6D 2F 7E 7E 7E 7E 7E 7E 7E 5C 0D 0A 1B 5B 33 32 6D 5C 5F 5F 5F 5F 5F 5F 5F 2F 0D 0A 1B 5B 30 6D 24 B4 09 BA 02 01 CD 21 B4 4C CD 21
EB 2B 1B 5B 33 36 6D 28 1B 5B 33 33 6D 20 1B 5B 33 31 6D 5E 1B 5B 33 32 6D 5F 1B 5B 33 31 6D 5E 1B 5B 33 33 6D 20 1B 5B 33 36 6D 29 1B 5B 30 6D 24 B4 09 BA 02 01 CD 21 B4 4C CD 21
EB 4A 1B 5B 33 37 6D 20 1B 5B 33 37 6D 20 1B 5B 33 31 6D 2F 1B 5B 33 31 6D 5C 1B 5B 33 37 6D 20 1B 5B 33 37 6D 20 1B 5B 33 37 6D 20 1B 5B 33 31 6D 2F 1B 5B 33 31 6D 5C 0D 0A 1B 5B 33 33 6D 28 1B 5B 33 33 6D 20 1B 5B 33 31 6D 6F 1B 5B 33 31 6D 2E 1B 5B 33 31 6D 6F 1B 5B 33 33 6D 20 1B 5B 33 33 6D 29 0D 0A 1B 5B 30 6D 24 B4 09 BA 02 01 CD 21 B4 4C CD 21
B4 09 BA 0E 01 CD 21 B4 00 CD 21 EB FE 0D 0A 48 65 6C 6C 6F 0D 0A 24 00
EB 2B 1B 5B 33 31 6D 52 1B 5B 33 33 6D 41 1B 5B 39 33 6D 49 1B 5B 33 32 6D 4E 1B 5B 33 34 6D 42 1B 5B 33 35 6D 4F 1B 5B 39 35 6D 57 1B 5B 30 6D 24 B4 09 BA 02 01 CD 21 B4 4C CD 21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment