COA Unit 4 Part 1
COA Unit 4 Part 1
UNIT-1
Register Transfer and Micro-Operations: Register Transfer Language, Register Transfer,
memory Transfers, Bus construction with Multiplexers, Arithmetic Micro-operations, Logic
Micro-operations, Shift Micro-operations, Arithmetic Logic Shift Unit.
UNIT-2
Basic Computer Organization: Instruction codes, Computer Registers, Computer Instructions,
Timing and Control, Instruction Cycle, Memory-Reference Instructions, Input- Output and
Interrupt.
UNIT-3
Central Processing Unit: General registers Organization, Stack Organization, Instruction
Formats, Addressing Modes, Data Transfer and Manipulation, Program Control
UNIT-4
Computer Arithmetic: Introduction, Addition and Subtraction, Booth Multiplication Algorithm.
Memory Organization: Memory Hierarchy, Main Memory, Auxiliary memory, Associative
Memory, Cache Memory, Virtual Memory.
UNIT-5
Input-Output Organization: Peripheral Devices, Input-output Interface, Asynchronous Data
Transfer, Priority Interrupt, Direct Memory Access (DMA), Input-Output Processor.
Pipeline and Parallel Processing: Parallel processing, Pipelining, Arithmetic pipeline,
Instruction pipeline.
Course Outcomes
CO1: Understand the basic functional units of a
computer system and its organization (L2)
CO2: Apply appropriate instructions for processing
various types of computer operations (L3).
CO3: Apply various types of organizations on
registers (L3).
CO4: Analyze memory hierarchy, I/O
communication and pipelining (L4).
3
Unit-4-Part-1
Computer Arithmetic
Addition and Subtraction
Multiplication Algorithms
•
Introduction
Arithmetic instructions in digital computer manipulate data to produce results necessary
for the solution of computational problems.
• The four basic arithmetic operations are addition, subtraction, multiplication and division.
• An arithmetic processor is the part of a processor unit that executes arithmetic
operations.
• The data type assumed to reside in processor registers during the execution of an
arithmetic instruction is specified in the definition of the instruction.
• An arithmetic instruction may specify binary or decimal data, and in each case the data
may be in fixed point or floating-point form.
• Fixed-point numbers may represent integers or fractions.
• Negative numbers may be in signed-magnitude or signed complement representation.
• We consider addition, subtraction, multiplication, and division for the following types of
data:
1. Fixed-point binary data in signed-magnitude representation
2. Fixed-point binary data in signed-2's complement representation
3. Floating-point binary data
Complements are used in digital computers for
4. Binary-coded decimal (BCD) data simplifying the subtraction operation and for
logical manipulation
Complements 6 / 23
» Decimal Example)
M N 72532(M) - 13250(N) = 59282 MN 13250(M) - 72532(N) = -59282
72532 13250
+ 86750 (10’s complement of 13250) + 27468 (10’s complement of 72532)
Discard
End Carry 1 59282 0 40718
No End Carry
Result = 59282 Result = -(10’s complement of 40718)
= -(59281+1) = -59282
» Binary Example)
X Y 1010100(X) - 1000011(Y) = 0010001 XY 1000011(X) - 1010100(Y) = -0010001
1010100 1000011
+ 0111101 (2’s complement of 1000011) + 0101100 (2’s complement of 1010100)
1 0010001 0 1101111
Result = 0010001 Result = -(2’s complement of 1101111)
= -(0010000+1) = -0010001
• For example, the binary number 001 110 ( + 14) has a string of 1's from 2 3 to 21. (k = 3, m = 1).
• The number can be represented as 2k+ l - 2m = 24 - 21 = 16 - 2 = 14.
• Therefore, the multiplication M x 14, where M is the multiplicand and 14 the multiplier, can be
done as M x 24 - M X 21
• Thus the product can be obtained by shifting the binary multiplicand M four times to the left and
subtracting M shifted left once.
• Booth algorithm requires examination of the multiplier bits and shifting of the partial product.
Prior to the shifting, the multiplicand may be added to the partial product, subtracted from the
partial product, or left unchanged according to the following rules:
1. The multiplicand is subtracted from the partial product upon encountering the first least
significant 1 in a string of 1's in the multiplier.
2. The multiplicand is added to the partial product upon encountering the first 0 (provided that
there was a previous 1) in a string of 0's in the multiplier.
3. The partial product does not change when the multiplier bit is identical to the previous
multiplier bit.
Hardware for Booth algorithm.
Flowchart for Booth algorithm
(-9)*(-13)=+117
Example : (-5)*(-7)=+35
BR = -5 = 1011, BR'+1 = 0101
QR = -7 = 1001
OPERATION AC QR Qn+1 SC
0000 1001 0 4
AC + BR’ + 1 0101 1001 0
ASHR 0010 1100 1 3
AC + QR 1101 1100 1
ASHR 1110 1110 0 2
ASHR 1111 0111 0 1
AC + BR’ + 1 0010 0011 1 0