C++ part of the concept hey (º﹃º)

Computer programming language

1 Machine language is
composed of binary codes, which can be recognized by computer hardware and can express simple operations. Examples, addition, subtraction, data movement.

2 Assembly language
Map machine language to some mnemonics (AOD SUB MOV, etc.);
assembly language has a low level of abstraction, and machine details must be considered.

3 High-level language
Can be composed of keywords (English capital letters) sentences (mathematical formulas);
meaningful data naming and formulas;
higher level of abstraction, a+b+c/d;
shielding detailed examples of the machine, cout <<a+b+c/d.

4 C++ language
supports object-oriented viewpoints and methods;
treats objective facts as objects;
objects communicate through message transmission, supporting classification and abstraction.

Process-oriented design method
Machine language, assembly language, high-level language are all supported, ***not suitable for large-scale and complex software***, used for mathematical calculations, designing the process of solving problems.

Object-oriented programming methods are
supported by object-oriented high-level languages. A system is composed of systems, and objects communicate with each other through messages.

Object-oriented concept

The principle of classification is abstraction;
the common attributes and behaviors of objects of the same class are abstracted to form classes;
the relationship between classes and objects: like the relationship between type and instance (the relationship between mold and casting) .

1 Encapsulation
Conceal the internal details of the object;
form a boundary to
the outside world ; only retain a limited external interface;
easy to use and good security.

2 Inheritance The
significance lies in software reuse;
transformation and expansion of existing classes to form new classes.

3 Polymorphism The
same message acting on different objects may cause different behaviors (multiple results, easy to edit and understand the program).

Program development process

High-level language——(translation program)——>Machine language program
High-level language program is a program to be translated written according to the program—— translated into binary code ——>The source program is processed by the translation program to generate a machine language program. Target program —— connection ——> Put it in the compiled library to link the target program and some files in the library to generate an executable file. Example: .EXE file on Windows system platform.

Translation program
Assembler—translate assembly language source program into target program;
programming program—translate high-level language source program into target program, compile it once, use it anytime later, once and for all;
interpreter—translate high-level language source program Translated into machine instructions, the current translation is now executed, the next source program is re-translated and then executed, one-to-one, low efficiency;
java language mostly uses semi-compiled and semi-interpreted programs, here is not too much explanation,
C++ programs are directly compiled to the local machine Language code.

C++ program development process
Algorithm and data structure design -> source program editing -> compile -> connection -> test (whether there are errors) -> debugging (resolve errors)

How to realize information storage in computer

Basic computer functions: Arithmetic operation + logical operation
Insert picture description here

Information storage unit·

1 bit (bit b) is the smallest unit of data, which represents one bit of binary information;
2 bytes (byte B) are composed of eight binary numbers: 1 byte=8 bit;
kilobytes 1 KB=1024 B megabytes 1 MB gigabytes Section 1 GB = 1024 M

Computer's digital system-binary system

Frequently used number system
Insert picture description here
, the host is lazy and sleepy, so he doesn’t type. Hey (º﹃º)
Insert picture description here

Update next time

Guess you like

Origin blog.csdn.net/weixin_45465460/article/details/108139050
Hey
Recommended