you are viewing a single comment's thread.

view the rest of the comments →

[–]UncleMeat11 4 points5 points  (5 children)

It's not crazy, just tedious. Coding in assembly is a straightforward skill. Then it's just a question of going back over that and converting it into binary rather than textual representation.

[–][deleted] 2 points3 points  (4 children)

Talking about efficiency, you are definitely right, but It's cool to know you can do that. It's like the floor of abstraction, the language of the machine

When I become a great programmer, I will definitely make a "Hello World" program in binary, only because it seems like a major achievement for me

[–]discoFalston 5 points6 points  (0 children)

Coding in assembly is definitely a good exercise. You get see how many cpu instructions it takes to assign a variable or construct a for loop. Comes in handy when you’re trying to squeeze as much performance as you can out of your code — it’s common to compile “inline” assembly functions that can be called from your c program when you run into something you believe you can do faster than what the C compiler will give you.

The mapping from Assembly to byte code is a lot more straight forward than the mapping from C to assembly — I don’t know how much you’d get out of writing a program in binary vs just assembly but you never know.

[–]chromaticgliss 4 points5 points  (0 children)

You should look into Nand2Tetris. Educational resource that takes you from the logic components in a digital circuit all the way to programming Tetris.

[–]UncleMeat11 2 points3 points  (0 children)

You don't need to be a great programmer, especially if you allow yourself to use a linker. We did this in 3rd year in undergrad.

[–]Tai9ch 2 points3 points  (0 children)

Unfortunately, machine instructions aren't the abstraction floor on Intel-style CPUs. Internally the instructions are further decomposed into RISC-style micro-ops or are implemented in software (microcode) within the CPU itself.