Documente Academic
Documente Profesional
Documente Cultură
Computer Organization
Computer organizationrefers to
the operational units and their
interconnection that realize the
architecture specification.
It defines
how
the hardware
operates.
Computer Design
It defines the hardware structure of
the system.
It defines how the hardware is
arranged.
Computer Architecture
Computer architectureis a set of
disciplines
that
describes
acomputersystem by specifying its
parts and their relations.
DIGITAL COMPUTER
It is a digital system that performs
various computational tasks.
It use binary number system which
has only two digits ie..1 and 0.
A binary digits is called a bit.
Information is represented as a group
of bits.
A group of 8 bits is called a byte.
A
hardware
consists
of
all
components and electromechanical
devices that comprise the physical
entity of a devices.
A software consists of instructions or
data that the computer manipulate
to perform various data processing
task.
Program
A sequence of instructions for the
computer to perform a task.
Data base
The memory in which data
manipulated by the program is
stored.
Operating system
It is the interface between user and
the machine.
Eg:-Windows.Linux
CPU
Acentral processing unit(CPU)
(formerly
also
referred
to
as
acentral
processor
unit)
is
thehardwarewithin acomputerthat
carries
out
theinstructionsof
acomputer programby performing
the
basic
arithmetical,
logical,
andinput/outputoperations of the
system.
CPU
Memory
RAM
ROM
RAM
Volatile.
Data can be changed
ROM
Non volatile.
Data cannot be changed
Translator
Program that translates high level
language to machine language.
Two types:
1. Interpreter compiles line by line
2. Compiler compiles the code as a
whole.
Interrupt
Normal execution of programs may
be preempted if some device
requires urgent servicing.
The normal execution of the current
program must be interrupted the
device raises an interrupt signal.
Interrupt-service routine
After servicing the interrupt , the
execution of the current program is
again started.
Bus Structures
There are many ways to connect
different parts inside a computer
together.
A group of lines that serves as a
connecting path for several devices
is called a bus.
There are different types of buses.
Address bus
Data bus
Control bus
Address Bus
Data Bus
Control Bus
SINGLE BUS
It is also called system bus.
Asystem busis a singlecomputer busthat
connects the major components of a computer
system.
The technique was developed to reduce costs and
improve modularity.
It combines the functions of a data busto carry
information, anaddress busto determine where it
should be sent, and acontrol busto determine its
operation.
NUMBER
REPRESENTATION
1111
1110
+0
0000
+1
0001
1101
0010
+2
-4
1100
0011
+3
0 100 = + 4
-3
1011
0100
+4
1 100 = - 4
-2
1010
0101
1001
-1
0110
1000
-0
0111
+5
+6
+7
1s complement
In this system, -the negative
values
are
obtained
by
complementing each bit of the
corresponding +ve numbers.
1s complement of a given
number
is
equivalent
to
subtracting that number from 2n-1
ie 1111
1111
1110
+0
0000
+1
0001
1101
0010
+2
-3
1100
0011
+3
0 100 = + 4
-4
1011
0100
+4
1 011 = - 4
-5
1010
0101
1001
-6
0110
1000
-7
0111
+5
+6
+7
2S COMPLEMENT
It is obtained by adding 1 to the 1s
complement of that number.
1111
1110
+0
0000
+1
0001
1101
0010
+2
-4
1100
0011
+3
0 100 = + 4
-5
1011
0100
+4
1 100 = - 4
-6
1010
0101
1001
-7
0110
1000
-8
0111
+7
+6
+5
Addition rule
To add 2 numbers, convert the 2 +ve
numbers into binary form and omit
carry bit. If there is a ve value ,
convert it into +ve value by finding
the 2s complement & add it with the
binary form of the other number and
discard the carry.
Binary form
0
1
2
3
4
5
6
7
8
0000
0001
0010
0011
0100
0101
0110
0111
1000
Eg: 3 + 5 =8
0 1 1+
101
-------1000
Eg: 3 + -5
ie 3-5=-2
First find the binary of 3 ie 0011
Find the binary of -5 ie 0101 (5)
1s complement of 5 ie
1010
2s complement of 5 ie
1010+1=1011
Add 0011 (3) and 1011(-5)=1110 =-2
Binary of -2=0010=1101+1=1110
Subtraction Rule
Eg: -7 - -5
-701111000+11001
-501011010+11011
10110100+10101
1 0 0 1+
0101
-----------1110
Eg: -3- -4
-300111100+11101
-401001011+11100
11000011+10100
1 1 0 1+
0100
---------0001
ADDITION/SUBTRACTION
LOGIC
Eg: 131101
BCD of 13
1101+
0110
______
10011
c4
Bcell
G3
Bcell
P3
G2
P2
Bcell
G
1
G
0
Carrylookaheadlogic
Bcell
P
0
Ai
Bi
Pi
Gi
Carry outputs
The Boolean expressions for carry outputs of
various stages can be written as follows :
C1=G0+P0.C0
C2=G1+G0. P1+C0. P0. P1
C3=G2+G1. P2+G0. P1. P2+C0. P0. P1. P2
C4=G3+G2. P3+G1. P2. P3+G0. P1. P2. P3+C0. P0. P1. P2. P3
Multiplication
Combinatorial array
multiplierCombinatorial array multiplier
Multiplicand
0
m3 0
m2 0
m1 0
q0
0
PP1
q2
0
PP3
q3
0
p6
p5
p4
p3
p1
p0
M
ul
tip
q1
0
PP2
p7
m0
lie
r
(PP0)
p2
,
jthmultiplicandbit
ithmultiplierbit
ithmultiplierbit
carryout
FA
carryin
Combinatorial array
multipliers are:
Extremely inefficient.
Perform only one function at one
time.
Sequential multiplication
Recall the rule for generating partial
products:
If the ith bit of the multiplier is 1, add the
appropriately shifted multiplicand to the
current partial product.
Multiplicand has been shifted left when added
to the partial product.
Sequential Circuit
Multiplier
RegisterA(initially0)
Shiftright
an
a0
n 1
MultiplierQ
Add/Noadd
control
n-bit
Adder
Control
sequencer
MUX
0
m
n 1
MultiplicandM
m0
Initialconfiguration
0000
1011
1101
1011
0110
1
0
1101
Add
Shift
Firstcycle
0011
1001
1101
1110
Add
Shift
Secondcycle
0
0
1001
0100
1110
1111
Noadd
Shift
Thirdcycle
0001
1111
1000
1111
Add
Shift
Fourthcycle
Product
Signed Multiplication
Signed Multiplication
sign extension
Signextensionis
showninblue
1
1
Signextensionofnegativemultiplicand.
Signed Multiplication
For a negative multiplier, a straightforward
solution is to form the 2s-complement of
both the multiplier and the multiplicand
and proceed as in the case of a positive
multiplier.
This is possible because complementation
of both operands does not change the
value or the sign of the product.
A technique that works equally well for
both negative and positive multipliers
Booth algorithm.
Booth Algorithm
0
1
0
1
0
0
1
0
1
0
0
1 0 1 1 0
0 +1 +1 + 1+1
1
0
0
1
0
1
1
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
1
0
1
0
1
0
0
1
0
1
Booth Algorithm
0 1
0 +1
0
0
1
0
1 0
0 1
1
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
2'scomplementof
themultiplicand
Booth Algorithm
In general, in the Booth scheme, -1 times the shifted
multiplicand is selected when moving from 0 to 1, and
+1 times the shifted multiplicand is selected when
moving from 1 to 0, as the multiplier is scanned from
right 0to 0left.
1
0
1
1
0
0
1
1
1
0
1
0
1
1
0
0
0 +1 1 +1
0 1
0 +1
0 1 +1 1 + 1
Boothrecodingofamultiplier.
0 1
Booth Algorithm
Multiplier
Bit i
Bit i 1
V ersionofmultiplicand
selectedbybiti
0 XM
+ 1 XM
1 XM
0 XM
Boothmultiplierrecodingtable.
Booth Algorithm
0 1 1 0 1
X1 1 0 1 0
0 1 1 0 1
0 1 +1 1 0
0
1
0
1
0
0
1
0
1
0
0
1
0
1
0
0
1
0
0
0
0
1
1
0
0
0
0
1
1
0
0 0 0 0
0 1 1
0 1
1
1 1 1 0 1 1 0 0 1 0
Boothmultiplicationwithanegativemultiplier.
Booth Algorithm
Best case a long string of 1s (skipping over 1s)
Worst case 0s and 1s are alternating
0
Worstcase
multiplier
+1 1 +1 1 +1 1 +1 1 +1 1 +1 1 +1 1 +1 1
Ordinary
multiplier
0 1 0
0 + 1 1 +1
0 1 +1
0 1
0 +1
0 1
0 +1
0 1
Good
multiplier
Integer Division
Manual Division
13
21
274
26
1101
14
13
1
Longhanddivisionexamples.
10101
100010010
1101
10000
1101
1110
1101
1
Circuit Arrangement
Shiftleft
an
qn1
a0
an1
DividendQ
N+1bit
adder
q0
Quotient
Setting
Add/Subtract
Control
Sequencer
0
m0
mn1
DivisorM
Figure6.21.Circuitarrangementforbinarydivision.
Restoring Division
Shift A and Q left one binary position
Subtract M from A, and place the
answer back in A
If the sign of A is 1, set q0 to 0 and
add M back to A (restore A);
otherwise, set q0 to 1
Repeat these steps n times
Examples
1 0
1 1
10 0 0
1 1
1 0
Initially 0
0
Shift
0
Subtract 1
Set q0 1
Restore
0
Shift
0
Subtract 1
Set q0 1
Restore
0
Shift
0
Subtract 1
Set q0 0
0
0
0
1
1
0
0
0
1
1
0
1
0
0
1
1
0
1
0
1
1
1
0
0
0
0
1
1
1
0
1
1
0
1
1
1
0
0
1
1
1 0 0 0
0
0
1
1
0
0
1
1
0
0
1
0
0
1
1
0
Shift
0 0 0 1
Subtract 1 1 1 0
Set q0 1 1 1 1
Restore
1
0 0 0 1
0
1
1
1
0
0 0 0 1
0 0 1
Remainder
0 0 0
Firstcycle
0 0 0 0
0 0 0
Secondcycle
0 0 0 0
0 0 0
Thirdcycle
Fourthcycle
0 0 1 0
Quotient
Arestoringdivisionexample.
Nonrestoring Division
Avoid the need for restoring A after an
unsuccessful subtraction.
Any idea?
Step 1: (Repeat n times)
If the sign of A is 0, shift A and Q left one bit
position and subtract M from A; otherwise, shift A
and Q left and add M to A.
Now, if the sign of A is 0, set q0 to 1; otherwise,
set q0 to 0.
Examples
Initially
1 1 1 1 1
0 0 0 1 1
Add 0 0 0 1 0
Remainder
Restore
remainder
Shift
Subtract
Set q 0
0
0
0
1
1
Shift
Add
Set q
0 0 0
1 1 1 0 0
0 0 0 1 1
1 1 1 1 1
0 0 0
1 1 1 1 0
0 0 0 1 1
0 0 0 0 1
0 0 0 1 0
1 1 1 0 1
1 1 1 1 1
0 0 1
Shift
Add
Set q
Shift
Subtract
Set q
0
0
0
0
1
1
0
0
0
1
1
0
1
0
0
1
0
1
1
1
0
Anonrestoringdivisionexample.
1 0 0 0
0 0 0
Firstcycle
0 0 0 0
Secondcycle
0 0 0 0
Thirdcycle
0 0 0 1
Fourthcycle
0 0 1 0
Quotient