It's possible. There's just very little point nowadays. Writing a whole program in machine language is time consuming, difficult, has minimal advantages, and forever locks your code to the particular machine you wrote it for.
The few people who still develop in machine language only write specific parts of a program (other parts being written in a HLL) and in Assembly, not hexadecimal, let alone binary.
how did they program for the very first time? |
1. Early computers were very simple by today's standards. Their I/O capabilities were very limited. The very early ones did not have an OS and simply executed a single program at a time. Doing anything remotely useful now involves interacting with system libraries, which itself involves a lot of boilerplate code to prepare calls. If you're using an HLL the compiler does this for you, but if you use machine language you have no choice but to do it yourself.
2. They were also designed to be programmed directly, with instruction sets that accommodated machine code generated by humans. Modern CPUs are not only designed to be programmed primarily by machines, with few convenience instructions, but are even optimized to perform machine-generated use patterns more quickly.
Don't recommend HexEditor, I like to program in binary not assembly language nor in hexadecimal. |
I have to ask: do you want to do this because you're legitimately curious, or because you want to brag to your friends about how you code in binary?
Writing a preprocessor that takes a text file filled with 1s and 0s and outputs an actual binary file is trivial, so knock yourself out.