Professional Documents
Culture Documents
CSEN 402: Computer Org. & Sys. Programming: Slides Prepared By: Dr. Ihab Amer Lecturer: Dr. Cherif Salama
CSEN 402: Computer Org. & Sys. Programming: Slides Prepared By: Dr. Ihab Amer Lecturer: Dr. Cherif Salama
CSEN 402: Computer Org. & Sys. Programming: Slides Prepared By: Dr. Ihab Amer Lecturer: Dr. Cherif Salama
Programming Lecture 2
Slides prepared by: Dr. Ihab Amer Lecturer: Dr. Cherif Salama
A three-state buffer
24 DEC
En
Memory Transfer
Read: DR M[AR]
Transfer of info into DR from the memory word M selected by the address in AR. Write: M[AR] R1
Transfer of info from R1 into the memory word M selected by the address in AR.
Types of Microoperations
Register transfer Os
Transfer Perform
Arithmetic Os
arithmetic operations on numeric data stored in registers bit manipulation operations on non-numeric data stored in registers shift operations on data stored in registers
5
Logic Os
Perform
Shift Os
Perform
Arithmetic Microoperations
Add:
R3 R1 + R2
Subtract:
R3 R1 +
+1
Binary Adder
4-bit binary adder
Refer to Figures 4.7 & 4.8 of textbook for diagrams of binary adder-subtractor and binary incrementer respectively
7
Function Table
Logic Microoperations
P: R1 R1 R2
1010 1100 Content of R1 Content of R2 Content of R1 after P = 1
0110
Add O
OR O
P + Q:
R1 R2 + R3, R4 R5 R6
Refer to TABLE 4.6 of textbook for other logic Os 9
Hardware Implementation
Mask Operation 1010 1100 1000 A before B (logic operand) A after masking; A A B
Step 2: Insert Operation 0000 1010 1001 0000 1001 1010 A before B (insert) A after insertion; A A B
12
Shift Microoperations
Symbolic designation Description
Shift-left register R Shift-right register R Circular shift-left register R Circular shift-right register R Arithmetic shift-left register R Arithmetic shift-right register R
13
R1
R0
Vs = Rn-1
(4)decimal
Rn-2
Hardware Implementation
15
16
Reading Assignment
Chapter
4 of textbook
17