1.1.1 Central processing Unit (CPU)
The CPU is the brain of the computer, which takes instructions from memory and executes them, and the CPU is usually made up of control units and logical units.
The control unit is used to control and coordinate the actions of other components except the CPU.
Arithmetic units are used to perform numerical operations (subtraction) and logical operations (comparisons)
Now the CPU is mounted on a small silicon semiconductor chip, on which there are millions of small electronic switches called transistors to process information.
Each computer has an internal clock that emits electronic pulses at a steady speed, which is used to synchronize and control the pace of various operations. The faster the clock speed, the more instructions are executed within a given time. The unit of measurement for clock speed is hertz (Hz), which is equivalent to one pulse per second at 1 Hz.
1.1.2 Bits and bytes
In fact, a computer has nothing but a series of open and closed. Each switch is present in two states: on and off. Storing information in a computer is simply setting a series of switches on or off. If the switch is open, its value is 1, and closing is 0. These 0 and 1 are interpreted as numbers in binary digital systems and are called bits (binary numbers).
The smallest storage unit in the computer is bytes. A byte consists of 8 bits. In the popular ASCII code, byte C is represented as a byte 01000011
1.1.3 Memory
The memory of a computer is composed of several sequential sequences of bytes used to store the program and the data that the program will process. You can consider memory as the workspace of your computer's executing program, and the program and data must be placed in the computer's memory before being executed by the CPU.
Each byte in memory has a unique address. The address is used to locate the bytes that store and fetch data. Because the bytes in memory can be accessed in any order, memory is also referred to as random access memory (RAM). The memory byte is never empty, but its raw data may not be meaningful to the program. When a new content is placed in memory, the current contents of the memory are lost.
1.1.4 Storage Devices
The computer's memory storage data is not stable: once the system power is cut off, all storage (also known as saved) in-memory information is lost. Programs and data are stored permanently on the storage device, and when the computer is really going to use them and then moved to memory, the memory is executed much faster than the permanent storage device.
There are three main types of storage devices:
Disk drives
Optical drive (CD and DVD)
USB Flash Memory
1.2.1 Programming language
Machine language: The computer's own language (depending on the type of computer), machine language is a set of original instructions embedded within the computer. These directives exist in the form of binary code.
Assembly Language: assembly language uses a short descriptive word (called a mnemonic) to represent each machine language instruction. It makes programming easier than machine language. The assembler translates assembly language into machine code. Assembly language is a low-level language because it is inherently close to machine language and is not independent of the machine.
High-level languages: platform-independent, which means writing programs in high-level languages and letting them run on different types of machines.
Python programming language Note the first part of the programming basics