How do you program computer hardware

47 viewsEconomicsOther

I understand how a processor works and RAM and all that stuff. I understand you can use assembly and other languages to make the processor do things. But I assume that you have a to do something to the processor so it can understand your inputs? And if you have to put a base layer on the processor, how does the machine that did it get it’s layer?

It’s like watching one of those videos where they make this big dump truck. But they needed to build a mold to make the dump truck part. But how did they build a mold to make that mold that made that mold?

In: Economics

4 Answers

Anonymous 0 Comments

On a pure hardware level you just connect wires from transistors to transistors.

Now, that’s hard and complicated to do something containing billions of wires.

So people made languages that allow you to define blocks and connections between them. Then machines understand those langauges and make lay actual wires.

https://en.wikipedia.org/wiki/Verilog

https://en.wikipedia.org/wiki/VHDL

Anonymous 0 Comments

The earliest processors allowed individual memory locations to be manipulated directly, the most basic form of loading code. There was no ‘base layer’ (BIOS, OS, etc)

Even modern microcontrollers are often used without any pre-installed firmware layers (ignoring microcode, which is pre-installed or hard-coded).

Anonymous 0 Comments

I came across this really great video the other day that explained it really well

[https://youtu.be/HjneAhCy2N4?si=7OTal4rI-FOb0jmm](https://youtu.be/HjneAhCy2N4?si=7OTal4rI-FOb0jmm)

Anonymous 0 Comments

On the lowest layer, they actually set individual bits in memory, or put individual wires in the hardware respectively. With the correct knowledge and skills, very simple CPUs can even be designed just on a larger piece of paper. For modern CPUs this if of course impossible without extensive help by already existing computers.

Imagine it like this:

With a couple of transistors, you can build logic gates, that can process single bits.

With a couple of logic gates, you can put together logic circuits that process groups of bits like numbers (e.g. an adder that adds two numbers, each made up of 8 bits). With logic gates you can also build memory cells.

With memory cells and logic circuits, you can build finite state machines (https://en.wikipedia.org/wiki/Finite-state_machine), small automata that can process sequences of numbers.

By combining finite state machines with logic circuits and a larger memory, (e.g. in the von-neumann architecture https://en.wikipedia.org/wiki/Von_Neumann_architecture) you finally get a machine that can execute instructions, given as a sequence of numbers / bits. You just need to design a way to encode the instructions into bits and then design the circuits and state machines to interpret the bits in the correct way.

An assembler takes your assembly code and generates these binary instructions.