Microprocessor and Computer Architecture · Unit 10
Computer Architecture Paradigms and 8085 Features
Exam-focused notes for Computer Architecture Paradigms and 8085 Features (Microprocessor and Computer Architecture, BIT151): what the TU syllabus asks and how it has actually been tested, with 10 solved past questions from this unit.
Computer Architecture Paradigms and 8085 Features in short
This chapter groups several topics. They are two processor design styles (RISC and CISC) and a way to classify computers (Flynn). Then come two 8085 features, the flags and the shared address and data lines. It ends with arithmetic circuits built from logic gates.
What this unit covers
- RISC and CISC architecture comparison
- Flynns classification of computers
- Flags in 8085 microprocessor
- Flag types and functions
- Multiplexed address bus
- Combinational circuit design for arithmetic operations
RISC and CISC architecture comparison
2082
Differentiate between RISC and CISC Architecture and Booth's Multiplication
Show solved answerHide answer
RISC vs CISC Architecture and Booth's Multiplication Algorithm
Given
- Multiply 9 × 7 using Booth's Algorithm
- Multiplicand $M = 9$
- Multiplier $Q = 7$
- Both positive, need signed 2's complement representation
Bit-width check: $9 = 1001_2$ (4 bits). To represent as signed positive, we need a leading 0, so minimum 5 bits: $9 = 01001$. Similarly $7 = 00111$. Use $n = 5$ bits.
Part 1: RISC vs CISC Architecture [4 Marks]
RISC (Reduced Instruction Set Computer) uses a small set of simple, fixed-length instructions, each executing in a single clock cycle.
CISC (Complex Instruction Set Computer) uses a large set of complex, variable-length instructions where one instruction may perform several low-level operations over multiple cycles.
| Feature | RISC | CISC |
|---|---|---|
| Instruction Set | Small, simple | Large, complex |
| Instruction Length | Fixed | Variable |
| Execution Time | Single clock cycle | Multiple clock cycles |
| Addressing Modes | Few | Many |
| Control Unit | Hardwired | Microprogrammed |
| Registers | Large number | Fewer |
| Memory Access | Load/Store only | Instructions can access memory directly |
| Examples | ARM, MIPS, SPARC | Intel x86, VAX |
Part 2: Booth's Multiplication -- 9 × 7 [6 Marks]
Booth's Rules
| $Q_0$ | $Q_{-1}$ | Operation |
|---|---|---|
| 0 | 0 | Shift only |
| 1 | 1 | Shift only |
| 0 | 1 | $A = A + M$, then shift |
| 1 | 0 | $A = A - M$, then shift |
Setup
- $M = 01001$
- $-M = 10111$ (2's complement of $M$)
- $Q = 00111$
- $A = 00000$, $Q_{-1} = 0$, $n = 5$
Step-by-Step
Initial: $A=00000,\ Q=00111,\ Q_{-1}=0$
Cycle 1: $Q_0 Q_{-1} = 10 \Rightarrow A = A - M$ $$A = 00000 + 10111 = 10111$$ Before ASR: $A=10111,\ Q=00111,\ Q_{-1}=0$ After ASR: $A=11011,\ Q=10011,\ Q_{-1}=1$
Cycle 2: $Q_0 Q_{-1} = 11 \Rightarrow$ no op After ASR: $A=11101,\ Q=11001,\ Q_{-1}=1$
Cycle 3: $Q_0 Q_{-1} = 11 \Rightarrow$ no op After ASR: $A=11110,\ Q=11100,\ Q_{-1}=1$
Cycle 4: $Q_0 Q_{-1} = 01 \Rightarrow A = A + M$ $$A = 11110 + 01001 = 00111$$ Before ASR: $A=00111,\ Q=11100,\ Q_{-1}=1$ After ASR: $A=00011,\ Q=11110,\ Q_{-1}=0$
Cycle 5: $Q_0 Q_{-1} = 00 \Rightarrow$ no op After ASR: $A=00001,\ Q=11111,\ Q_{-1}=0$
Summary Table
| Cycle | A | Q | $Q_{-1}$ | $Q_0Q_{-1}$ | Operation |
|---|---|---|---|---|---|
| Init | 00000 | 00111 | 0 | -- | Initialize |
| 1 | 10111 | 00111 | 0 | 10 | A = A - M |
| ASR | 11011 | 10011 | 1 | Shift | |
| 2 | 11011 | 10011 | 1 | 11 | No op |
| ASR | 11101 | 11001 | 1 | Shift | |
| 3 | 11101 | 11001 | 1 | 11 | No op |
| ASR | 11110 | 11100 | 1 | Shift | |
| 4 | 00111 | 11100 | 1 | 01 | A = A + M |
| ASR | 00011 | 11110 | 0 | Shift | |
| 5 | 00011 | 11110 | 0 | 00 | No op |
| ASR | 00001 | 11111 | 0 | Shift |
Result
$$AQ = 00001,11111$$
Converting to decimal: $0000111111_2 = 63$
$$9 \times 7 = 63 \checkmark$$
Conclusion: Booth's algorithm correctly yields the product 63.
2081 · 10 marks
Differentiate between RISC and CISC architecture. Represent $(88_{10})$ in signed magnitude, 1's complement and 2's complement format. [5+5]
Flag types and functions
Combinational circuit design for arithmetic operations
2080 · 5 marks
Design a 4-bit combinational circuit decrementer (A1 ←\gets← A1 - 1) using four full-adder circuits. Explain the circuit. [5]
Multiplexed address bus
2079 · 5 marks
Write short notes on: a.) Multiplexed Address Write short notes on: b.) Memory Hierarchy [2.5+2.5]
Flags in 8085 microprocessor
2078 · 5 marks
What is flag? What are different flags available in 8085 microprocessor? [5]
Show solved answerHide answer
Flags in 8085 Microprocessor
What is a Flag?
A flag is a single-bit flip-flop (register) that reflects the status (condition) of the result after the execution of an arithmetic or logical operation. Flags are part of the Program Status Word (PSW) or Flag Register in the 8085 microprocessor.
The 8085 has an 8-bit flag register, but only 5 bits are used as flags.
The 5 Flags of 8085 Microprocessor
1. Sign Flag (S) -- Bit 7
- Set to 1 if the result of an operation is negative (i.e., the Most Significant Bit of the result is 1).
- Set to 0 if the result is positive.
- Example: If result = 10000001 (negative in 2's complement), S = 1.
2. Zero Flag (Z) -- Bit 6
- Set to 1 if the result of an operation is zero.
- Set to 0 if the result is non-zero.
- Example: If A = 05H and we subtract 05H, result = 00H, so Z = 1.
3. Auxiliary Carry Flag (AC) -- Bit 4
- Set to 1 if there is a carry out from bit 3 to bit 4 (carry from lower nibble to upper nibble) during an arithmetic operation.
- Primarily used for BCD (Binary Coded Decimal) arithmetic operations.
- Example: 0FH + 01H = 10H, carry from bit 3 to bit 4, so AC = 1.
4. Parity Flag (P) -- Bit 2
- Set to 1 if the result contains an even number of 1s (even parity).
- Set to 0 if the result contains an odd number of 1s (odd parity).
- Example: Result = 00000011 (two 1s, even), so P = 1.
5. Carry Flag (CY) -- Bit 0
- Set to 1 if there is a carry out from the MSB (bit 7) during addition, or a borrow during subtraction.
- Set to 0 if there is no carry/borrow.
- Example: FFH + 01H = 100H, carry generated, so CY = 1.
Flag Register Layout (8-bit)
| Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|---|---|---|
| S | Z | X | AC | X | P | X | CY |
X = Not used (undefined bits)
Summary Table
| Flag | Symbol | Set to 1 When |
|---|---|---|
| Sign | S | Result is negative (MSB = 1) |
| Zero | Z | Result is zero |
| Auxiliary Carry | AC | Carry from bit 3 to bit 4 |
| Parity | P | Result has even number of 1s |
| Carry | CY | Carry out from MSB or borrow |
0 · 5 marks
What is flag? What are different flags available in 8085 microprocessor? [5]
Show solved answerHide answer
Flags in 8085 Microprocessor
What is a Flag?
A flag is a single-bit flip-flop (register) that reflects the status or condition of the result after an arithmetic or logical operation performed by the ALU (Arithmetic and Logic Unit). Flags are stored in a special 8-bit register called the Flag Register (also called the Status Register or Condition Code Register).
The flag register works together with the Accumulator, and together they form a 16-bit Program Status Word (PSW).
Flag Register Structure in 8085
The 8085 has 5 flags (only 5 of the 8 bits are used):
Bit: D7 D6 D5 D4 D3 D2 D1 D0
S Z -- AC -- P -- CY
The 5 Flags of 8085
1. Sign Flag (S) - Bit D7
- Set to 1 if the result of an operation is negative (i.e., the MSB/D7 of the result is 1).
- Reset to 0 if the result is positive (MSB = 0).
- Used in signed number arithmetic.
2. Zero Flag (Z) - Bit D6
- Set to 1 if the result of an operation is zero.
- Reset to 0 if the result is non-zero.
- Commonly used in loop control and comparison operations.
3. Auxiliary Carry Flag (AC) - Bit D4
- Set to 1 if there is a carry out from bit D3 to bit D4 (i.e., carry from the lower nibble to the upper nibble).
- Used in BCD (Binary Coded Decimal) arithmetic operations.
- Also called the Half Carry Flag.
4. Parity Flag (P) - Bit D2
- Set to 1 if the result contains an even number of 1s (even parity).
- Reset to 0 if the result contains an odd number of 1s (odd parity).
- Used in error detection in data communication.
5. Carry Flag (CY) - Bit D0
- Set to 1 if there is a carry out from the MSB (bit D7) after an addition, or a borrow after a subtraction.
- Reset to 0 if there is no carry/borrow.
- Also used in rotate and shift operations.
Summary Table
| Flag | Bit Position | Set to 1 When |
|---|---|---|
| Sign (S) | D7 | Result is negative (MSB = 1) |
| Zero (Z) | D6 | Result is zero |
| Auxiliary Carry (AC) | D4 | Carry from D3 to D4 |
| Parity (P) | D2 | Result has even number of 1s |
| Carry (CY) | D0 | Carry out from MSB |
Note: Bits D5, D3, and D1 of the flag register are not used in the 8085 microprocessor.
Flynns classification of computers
0 · 7.5 marks
Write short notes on(Among three only attempt two): a.) Flynn's Classification Write short notes on: b.) Memory protection Write short notes on: c.) Memory mapped I/O [2.5+2.5+2.5]
Make Unit 10 stick
Practice BIT151 with flashcards & quizzes