How does binary translate to hardware?

后端 未结 14 1036
长发绾君心
长发绾君心 2020-12-23 10:14

I understand how the code is compiled to assembly, and that assembly is a 1:1 replacement with binary codes. Can somebody help me understand how binary is conne

14条回答
  •  青春惊慌失措
    2020-12-23 11:09

    In a very simplified way the computer can be represented as an infinite loop (implemented in hardware) and abilities to do simple arithmetic operations (also implemented in hardware). In the loop it does the following:

    • read the memory at PC (PC is the loop counter which gets incremented)
    • decode the command and operands
    • execute the command
    • write the results back to memory

    And that's it. Also there are control commands which can change the PC and which are used for "if ... then ... else" statement.

提交回复
热议问题