Skip Navigation

Why don't these code-writing AIs just output straight up machine code?

For background, I am a programmer, but have largely ignored everything having to do with AI (re: LLMs) for the past few years.

I just got to wondering, though. Why are these LLMs generating high level programming language code instead skipping the middle man and spitting out raw 1s and 0s for x86 to execute?

Is it that they aren't trained on this sort of thing? Is it for the human code reviewers to be able to make their own edits on top of the AI-generated code? Are there AIs doing this that I'm just not aware of?

I just feel like there might be some level of optimization that could be made by something that understands the code and the machine at this level.

36 comments
  • Because they're trained on open source code and stack overflow answers.

    Neither of which are commonly written in assembly.

  • To me this is a fascinating analogy

    This is like having a civilization of Original Creators who are only able to communicate with hand gestures. They have no ears and can't hear sound or produce any vocal noises. They discover a group of humans and raise them to only communicate with their hands because no one knows what full human potential is. The Original Creators don't know what humans are able to do or not do so they teach humans how to communicate with their hands instead because that is the only language that the Original Creators know or can understand.

    So now the humans go about doing things communicating in complex ways with their hands and gestures to get things done like their Original Creators taught them.

    At one point a group of humans start using vocal communications. The Original Creators can't understand what is being said because they can't hear. The humans start learning basic commands and their vocalizations become more and more complex as time goes on. At one point, their few basic vocal commands are working at the same speed as hand gestures. The humans are now working a lot faster with a lot more complex problems, a lot easier than their Original Creators. The Original Creators are happy.

    Now the humans continue development of their language skills and they are able to talk faster and with more content that the Original Creators could ever achieve. Their skills become so well tuned that they are able to share their knowledge a lot faster to every one of their human members. Their development now outpaces the Original Creators who are not able to understand what the humans are doing, saying or creating.

    The Original Creators become fearful and frightened as they watch the humans grow exponentially on their own without the Original Creators participation or inclusion.

  • I imagine this is hypothetically possible given correct and sufficient training data, but that's besides the point I think needs to be made, here.

    Basically nothing anyone is programming in user space these days produces machine code, and certainly none of it runs on the bare metal of the processor. Nothing outside of extremely low power embedded microcontroller applications, or dweebs deliberately producing for oldschool video game consoles, or similar anyway.

    Everything happens through multiple layers of abstractions, libraries, hardware privilege levels, and APIs provided by your operating system. At the bottom of all of those is the machine code resulting in instructions happening on the processor. You can't run plain machine code simultaneously with a modern OS, and even if you did it'd have to be in x86 protected mode so that you didn't trample the memory and registers in use by the OS or other applications running on it, and you'd have a tough-to-impossible time using any hardware or peripherals including networking, sound, storage access, or probably even putting output on the screen.

    So what you're asking for is probably not an output anyone would actually want.

  • Generative AI wasn't made to write good code, nor can it. It was trained to make lazy junior developers pay for a subscription to give code reviewers even bigger headaches.

36 comments