文章目录
I. Random Talk
- Look at the QQ icon in the taskbar. What’s its color? It’s gray. What does it mean? It means that my QQ is offline. Now I want to use my QQ to do something.
- five operations of the mouse: point to (move), click (to select the object), double-click (to open the document or run the program), right-click (to pop up the context menu of the selected object) and drag (to move or resize the selected object)
- single, double, triple, multiple
- size of the dress: S - Small, M - Middle, L - Large, XL - eXtensibly Large
- the five sense organs: eybrows, eyes, ears, nose, lips
- Make my QQ online: Right-click on the QQ icon and a context menu will pop up.
- I choose and click on the
[hidden]
option in the menu. You can have a look at the QQ icon, it’s not grey now and I can use it to communicate with my friends or colleagues.
- Now I send the screenshot of the sign-in result to the QQ group of our class.
- Let’s take a look at the picture.
- Thirty-three students have signed in and six students are not here but they asked for leave.
II. The Composition of a Computer
- In the markdown editor, we can use
\begin{cases}...\end{cases}
to generate{
. In the body of the structure,\\
is used to start a new line.&
is used for alignment.
Step One
1. Source Code
$Computer
\begin{cases}
Hardware &(1)\\
Software &(2)\\
\end{cases}$
2. Final Effect
- C o m p u t e r { H a r d w a r e ( 1 ) S o f t w a r e ( 2 ) Computer \begin{cases} Hardware &(1)\\ Software &(2)\\ \end{cases} Computer{HardwareSoftware(1)(2)
Step Two
1. Source Code
$Computer
\begin{cases}
Hardware \begin{cases}
Control\ Unit \\
ALU \\
Storage\ Devices\\
Input\ Devices\\
Output\ Devices\\
\end{cases}\\
Software
\begin{cases}
System\ Software\\
Application\ Software\\
\end{cases} \\
\end{cases}$
2. Final Effect
- C o m p u t e r { H a r d w a r e { C o n t r o l U n i t A L U S t o r a g e D e v i c e s I n p u t D e v i c e s O u t p u t D e v i c e s S o f t w a r e { S y s t e m S o f t w a r e A p p l i c a t i o n S o f t w a r e Computer \begin{cases} Hardware \begin{cases} Control\ Unit \\ ALU \\ Storage\ Devices\\ Input\ Devices\\ Output\ Devices\\ \end{cases}\\ Software \begin{cases} System\ Software\\ Application\ Software\\ \end{cases} \\ \end{cases} Computer⎩ ⎨ ⎧Hardware⎩ ⎨ ⎧Control UnitALUStorage DevicesInput DevicesOutput DevicesSoftware{System SoftwareApplication Software
Step Three
1. Source Code
$Computer
\begin{cases}
Hardware
\begin{cases}
\left. \begin{matrix}
Control\ Unit \\
ALU \\
\end{matrix}\right \}CPU\\
Storage\ Devices\\
Input\ Devices\\
Output\ Devices\\
\end{cases}\\
Software
\begin{cases}
System\ Software\\
Application\ Software\\
\end{cases} \\
\end{cases}$
2. Final Effect
- C o m p u t e r { H a r d w a r e { C o n t r o l U n i t A L U } C P U S t o r a g e D e v i c e s I n p u t D e v i c e s O u t p u t D e v i c e s S o f t w a r e { S y s t e m S o f t w a r e A p p l i c a t i o n S o f t w a r e Computer \begin{cases} Hardware \begin{cases} \left. \begin{matrix} Control\ Unit \\ ALU \\ \end{matrix}\right \}CPU\\ Storage\ Devices\\ Input\ Devices\\ Output\ Devices\\ \end{cases}\\ Software \begin{cases} System\ Software\\ Application\ Software\\ \end{cases} \\ \end{cases} Computer⎩ ⎨ ⎧Hardware⎩ ⎨ ⎧Control UnitALU}CPUStorage DevicesInput DevicesOutput DevicesSoftware{System SoftwareApplication Software
III. Single Brace
1. Generate Left Brace
(1) Source Code
$Computer=\left\{
\begin{matrix}
Hardware\\
Software
\end{matrix}
\right.$
(2) Final Effect
C o m p u t e r = { H a r d w a r e S o f t w a r e Computer=\left\{ \begin{matrix} Hardware\\ Software \end{matrix} \right. Computer={HardwareSoftware
2. Generate Right Brace
(1) Source Code
$\left.
\begin{matrix}
Hardware \\
Software
\end{matrix}
\right\}=Computer$
(2) Final Effect
H a r d w a r e S o f t w a r e } = C o m p u t e r \left. \begin{matrix} Hardware \\ Software \end{matrix} \right\}=Computer HardwareSoftware}=Computer
IV. Reference Blog
- You can visit my blog [利用Markdown编写美妙的数学公式] and learn how to use markdown to generate wonderful math formulas.
V. After-Class Assignment
- C o m p u t e r { H a r d w a r e { C o n t r o l U n i t A L U } C P U : C e n t r a l P r o c e s s i n g U n i t S t o r a g e D e v i c e s { P r i m a r y M e m o r y { R A M : R a n d o m A c c e s s M e m o r y R O M : R e a d − O n l y M e m o r y S e c o n d a r y S t o r a g e { F l o p p y D i s k H a r d D i s k C D − R O M U − D i s k S S D : S o l i d S t a t e D i s k I n p u t D e v i c e s { K e y b o a r d M o u s e S c a n n e r M i c r o p h o n e W e b c a m O u t p u t D e v i c e s { D i s p l a y P r i n t e r S p e a k e r P l o t t e r S o f t w a r e { S y s t e m S o f t w a r e { O S : O p e r a t i n g S y s t e m { W i n d o w s L i n u x M a c O S S o l a r i s D B M S : D a t a b a s e M a n a g e m e n t S y s t e m L a n g u a g e P r o c e s s o r s { C o m p l i e r A s s e m b l e r I n t e p r e t e r L i n k e r L o a d e r A p p l i c a t i o n S o f t w a r e { O A : O f f i c e A u t o m a t i o n { M i c r o s o f t O f f i c e K i n g s o f t W P S O f f i c e I n s t a n t M e s s a g i n g { Q Q W e C h a t F a c e b o o k T w i t t e r C A I : C o m p u t e r − A i d e d I n s t r u c t i o n C A D : C o m p u t e r − A i d e d D e s i g n C A M : C o m p u t e r − A i d e d M a n u f a c t u r i n g C A T : C o m p u t e r − A i d e d T e s t i n g Computer\begin{cases} Hardware \begin{cases} \left. \begin{matrix}Control\ Unit \\ ALU \\ \end{matrix}\right \}CPU: Central\ Processing\ Unit\\ Storage\ Devices \begin{cases} Primary\ Memory \begin{cases} RAM: Random\ Access\ Memory \\ ROM: Read-Only\ Memory\\ \end{cases}\\ Secondary\ Storage \begin{cases} Floppy\ Disk \\ Hard\ Disk \\ CD-ROM\\ U-Disk\\ SSD: Solid\ State\ Disk\\ \end{cases}\\ \end{cases}\\ Input\ Devices \begin{cases} Keyboard \\ Mouse \\ Scanner\\ Microphone\\ Webcam\\ \end{cases}\\ Output\ Devices \begin{cases} Display \\ Printer\\ Speaker\\ Plotter\\ \end{cases}\\ \end{cases}\\ Software \begin{cases} System\ Software \begin{cases} OS: Operating\ System \begin{cases} Windows \\ Linux \\ MacOS\\ Solaris\\ \end{cases}\\ DBMS: Database\ Management\ System \\ Language\ Processors \begin{cases} Complier \\ Assembler \\ Intepreter\\ Linker\\ Loader\\ \end{cases}\\ \end{cases}\\ Application\ Software \begin{cases} OA: Office Automation \begin{cases} Microsoft\ Office\\ Kingsoft\ WPS\ Office\\ \end{cases} \\ Instant\ Messaging \begin{cases} QQ \\ WeChat \\ Facebook\\ Twitter\\ \end{cases}\\ CAI: Computer-Aided\ Instruction\\ CAD: Computer-Aided\ Design\\ CAM: Computer-Aided\ Manufacturing\\ CAT: Computer-Aided\ Testing\\ \end{cases}\\ \end{cases} \\ \end{cases} Computer⎩ ⎨ ⎧Hardware⎩ ⎨ ⎧Control UnitALU}CPU:Central Processing UnitStorage Devices⎩ ⎨ ⎧Primary Memory{RAM:Random Access MemoryROM:Read−Only MemorySecondary Storage⎩ ⎨ ⎧Floppy DiskHard DiskCD−ROMU−DiskSSD:Solid State DiskInput Devices⎩ ⎨ ⎧KeyboardMouseScannerMicrophoneWebcamOutput Devices⎩ ⎨ ⎧DisplayPrinterSpeakerPlotterSoftware⎩ ⎨ ⎧System Software⎩ ⎨ ⎧OS:Operating System⎩ ⎨ ⎧WindowsLinuxMacOSSolarisDBMS:Database Management SystemLanguage Processors⎩ ⎨ ⎧ComplierAssemblerIntepreterLinkerLoaderApplication Software⎩ ⎨ ⎧OA:OfficeAutomation{Microsoft OfficeKingsoft WPS OfficeInstant Messaging⎩ ⎨ ⎧QQWeChatFacebookTwitterCAI:Computer−Aided InstructionCAD:Computer−Aided DesignCAM:Computer−Aided ManufacturingCAT:Computer−Aided Testing
VI Processor Logic
What happens inside a computer chip?
The ALU (arithmetic logic unit) is the part of the microprocessor that performs arithmetic operations, such as addition and subtraction. It also performs logical operations, such as comparing two numbers to see if they are the same. The ALU uses registers to hold data that is being processed, just as you use a mixing bowl to hold the ingredients for a batch of cookies.
The microprocessor’s control unit fetches each instruction, just as you get each ingredient out of a cupboard or the refrigerator. Data is loaded into the ALU’s registers, just as you add all the ingredients to the mixing bowl. Finally, the control unit gives the ALU the green light to begin processing, just as you flip the switch on your electric mixer to begin blending the cookie ingredients. The following figure illustrates a microprocessor control unit and ALU preparing to add 2 + 3.
What happens when a computer executes an instruction?
The term instruction cycle refers to the process in which a computer executes a single instruction. Some parts of the instruction cycle are performed by the microprocessor’s control unit; other parts of the cycle are performed by the ALU. The steps in this cycle are summarized in the following figure.
What role does the control unit play?
The instructions that a computer is supposed to process for a particular program are held in memory. When the program begins, the memory address of the first instruction is placed in a part of the microprocessor’s control unit called an instruction pointer. The control unit can then fetch the instruction by copying data from that address into its instruction register. From there, the control unit can interpret the instruction, gather the specified data, or tell the ALU to begin processing. The following figure helps you visualize the control unit’s role in processing an instruction.
When does the ALU swing into action?
The ALU is responsible for performing arithmetic and logical operations. It uses registers to hold data ready to be processed. When it gets the go-ahead signal from the control unit, the ALU processes the data and places the result in an accumulator.
From the accumulator, the data can be sent to memory or used for further processing. The following figure helps you visualize what happens in the ALU as the computer processes data.
What happens after an instruction is executed?
When the computer completes an instruction, the control unit increments the instruction pointer to the memory address of the next instruction, and the instruction cycle begins again.
Do I need to know all this detailed stuff?
What you should take away from the discussion about programming and instruction sets is the idea that computers and other digital devices accomplish a wide array of complex tasks by performing a very limited set of machine language instructions very fast.
These concepts about how processors work will help you understand thesignificance of microprocessor performance, such as speed and word size.