Unit_2
Unit_2
RGUKT – SRIKAKULAM
Prepared by
Mr. Dileep Kumar Koda M. Tech., (Ph. D)
Asst. Professor
Computer Science & Engineering
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
S.M. Puram (Vi), Etcherla (M), Srikakulam Dist., A.P -532402.
COMPUTER ORGANIZATION AND ARCHITECTURE
UNIT-I
Basic Functional blocks of a computer: CPU, Memory, Input -Output Subsystems, Control Unit.
Data Representation: Number Systems, Signed Number Representation, Fixed and Floating Point
Representations, Character Representation.
UNIT-II
ALU: Computer Integer Arithmetic: addition, subtraction, multiplication, division, floating point
arithmetic: Addition, subtraction, multiplication, division.
Instruction set architecture of a CPU registers, instruction execution cycle, RTL interpretation of
instructions, addressing modes, instruction set. RISC and CISC architecture. Case study instruction
sets of some common CPUs.
UNIT-III
CPU control unit design: Introduction to CPU design, Processor Organization, Execution of
Complete Execution, Design of Control Unit: hardwired and micro-programmed control, Case study
design of a simple hypothetical CPU.
UNIT-IV
Memory system design: Concept of memory: Memory hierarchy, SRAM vs DRAM, Internal
organization of memory chips, cache memory: Mapping functions, replacement algorithms, Memory
management, virtual memory.
UNIT-V
Input -output subsystems, I/O transfers: programmed I/O, interrupt driven and DMA. I/O Buses,
Peripheral devices and their characteristics, Disk Performance
UNIT-VI
Performance enhancement techniques: Pipelining: Basic concepts of pipelining, through put and
speedup, pipeline hazards.
Parallel processing: Introduction to parallel processing, Introduction to Network, Cache coherence
Text Books:
1. V. C. Hamacher, Z. G. Vranesic and S. G. Zaky, “Computer Organization,” 5/e, McGraw Hill, 2002.
2. William Stallings, “Computer Organization and Architecture”: Designing for Performance, 8/e,
Pearson Education India. 2010.
3. Morris Mano, “Computer System Architecture”, Pearson Education India, Third edition. References:
A. S. Tanenbaum, “Structured Computer Organization”, 5/e, Prentice Hall of India, 2009.
4. D. A. Patterson and J. L. Hennessy, “Computer Organization and Design,” 4/e, Morgan Kaufmann,
2008.
5. J. L. Hennessy and D. A. Patterson,” Computer Architecture: A Quantitative Approach",4/e, Morgan
Kaufmann, 2006.
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
6. D. V. Hall, “Microprocessors and Interfacing”, 2/e, McGraw Hall, 2006 “8086 Assembler Tutorial for
Beginners “By Prof. Emerson Giovani Carati.
UNIT – II
Integer Data Computation:
ONE BIT ADDITION: HALF ADDER
1) It is a simple 1-bit adder circuit.
2) It adds two 1-bit inputs Xi & Yi and produces a sum Zi and a Carry Cout.
3) As it does not consider any carry input, it can’t be combined to add large numbers.
4) Hence it is called a Half Adder.
Formula:
Sum (Zi) = Xi Ex-Or Yi.
Carry (Cout) = Xi.Yi
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
Inputs bits : Xi and Yi.
Input Carry : Cin
Output (Sum) : Zi
Output (Carry): Cout
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
Circuit for Carry (Cout):
1. A Full Adder can add two “1-bit” numbers with a Carry input.
2. It produces a “1-bit” Sum and a Carry output.
3. Combining many of these Full Adders, we can add multiple bits.
4. One such method is called Serial Adder.
5. Here, bits are added one-by-one from LSB.
6. The Carry of each stage is propagated (Rippled) into the next stage.
7. Hence, these adders are also called as Ripple Carry Adders.
8. Advantage: they are very easy to construct.
9. Drawback: As addition happens bit-by-bit, they are slow
10. Number of cycles needed for the addition is equal to the number of bits to be added
Inputs:
Assume X and Y are two “4-bit” numbers to be added, along with a Carry input Cin.
Outputs:
Assume Z to be a “4-bit” output, and COUT to be the output Carry
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
Circuit for 4-bit Serial Adder/ Ripple Carry Adder:
Inputs:
Assume X and Y are two “4-bit” numbers to be added, along with a Carry input CIN.
Outputs:
Assume Z to be a “4-bit” output, and COUT to be the output Carry
CALCULATIONS:
We can “Predict” (Look Ahead) all the intermediate carries in the following manner.
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
The Carry at any stage can be calculated as:
From the above four equations, it is clear that the values of all the four Carries (C3, C2, C1, C0) can
be determined beforehand even without doing the respective additions. To do this we need the values
of all G’s (Xi.Yi) and all P’s (Xi+Yi) and the original carry input CIN. This is done by the Carry
Look Ahead Generator Circuit.
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
10. If S = 1, then the operation is Z = X + (1’s Complement of Y) + 1. Hence Z = X – Y.
Algorithm
The number of steps required is equal to the number of bits in the multiplier.
1. At each step, examine the current multiplier bit starting from the LSB.
2. If the current multiplier bit is “1”, then the Partial-Product is the Multiplicand itself.
3. If the current multiplier bit is “0”, then the Partial-Product is the Zero.
4. At each step, ADD the Partial-Product to the Accumulator.
5. Now Right-Shift the Result produced so far (A & Q combined).
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
Example: 7 x 6 = 42
Algorithm:
The number of steps required is equal to the number of bits in the multiplier. At the beginning,
consider an imaginary “0” beyond LSB of Multiplier
1. At each step, examine two adjacent Multiplier bits from Right to Left.
2. If the transition is from “0 to 1” then Subtract M from A and Right-Shift (A & Q) combined.
3. If the transition is from “1 to 0” then ADD M to A and Right-Shift.
4. If the transition is from “0 to 0” then simply Right-Shift.
5. If the transition is from “1 to 1” then simply Right-Shift. Repeat steps 1 to 5 for all bits of the
multiplier.
The final answer will be in A & Q combined.
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
FLOWCHART FOR BOOTH’S ALGORITHM:
Example: 7 x 6 = 42
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
Example: 5 x 7 = 35
Example: 9 x 10 = 90
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
Example: -9 x 10 = -90
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM
Example: -9 x -10 = 90
By Mr. Dileep Kumar Koda || Asst. Professor of Computer Science & Engineering. || RGUKT SKLM