Where and how does software meet hardware? [closed

2019-01-30 07:07发布

Where in a computer does the abstract (letters on the screen) meet the real (electrical current passing through circuits in memory and processors). How did that evolution happen?

I'm talking deeper than assembler here, I think. Maybe a level deeper than processor instructions? At some point commands are actually interpreted by hardware, but I don't understand where/how that happens.

I didn't go to university, so didn't take a CS course or anything. Like many, I am a hobbyist turned "pro". As a result, there are many pieces of the jigsaw I think I'm missing. I know a little C++, and understand the concept of pointers etc (though I've not used them in anger much), however I've only ever worked at a high level. I'm not sure knowing this kind've stuff will help me or not, but it's sure interesting.

15条回答
小情绪 Triste *
2楼-- · 2019-01-30 07:54

This explanation may not be too academical but this is how i understand it (didn't go to university either).

The first step involves Boole's algebra that proved in the 19'th century that any mathematical operation can be expressed using a series of symbols and some associated operators. Thus the base 10 arithmetic with the common +, -, *, / operators can be expressed in using just two symbols (0, 1/ true, false) and logic operators (AND, OR etc) leading to the Boolean logic that is the mathematical foundation of digital computing.

The second step is Alan Turing's work that constructed a mathematical model of an imaginary machine that could process symbols. The naive description of a Turing machine would be any automaton that has memory (to store it's state), operates on a series of symbols that represent it's state and interprets another series of symbols that define the transition from one state to another.

The modern digital processor is an implementation of a Turing machine that uses Boole's logical algebra as the symbol and operator base (take a look at a How Stuff Works detailed explanation of Boole's logic at work). The reason for this is that the true/false logical states can be easily mapped to electrical signals (+ , -) and their associated operators can be implemented in transistor circuits that given a binary input (electrical signal) can output the result according to the boolean operators. So any modern computer is a machine that has memory to store it's state (encoded in binary electrical/magnetic form) and an array of circuits that accept electrical impulses and operators (the processor instructions) and output results accordingly at a very fast speed.

Thus every program written in any computer language is eventually translated by the compiler or runtime into a series of boolean operations for the processor to execute

查看更多
太酷不给撩
3楼-- · 2019-01-30 07:56

Well, if you know how the processor accesses memory then you already know the answer. Memory and other hardware are accessed in (almost) the same way, depending on wether the processor uses "memory mapped IO" or "IO mapped IO". In the first case, the processor just tries to read and write to a memory address - but there are no memory there - instead it's some other hardware device, but the processor really can't tell the difference. The latter case is very similar.

On the other hand, if you have no clue on how the processor accesses the memory, you should look up what an "address bus" and a "data bus" is to get you started.

查看更多
聊天终结者
4楼-- · 2019-01-30 07:58

Here is the real deal. My starting point. Everything requires energy to operate. The On/Off is defined within a limit. for example if between 3 and 5 v it is on if less then 3 volt its off. A morse code concept. I am working on a thermometer so I need to make or buy a sensor. Then I need to calibrate it. Translate the signals from signal no signal or strength of signal to a temperature. This is where I am now.

查看更多
登录 后发表回答