Introduction to Computational thinking - von Neumann computer program and execution

Advanced Program and its implementation

How to achieve a basic computing system?
Known basic facts:
addition, subtraction operations can be converted to addition and subtraction operations to achieve
addition and subtraction operations, transforms logical operations to implement
in order to allow the outside world to manipulate these basic movements and non we need some instructions, these instructions can call these basic movements, instructions: controls the basic operation of the command, when we have the instruction they can, through a combination, you can achieve some of the copy operation, these combinations can be seen as is a program
to copy the action of the dismantling program -> basic movements, this is the program implementing agencies
various combinations of actuator, the automatic interpretation program, and calls in the order instructions, basic operation, and implement
it:
the basic movements ---> programs ----> program executive body constitutes a basic computer system
at a low level to a higher level of abstraction of computer architecture
we implemented 2 + 3 ----> program compilation system - -> low-level computer system (XOR) ---> --- machine instructions 0-1> performs
arithmetic combination achieved by nesting complicated calculation process
(24 +) (- 63)
a combination of more and more complex, they can by abstraction, the complex is named a formula name, so that the calculation can be replaced by name and the name of the object is calculated
DEFINE height 2
height
2
DEFINE PI 3.14
DEFINE redius 10

  • redius PI
    DEFINE Circumference (PI * RADIUS)
    We can name the new operator and the new operator configured to perform the process and replaced by a new operator
    define (suqare x) (* xx )

    How to calculate: two calculation process, one is first calculation, into, and one is the first to bring in the calculation
  • Combined with the operational conditions of the
    condi (> x 0 -x)

    any language based on the idea to construct, the difference is just their syntax and format
  • The concept of recursion:
    Why recursion?
    Constantly repeat the same action, which can be expressed using a recursive

    self-similarity of things infinitely repeated construction --- recursive
    mathematics recursive

    mathematical induction -> Proof and natural numbers

    recursively is a method of operation of the similarity of the objects and construct expression infinite
    recursion defined based on, the structure and the starting point of calculation given directly
    recursive step: n + 1 defined by the front n item item by the low-order k <n, the high-order structure f (n + 1)
  • Primitive recursive function
    accepts a natural number x, generating a natural number of maps, is f (x)

    given primitive recursive function f (x1, x2 ,,, xk) k and recursive functions G1, ..... GK, and then f g1, ... gk is a complex function H


    understood that: for each function, and we passed as a parameter to the function H so that it can constitute a system, the system for each construct is a function, so that you can implement a complex system

Guess you like

Origin www.cnblogs.com/jly1/p/12046643.html