CSEN402: Computer Organization Microoperations III & Basic Computer I
CSEN402: Computer Organization Microoperations III & Basic Computer I
CSEN402: Computer Organization Microoperations III & Basic Computer I
Nada Sharaf
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 1 / 38
Arithmetic Circuit
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 2 / 38
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 3 / 38
Arithmetic Circuit
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 4 / 38
Arithmetic Circuit II
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 5 / 38
Arithmetic Circuit III
Output = A + Y + Cin
S1 S0 Cin Y D Micro operation
0 0 0 B A+B Addition
0 0 1 B A+B+1 Addition with carry
0 1 0 B’ A+B’ Subtract with Borrow
0 1 1 B’ A+B’+1 Subtraction
1 0 0 0 A Transfer A
1 0 1 0 A+1 Increment A
1 1 0 1(1111) A-1 Decrement A
1 1 1 1(1111) A(A-1+1) Transfer A
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 6 / 38
Logic Microoperations
Binary operations
For bits stored inside the registers
Bit-Wise: consider bits separately
Each bit is treated as a binary variable
Examples: ∧, ∨, ⊕
+ vs ∨
I ∨ represent the oring microoperation
I + is used as the arithmetic addition when used as a microoperation
I + is used as the or boolean function when used as part of the control
function
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 7 / 38
Examples
P : R1 ← R1 ⊕ R2
1010 Contents of R1
1100 Contents of R2
--------
0110 Contents of R1 after P=1
P + Q : R1 ← R2 + R3, R4 ← R5 ∨ R6
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 8 / 38
Possible Logic Microoperations
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 9 / 38
16 Logic Microoperations
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 10 / 38
Implementation of Logic Microoperations
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 11 / 38
Hardware Implementation II
S1 S0 Output Operation
0 0 A∧B AND
0 1 A∨B OR
1 0 A⊕B XOR
1 1 A Complement
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 12 / 38
Applications
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 13 / 38
Selective Set
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 14 / 38
Selective Complement
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 15 / 38
Selective Clear
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 16 / 38
Mask Operation
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 17 / 38
Introducing a Pattern
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 18 / 38
Example
Given A: 11011001. What is the operand (B) and the microoperation that
converts A to
11000001 Use sli.do Code: 8361
I Selective Clear
I B: 00011000
I A ← A ∧ B0
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 19 / 38
References
Chapter 4
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 20 / 38
Basic Computer
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 21 / 38
Basic Computer
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 22 / 38
Basic Computer
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 23 / 38
Digital System Organization
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 24 / 38
Program
Set of instruction
Specify the operations
Specify the operans
Specify the sequence in which
processing should happen
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 25 / 38
Computer Instruction
A group of bits
Informs the system on what
action to be carried out
Data and instructions are saved
inside memory
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 26 / 38
Basic Computer Structure
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 27 / 38
How does a program work?
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 28 / 38
Computer Operation vs. Microoperation
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 29 / 38
Instruction Code
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 30 / 38
Instruction Format in the Basic Computer
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 31 / 38
Direct vs Indirect Addressing
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 32 / 38
Available Registers in the Basic Computer I
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 33 / 38
Available Registers in the Basic Computer II
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 34 / 38
Remarks on Registers
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 35 / 38
Common Bus System
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 36 / 38
References
Chapter 5
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 37 / 38
Thank you :)
Nada Sharaf Lecture 3: Microoperations III & Basic Computer I Spring Semester 2020 38 / 38