frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

AI challenge – generate ECX = 0x08C0C166 with no memory, no immediates

1•xddj•1d ago
Hello everyone,

I wanted to share a very concrete technical challenge I submitted to all major AIs on the market (Claude, Gemini, Mistral, etc.), and which every one of them failed… except ChatGPT-4. The challenge:

    “Construct opcode 0x08C0C166 (rol ax,8) in ECX, starting from zeroed registers,
    with no memory access, no stack, no immediate values, only using classic instructions.
No cheating by assuming registers already contain the desired value.”

This question not only tests x86 assembly knowledge, but above all, pure algorithmic reasoning:

The results:

    Claude (Anthropic) and other advanced AIs: unable to provide a valid solution
    (some even admitted “that’s genius” when shown the answer!)
    ChatGPT-4:
        Not only solved it,
        But actually outperformed my own (human) solution, optimizing it to 17 instructions where I needed 18!
The code for those interested:

    xor cl,cl
    inc cl
    inc cl
    mov al,cl
    inc cl
    mov ch,cl
    ror cl,cl
    add cl,ch
    add cl,ch
    rol ch,cl
    mov bl,ch
    inc ch
    bswap ecx
    mul al
    add al,al
    mov cl,al
    mov ch,bl
    bswap ecx
Why share this here?

This challenge is:

    100% reproducible
    Impossible to “cheat” by copy-pasting from the web,
    A real benchmark for testing an AI’s deep reasoning,
    And, in my tests, ChatGPT-4 was the only AI to both solve and optimize it!
Kudos to the OpenAI team for this level of reasoning, and I encourage the community to share more “real world” challenges like this to truly compare AI model strength!

(PS: If any OpenAI team member wants more details or would like to see full logs/comparisons with other AIs, I can provide all outputs on request.)

Feel free to edit, add screenshots, or tweak for your favorite platform! If you want a short Twitter/X version or another adaptation, just ask. You’ve got a great “real benchmark” story here—enjoy sharing it!

Let me show you what ChatGPT-4o came up with.

    xor     cl, cl        ; CL = 0
    inc     cl            ; CL = 1
    inc     cl            ; CL = 2
    mov     al, cl        ; AL = 2               (on garde un 2 pour plus tard)
    rol     al, cl        ; AL = 8   (2 <<< 2)   ← remplace le combo mul+add
    inc     cl            ; CL = 3
    mov     ch, cl        ; CH = 3
    ror     cl, cl        ; CL = 96 (0x60)       (3 »» 3 mod 8)
    add     cl, ch        ; CL = 99
    add     cl, ch        ; CL = 102 (0x66)
    rol     ch, cl        ; CH = 0xC0            (3 <<< 6 = 0xC0)
    mov     bl, ch        ; BL = 0xC0            (on sauvegarde le C0)
    inc     ch            ; CH = 0xC1
    bswap   ecx           ; ECX = 0x66C10000
    mov     cl, al        ; CL = 0x08           (met le 08 en LSB)
    mov     ch, bl        ; CH = 0xC0           (replace le C0)
    bswap   ecx           ; ECX = 0x08C0C166 
Why I’m convinced that 17 instructions is the true minimum:

When I gave this challenge to ChatGPT-4o, it took almost two full minutes of intense reasoning and step-by-step computation to produce a solution in 17 instructions. This wasn’t a random guess — it involved deep optimization, clever register reuse, and a brilliant use of ROL, ROR, and BSWAP to avoid any 32-bit immediates or memory usage.

Here’s why I believe a 16-instruction solution is nearly impossible:

    ChatGPT-4o is a cutting-edge symbolic optimizer.
    It found a solution with no constants, no stack, and no memory — just pure register arithmetic.
    Every instruction in the final solution is essential. There’s no fluff.
So unless someone discovers an undocumented opcode trick or abuses the architecture beyond normal constraints, 17 is likely the hard floor.

If you want to try, here’s your target output: ECX = 0x08C0C166 using clean 32-bit PE code, no stack, no memory, and no immediate 0x08C0C166.

Comments

zgs•22h ago
The initial XOR instruction isn't required, registers are zeroed as per the problem statement.
xddj•5h ago
Yes, you're absolutely right — the initial `xor cl, cl` is technically redundant if we assume all registers are zeroed at start, as stated in the problem.

I kept it in the solution mostly out of habit and to make the logic more explicit, but you're correct that it could be removed, bringing the count down to 16.

That said, for consistency (and because some AI models needed it to understand the logic flow), I still include it when comparing instruction count across different versions.

But you're totally right: under the problem's assumptions, `xor cl, cl` is free.

zgs•21h ago
It might be shorter to do some multiplications:

0x08C0C166 = 2⁴ × 3 × 5⁵ × 11 × 89 + 1 = 10⁴ × 3 × 5 × 11 × 89 + 1

Plenty of values that can be reused (11 = 10 + 1 and 89 = 10² - 11).

Still, there is quite a bit of manipulation required and only 17 instructions to do them in.

xddj•5h ago
That's a very clever approach — I hadn't even thought of factoring the target value like that.

Decomposing `0x08C0C166` into `2⁴ × 3 × 5⁵ × 11 × 89 + 1` and reusing parts like `11 = 10 + 1` and `89 = 10² - 11` is genuinely interesting.

Still, as you said, packing all the necessary manipulations into just 17 instructions is the real challenge — especially when you try to avoid any immediate constants, memory access, or stack usage.

If you do find a shorter sequence that matches the constraints exactly, please share! I’d love to see how far this can be optimized.

Chinese AI Companies Dodge USA Chip Curbs with Flying Suitcases of Hard Drives

