r/AskComputerScience • • Feb 22 '20

Can one code in binary?

Can you code using ONLY 0 and 1's. I'm not talking about dificulty or efficiency, but rather the possibility, like making a "Hello World" program in binary.

39 Upvotes

58 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Feb 22 '20

Yeah, True. But It would be crazy creating a basic program only in binary, haha.

Assembly looks fun, tbh. As a python programmer in my first semester, I never got to see "behind the scenes" of the work I was doing. I guess I'll try to learn C when I have time, and go down from there

And yes, I know assembly is a lot of times harder than python, I'm aware of it, haha.

5

u/UncleMeat11 Feb 23 '20

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.

3

u/[deleted] Feb 23 '20

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

3

u/Tai9ch Feb 23 '20

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.