[OFF-TOPIC] It is true that is impossible write in binary code, the lowest level of programming that you can write is in hex code?
Dave Angel
davea at davea.name
Wed Nov 5 21:24:57 EST 2014
françai s <romapera15 at gmail.com> Wrote in message:
> I intend to write in lowest level of computer programming as a hobby.
>
> It is true that is impossible write in binary code, the lowest level
> of programming that you can write is in hex code?
>
> What is the lowest level of programming computers that you can write ?
>
> Is binary code?
>
> Is hex code?
>
> Is another machine code? Honestly do not know if it is true that there
> is another machine code beyond the binary and hex code.
>
> Is Assembly?
>
You have to start somewhere. The lowest practical level is called
hardware. If you're going to ignore that, then you presumably
have some particular hardware in mind. If you're talking the
Intel Pentium, you've already skipped the lowest level, because
Intel has already done it (microcode ) and sealed it inside the
chip.
Many years ago I wrote microcode for a living, and on some of our
machines it was buried in ROM, while in others it was changeable
and loaded at boot time. In any case, customers didn't usually
get documentation or tools for changing it. There probably are
still processors around that have changeable microcode
available.
You may ask what is Microcode? It's the code that tells the real
hardware what to do with that binary "machine code" that people
call machine code. You don't really think that there is hardware
to do a trig function, do you?
So once you pick a processor, if you can't write the microcode,
what's the lowest level? Toggle switches is probably it, because
anything else has gobs of software running before you hit your
first key. Keyboards were once hardware, but probably any recent
keyboard has more code in it than my satellite navigation program
written in 1973.
Of course toggle switches on the console are probably binary, but
the first IBM machines had hex rotary switches on their
console.
There's no important difference between binary and hex; you do
those conversions in your head while toggling stuff
in.
Now if you don't have a console then you have to go up a level,
and use some form of console. We used punched paper tape as the
next level up, and hex punched cards next. I suppose you'll have
to use a console, with some kind of monitor echoing your
keystrokes onto a screen. No tty for you?
Next level up is to have some form of operating system running.
You might even use a system call to output a character to your
terminal. No machine language instruction for that.
And so on.
Assembly is a low level language that is pretty much translated,
each line of text into one mahine instruction. Usually the
printout can show the results in hex or octal, but you can
trivially convert in your head to binary for those toggle
switches or whatever. Or use the executable that your assembler
and linker produce. But by now you're using lots of os services,
reading and writing files, displaying stuff, printing to a dot
matrix or daisy wheel printer.
Pick your level, there are dozens, and I've used most of them. But
the distinction between binary, octal, and hex is too minor to
mention, except you specifically asked.
HTH
--
DaveA
More information about the Python-list
mailing list