Chapter 4 Central Processing Unit
Chapter 4 Central Processing Unit
(CLO1,PLO1,LD1,C2)
*LD 1- Knowledge
C2- Comprehension
UNDERSTAND THE CENTRAL PROCESSING UNIT (CPU)
Definition of CPU.
The CPU is made up from THREE (3) major parts which is:
Register set
Control Unit
Final questions sample
C. I, ii and iv
D. I, iii and iv
4.2 Understand stack organisation.
(CLO1,PLO1,LD1,C2)
*LD 1- Knowledge
C2- Comprehension
Stack pada umumnya digunakan untuk menyimpan data atau operasi aritmatik
Stack adalah satu teknik bagaimana sesuatu penyimpanan atau menganbil (fetch) data dari
memori berlaku.
Understand stack organization
Stack is a storage device that store information in such a manner that the
item stored (in) last, is the first item retrieved (out).
for memory.
AR Data 2000
(Operands)
PC is used during the fetch phase
to read instruction. Merupakan
Stack 3000
register yang menunjuk ke
arahan berikutnya yang harus
3997
dilaksanakan SP
3998
3999
AR is used during the execute After a push 4000
operation, SP is
phase to read an operand compared with the
4001
upper-limit register DR
SP is used to push or pop item and after a pop, SP is
Example of stack limit:
into or from the stack. SP points compared with the
lower unit register. The upper limit: 3000
at the tops of the stack The lower limit: 4001
Stack Limit
Most computers do not provide hardware to check for
stack overflow
(full stack. Try to push too many onto the stack) or
underflow (empty stack. Try to pop too many off the
stack).
(A + B)(D + E)C * F + *
A. AB*CD*+
B. A*BCD*+
C. AB*CD+*
D. A*B*CD+
[(3+6)+1 * 4 + (2*5)] * (8+7)
5 + ((1 + 2) × 4) − 3 convert to RPN
Evaluation of Arithmetic Expressions
Reverse Polish notation, combined with a stack arrangement of register, is the
most efficient way known for evaluation the arithmetic expression.
- This procedure employed by some electronic calculators and also in some
computer.
Example: 4(A + B)
2.The operand is pushed into the stack in the order in which they appear.
(a)The two top most operands in the stack are used for the operation.
(b)The stack is popped the result of the operation replace the lower operand.
Evaluation of Arithmetic Expressions
(3*4) + (5*6)
Expression: (3+10)*5
4.3 Understand Complex Instruction Set Computers (CISC) and Reduced
Instruction Set Computer (RISC)
(CLO1,PLO1,LD1,C2)
*LD 1- Knowledge
C2- Comprehension
Complex Instruction Set Computers (CISC)
CISC atau Complex Instruction-Set Computer berarti “kumpulan arahan pengiraan
kompleks". CISC adalah sebuah arkitektur dari set arahan dimana setiap
arahan akan menjalankan beberapa operasi tingkat rendah, seperti pengambilan
dari memory, operasi aritmetika, dan penyimpanan ke dalam memory, semuanya
sekaligus hanya di dalam sebuah arahan. Karakter CISC dapat dikatakan berhubung kait
dengan dengan RISC.
Konsep CISC menjadikan mesin mudah untuk diprogram dalam bahasa aras rendah,
tetapi konsep ini menyulitkan dalam penyusunan kompiler bahasa aras tinggi. Dalam CISC
banyak terdapat perintah bahasa mesin.