Computer FundamentalsInstructor: Jun YanThursday (3, 4), N229, South Campus
Lecture3:Principles of general-purpose computer 曹振飞 2015050539
-
Why should we learn this course?
In the last lecture, we review the simple calculation: 3.14*7.2=? and the Binary System that we learn last week.Through the review,Mr Yan teach us what is program and how a program work.
Also,we learn what is instruction in computer as well as a program in C language.In all,what our teacher mainly want to tell us is the functions of the genera-purpose computer.
-
Binary System
-
Evey two-state physical system can represent 0,1.
-
How to compute in binary.
~Boolean logic
1 means True.0 means False.And,Or,Not can be used in the Binary System.
~Two Examples:
-
1 bit multiplication:Just AND gate
-
1 bit summation(without carry),or Xor.
-
All computation can be realized using AND,Or,Not.
-
What is Program?
(1). Can’t anticipate user’s input
(2) address of date:date is stored in that address(Adress:Like variable in algebra.E.g.f(n)=n!)
Example: Motivating example:314*72 we learn last week.
Example: A B C
* D E
F G H
+ I J K
L M N O
1.C*E=H
2.B*E=G
3.A*E=F
4.D*C=K
5.D*B=J
6.D*A=I
7.H→O
8.G+K→N
9.F+J→M
10.I→L
This is one program for all inputs.
-
Instruction
5.Instruction Set
- An instruction set is a collection of preprogrammed activities a microprocessor is hardwired to perform
- Machine Code
- Addition,Multiplication table
6. A real program in C language
- Show us what we will write to achieve a program.
- Store the memory.
7. Processor Logic
- The ALU(arithmetic logic unit)is the part of the microprocessor that performs arithmetic operations
- The ALU uses registers (a kind of memory) to hold data that is being processed
- The microprocessor’s control unit fetches each instruction.
- The term instruction cycle refers to the process in which a computer executes a single instruction.
/
Share with your friends: |