Day 1 Understanding programming, computer hardware composition, computer unit conversion

Cognitive programming

What is a programming language?
People-----------programming language------------computers

What is programming
? 1. Think about the steps to do things
2. Find a language that the other party can understand, translate the steps of doing things, and save them in a file

		银行行长-----------------------------业务员
				接收客户输入的账号
				接收客户输入的密码
				判断 输入的账号 等于 正确的账号 并且 输入的密码 等于 正确的密码
					告诉用户登录成功
				否则
					告诉用户登录失败
	
	程序员-----------------------------计算机

What is a program? A
program is a series of code files

What is a process? A
process refers to a running program

Why is it necessary to program?
Computers are equivalent to human slaves. The purpose of programming is to control computers to replace humans.

Computer hardware foundation

The five major components of a computer :
arithmetic unit : mathematical operations and logical operations.
Controller : the command system of the computer, which controls the operation of the entire hardware.
cpu = arithmetic unit + controller.
Memory : stores the data of the computer. The
memory is divided into: memory + external storage (hard disk)
Input device (input)
Output device (output)

The three cores of the computer :
cpu
cpu4 cores and 8 threads: (CPU has four cores, each core can be virtualized into two threads, there are 8 threads).
What does cpu x86-64 mean: x86 is a general term for a microprocessor architecture first developed and manufactured by Intel; 64 means 64bit instruction set (64-bit instruction set can support 32bit instruction set at the same time).

Memory
Features of memory: High data access efficiency, work based on electrical signals, data loss after power failure.

Hard
disk The characteristics of hard disk: low data access efficiency, based on magnetic signal or integrated circuit to work, power failure data will not be lost.
Hard disks are divided into mechanical hard disks and solid state hard disks. Mechanical hard disks read data based on magnetic signals. Solid state drives are based on integrated circuits to read data (similar to U disks).
The efficiency of reading data from solid-state hard drives is higher than that of mechanical hard drives, and the cost is also higher than that of mechanical hard drives.

The relationship between the three core hardware :
1. When the program is started, the file is first read from the hard disk to the memory (cache loading process), and the cpu reads the program instructions from the memory to run the program (program run).
2. During the running of the program, the CPU controls the running of the entire hardware. The data generated during the running process is first stored in the memory, and the key data is permanently stored in the hard disk by the memory.

Operating
system The operating system is a control program that coordinates, manages, and controls computer hardware resources and software resources, between the hardware and application programs.

Computer complete architecture
Insert picture description here

The basic conversion of computer unit
1bit (bit) represents a binary "0" or "1"
1Byte represents a byte, a standard English letter occupies one byte, a standard Han nationality occupies 2 bytes
1Byte=8bit
1024B =1KB
1024KB=1MB
1024MB=1GB
1024GB=1TB

Guess you like

Origin blog.csdn.net/Yosigo_/article/details/111224012