2020 March 21
Computer systems
Input device: a mouse, a keyboard, a microphone, a scanner
An output device: a display, speakers, printer,
- Central processing unit (cpu):
- Operator: responsible for data operations
- Controller: instructions to help get cpu calculator
- Register: data storing operation for cpu
- Prefetcher: fetching instructions from program memory
- MMU: virtual memory mapping
- The memory (RAM):
- ROM: read-only memory (read only memory)
- RAM: read and write (random access memory)
- Memory by "electrical" data storage, data can not be persistent. A little: quick read.
- External memory (hard disk):
- Using hard "magnetic signal" stored data may be persistent storage. Disadvantages: slow read and write data.
Hardware system
Host part
cpu
Internal memory
Peripheral part
- Input device: read.
- Output Device: write.
- External memory: persistent storage
Software system
system software
operating system
- Excellent commercial companies, organized the compilation of the underlying open source program for managing hardware
- The concept: the operating system is a computer program managing computer hardware and software resources. Nature: Program
- down:
- Drivers, hardware management
- Improvement:
- GUI: ordinary users
- Terminal Interface: ordinary users, developers can be used (cmd)
- System call: the operating system available to developers to use the function
- Common operating systems:
- Windows: Microsoft
- macOS: Apple
- Linux
- Unix
Language processing system
System Services
Database Management Systems
application
Select the application software on demand
- File Handling
- Graphics processing
- Forms processing
- Real-time control
Programming languages and compilers
- Programming languages: control computer hardware work
Common C / C ++ compiler:
- Borland C ++ sapphire blue company
- Intel Intel C ++ Compiler
- Microsoft VC ++
- g ++ compiler (gcc compiler suite), Linux default used by the compiler, support for standard best
The advantages and disadvantages of C language
advantage:
Lower learning costs
Run faster
Powerful
Disadvantages:
Code to achieve long cycle
Transplantable gender differences
Experience requirements for high
Multi-platform library dependencies
C language applications
- server.
- operating system.
- The upper application. MFC, QT
Embedded.
Artificial intelligence, hardware drivers.
Middleware.
Network attack and defense, data security.
- University compulsory
Famous enterprises, foreign invested enterprises
C-32 Image
- auto、break、case、char、const、continue、default、do
- double、else、enum、extern、float、for、goto、if、int
- long、register、return、short、signed、sizeof、static、struct
- switch、typedef、unsigned、union、void、volatile、while
C-nine kinds of control statements
- if····else···
- for(;;)····
- while()·····
- do···while()·····
- continue
- break
- switch
- goto
- return`
34 kinds of C language operators
Arithmetic operators: + - * /% + -
Relational operators: <<= ==> => =!
- Logical Operators:! && ||
- Bitwise operators: << >> | ~ ^ &
Assignment operator: = its extension
Conditional operator:? :
Comma operator:,
Pointer operators: * &
Logarithmically bytes: sizeof
:( cast type)
Component calculating: ->
Subscript operator: []
Other :()
Common IDE
- IDE: set editor, compiler, debugger, and a collection of tools
- Windows:
- VS2013、VS2015、VS2017、VS2019
- Clion: Cross-platform IDE
- QT Creator: cross-platform IDE
- Eclipse
- MacOS:
- Xcode
- Clion: Cross-platform IDE
- QT Creator: cross-platform IDE
- Eclipse。
- Linux:
- vi / vim-- text editor
- Clion: Cross-platform IDE
- QT Creator: cross-platform IDE
- Eclipse。
System Functions
- Specifies the Windows command execution system: the role of
- command:
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("hello world");
system("pause");
}