r/computerscience • • Nov 22 '25

General How did coding get invented

My view of coding right now is that it's a language that computers understand. But how did the first computer makers invent the code and made it work without errors? It look so obscure and vague to me how you can understand all these different types of code like Java and Python etc.
Just wondering how programmers learn this and how it was invented because I'm very intrigued by it.

438 Upvotes

161 comments sorted by

View all comments

Show parent comment

0

u/TheRealBobbyJones Nov 23 '25

Hexadecimal? That makes no sense. Storage is always binary. We don't have systems that can store hexadecimal. I also never heard of anyone giving a computer instructions in hexadecimal. 

4

u/Narrow-Durian4837 Nov 23 '25

You're sort of right. Storage is binary, but it is/was organized into bytes of 8 bits (binary digits) each. Each such byte could store a number from 0 - 255, which might represent something like a machine language instruction or an ASCII character. For a human who was coding those machine language instructions or ASCII characters, it was a lot easier to remember and work with the two-digit hexadecimal numbers than their 8-digit binary equivalents. Back in the day, I dabbled in machine language, and so I did indeed give the computer instructions in hexadecimal, at least in a sense.

3

u/tumunu Nov 23 '25

Bytes were eventually standardized as 8 bits, but they originally meant "as many bits as it takes to store one character." My 1st computer had a 60-bit word length, holding 10 6-bit bytes per word. (Lower case letters didn't make the cut when you only had 6 bits to spare.) One result of this situation was that octal was used some time before hexadecimal.

Of course, the front panel was always set in bits iiuc.

3

u/sqwz Nov 23 '25 edited Nov 24 '25

Until the 1970s a lot of it was octal. Groups of 3 bits, not 4, per digit. No letters needed, only numerals 0-7 and word lengths weren't always a multiple of 8, so octal kind of made sense. The DEC PDP-8 was a 12 bit machine (4 octal digits), and though its successor the PDP-11 was 16 bit, programmers went on using octal for a long time on that too.

I remember starting a PDP-8 from cold by keying in a boot loader on the 12 front panel switches. Only about a dozen instructions, each written as 4 x 3 digit octal numbers, it loaded a program from punched paper tape, and from that point onwards you had control via a teletype and could load and run other sofware more easily.

2

u/Acebulf Nov 23 '25

I'm with you. I have no clue how this thing is upvoted when half the explanation revolves around hexadecimal being special computer instructions.