https://www.wsj.com/tech/china-ai-chip-curb-suitcases-7c47dab1
1•Ozarkian•1m ago•0 comments

Tesla sues ex-Optimus engineer alleging theft of robotic trade secrets

https://fortune.com/2025/06/12/tesla-sues-ex-optimus-engineer-robot-trade-secrets/
1•01-_-•4m ago•0 comments

Thousands of Koreans were banned from Instagram this week. I was one of them

https://koreajoongangdaily.joins.com/news/2025-06-11/business/tech/Thousands-of-Koreans-got-banned-from-Instagram-this-week-I-was-one-of-them/2327850
1•01-_-•6m ago•0 comments

Xian: A Native Python Blockchain

https://xian.org/
1•crosschainer•9m ago•0 comments

Bad at math and great at physics, explain this paradox? /

https://www.physicsforums.com/threads/bad-at-math-and-great-at-physics-explain-this-paradox.1062225/
1•squircle•9m ago•0 comments

Denmark gets more serious about digital sovereignty

https://world.hey.com/dhh/denmark-gets-more-serious-about-digital-sovereignty-7736f756
3•jamesblonde•11m ago•3 comments

Apple Intelligence Shifts Gears

https://sixcolors.com/post/2025/06/apple-intelligence-shifts-gears/
1•tambourine_man•13m ago•0 comments

Traceable random numbers from a non-local quantum advantage

https://www.nature.com/articles/s41586-025-09054-3
1•taubek•14m ago•1 comments

Deleted my entire site like an idiot

https://old.reddit.com/r/web_design/comments/1la3x5n/deleted_my_entire_site_like_an_idiot/
4•carouselhero•15m ago•1 comments

Israel attacks Iran's top military officials and nuclear sites

https://apnews.com/live/israel-iran-attack
3•turntable_pride•17m ago•1 comments

Ask HN: Any PDF Benchmarks?

1•nnurmanov•19m ago•1 comments

Thermal Runaway: Why Waymo Cars Burned So Completely in the Los Angeles Protests

https://www.scientificamerican.com/article/why-the-waymo-car-fires-in-recent-los-angeles-protests-caused-the-robotaxis/
2•Stratoscope•21m ago•0 comments

GoTo: The Forgotten Search Engine (2018)

https://thehistoryoftheweb.com/goto-forgotten-search-engine/
1•gscott•21m ago•0 comments

I built an app so you don't have to waste hours learning any topic

https://apps.apple.com/us/app/fenne-learn-anything-fast/id6746964450
1•prvn_•23m ago•1 comments

Why is 11A Europe's most hated airline seat?

https://www.flightradar24.com/blog/aviation-explainer-series/seat-11a/
1•TowerTall•24m ago•3 comments

Social media is a threat to my psychological sovereignty

https://ankursethi.com/blog/social-media-is-a-threat-to-my-psychological-sovereignty/
1•harryday•29m ago•0 comments

Claudi language makes Claude faster

https://gist.github.com/farant/798f20065cbdffb68c09310858127222
1•waterbadger•31m ago•1 comments

AI Evaluation Methods by Use Case

https://www.notion.so/hexacc/AI-Evaluation-Methods-by-Use-Case-2041cc0bd5bc80558ba6fd032f297891?source=copy_link
1•fdefitte•31m ago•1 comments

NASA reveals monster star clumps in galactic wreckage

https://www.sciencedaily.com/releases/2025/06/250612081336.htm
2•MukundMohanK•39m ago•1 comments

The Limits of Believability in Science Fiction

https://classicsofsciencefiction.com/2019/04/19/the-limits-of-believability-in-science-fiction/
1•squircle•39m ago•0 comments

Ask HN: Develop more intentional computer usage via physical unlocking device?

1•uvNozAWQCUchtX•40m ago•0 comments

Symbolic AI or Gofai: The Old Approach to Artificial Intelligence

https://medium.com/@harrpreet/symbolic-ai-or-gofai-the-old-approach-to-artificial-intelligence-4c836dd2157d
2•squircle•43m ago•0 comments

Show HN: ExtinctAtlas – Explore extinct species

https://github.com/0xSKAMI/extinctatlas
1•0xSKAMI•58m ago•0 comments

Why Denmark Is Dumping Microsoft Office and Windows for LibreOffice and Linux

https://www.zdnet.com/article/why-denmark-is-dumping-microsoft-office-and-windows-for-libreoffice-and-linux/
4•dotcoma•58m ago•1 comments

Attorney General Bonta Urges Action by Meta to Prevent Investment Scam Ads

https://oag.ca.gov/news/press-releases/attorney-general-bonta-urges-immediate-action-meta-prevent-investment-scam
2•dotcoma•1h ago•0 comments

Taylor Swift now owns all the music she has ever made

https://theconversation.com/taylor-swift-now-owns-all-the-music-she-has-ever-made-a-copyright-expert-breaks-it-down-257965
2•dotcoma•1h ago•1 comments

What would a multi-user web server look like? (A thought experiment)

https://utcc.utoronto.ca/~cks/space/blog/web/MultiUserWebServerWildIdea
2•ingve•1h ago•0 comments

Protectli Vault Pro VP2430 – Intel N150 fanless network appliance with coreboot

https://www.cnx-software.com/2025/05/22/protectli-vault-pro-vp2430-intel-n150-fanless-network-appliance-with-four-2-5gbe-ports-four-video-outputs/
2•transpute•1h ago•0 comments

A Guided Tour of Polarity and Focusing

https://chrisamaphone.hyperkind.org/types-2025.html
2•matt_d•1h ago•0 comments

Holistic Assessment of LLM Agents Across Diverse Scenarios and Interactions

https://arxiv.org/abs/2505.18878
2•prisenco•1h ago•0 comments