Unit 1
Unit 1
Department
Master of Computer Application
Subject
Computer Organization
MCA 215
Session: January , 2015-May ,2015
Author
Dr.Manmohan Mishra
Asst. Professor
Unit 1 Index
1.1 Register transfer
1.2 Bus and Memory Transfers
1.2.1 Tree-state bus buffers
1.2.2 Memory transfer
1.2.3 Bus Architecture
1.3 Micro-Operations
1.3.1 Register transfer Micro-Operations
1.3.2 Arithmetic Micro-Operations
1.3.3 Logic Micro-Operations
1.3.4 Shift Micro-Operations
1.4 Booth multiplication
SUGGESTED READINGS:
Text Book
1. Computer System Architecture, M. Mano(PHI)
Reference Books
1. Computer Organization, Vravice, Zaky & Hamacher (TMH Publication)
2. Structured Computer Organization, Tannenbaum(PHI)
3. Computer Organization, Stallings(PHI)
4. Computer Organization, John P.Hayes (McGraw Hill)
The construction of a bus system for four registers is shown in the figure in on the next
page.
1.2.1 Three state table buffers
Three state table buffers: A bus system can be constructed with three state gates instead of
multiplexers. A three states gate is digital circuit that exhibits three states. Two of the states are
signals equivalent to logic 1 and 0 as in a conventional gate. The third state is a high-impedance
state. The high-impedance state behaves like an open circuit, which means that the output is
disconnected and does not have logic, such as AND or NAND. However the one most
commonly used in the design of a bus system is the buffer gate.
The construction of a bus system with three state table buffers is shown in the following figure:
R1 R2 R3
22
The basic computer has eight registers, a memory unit, and a control unit. Paths must be
provided to transfer information from one register to another and between memory and registers.
The number of wires will be excessive if connections are made between the outputs of each
register and the inputs of the other registers. A more efficient scheme for transferring
information in a system with many registers is to use a common bus. It is known that how to
construct a bus system using multiplexers or three-state buffer gates
The outputs of seven registers and memory are connected to the common bus. The specific
output that is selected for the bus lines at any given time is determined from the binary value of
the selection variables S2,S1, and S0. The lines from the common bus are connected to the inputs
of each register and the data input of each register and the data inputs of the memory. The
particular register whose LD (load) input is enabled receives the data from the bus during the
next clock pulse transition. The memory receives the contents of the bus when its write input is
activated.
Four registers, DR, AC, IR, and TR, have 16-bits each.
Two registers, AR and PC, have 12 bits each since they hold a memory address.
When the contents of AR or PC are applied to the 16-bit common bus, the four most
significant bits are set to 0’s.
When AR or PC receives information from the bus, only the 12 least significant bits are
transferred into the register
The input register INPR and the output register OUTR have 8 bits each and communicate with
the eight least significant bits (LSB) in the bus. INPR is connected to provide information to the
bus but OUTR can only receive information from the bus.
This is because INPR receives a character from an input device which is then transferred to
AC. OUTR receives a character from AC and delivers it to an output device.
There is no transfer from OUTR to any of the other registers.
The 16 lines of the common bus receive information from sex registers and the memory unit.
The bus lines are connected to the inputs of six registers and the memory. Five registers have
three control inputs: LD (load), INR (increment) and CLR (clear).
This type of register is equivalent to a binary counter with parallel load and synchronous clear.
The increment operation is achieved by enabling the count input of the counter. Two registers
have only a LD input.
The input data and output data of the memory are connected to the common bus, but the memory
address is connected to AR.
Therefore, AR must always be used to specify a memory address. By using a single register for
the address, we eliminate the need for an address bus that would have been needed otherwise.
The content of any register can be specified for the memory data input during a write operation.
Similarly, any register can receive the data from memory after a read operation except AC.
The 16 inputs of AC come from an adder and logic circuit. This circuit has three sets of inputs.
One set of 16-bit inputs come from the outputs of AC.
They are used to implement register micro-operations such as complement AC and shift AC.
Another set of 16-bit inputs come from the data register DR.
The inputs from DR and AC are used for arithmetic and logic micro-operations, such as add DR
to AC or and DR to AC.
The result of an addition is transferred to AC and the end carry-out of the addition is transferred
to flip-flop E (extended AC bit).
A third set of 8-bit inputs come from the input register INPR.
Note that the content of any register can be applied onto the bus and an operation can be
performed in the adder and logic circuit during the same clock cycle. The clock transition at the
end of the cycle transfers the content of the bus into the designated destination register and the
output of the adder and logic circuit into AC.
For example, the two micro-operations:
DR ← AC and AC ← DR
Function Table
S2 S1 S0 Register
0 0 1 AR
0 1 0 PC
0 1 1 DR
1 0 0 AC
1 0 1 IR
1 1 0 TR
1 1 1 Memory
BUS B
Two Bus Organization of the data path
33
All General Purpose register connected with both Bus A and Bus B from Two Bus
Organization. Two operand required by the ALU are routed in One Clock cycle , hence
Instruction execution become faster since ALU does not wait for the second operand as with
Single Bus Organization. The information passed on to the Bus are may be from general purpose
register or from special purpose register. Also Special purpose register are divided in two group ,
one group lift of ALU and are connected to Bus A and Other group is at right of the ALU.
The data form two special purpose register belong to the same group can not be transferred to the
ALU at Same time. The output of the ALU may be routed to either general purpose register or
special purpose register. The ALU does not have any input buffer register and hence both buses
will be busy in carrying the operands during binary operations. Therefore the output of the ALU
is first stored into the out put register and transfer of required operand and loading of the ALU
output buffer register takes in one clock cycle. The content of ALU output register is routed to
the destination with the help of either bus A and Bus B in the second clock cycle.
BUS B
Special
Purpose
Register G1
R0
General R1 PC Special
Purpose … ALU
R2 Purpose
Register .
R3 Register G2
.
R4
MBR
.
R5 Buffer
….
Register
BUS C
Three Bus Organization of the data path
37
The performance of two bus organization can be further improved by adding a third bus C at the
output of ALU. The addition of third bus allows the system to perform the operation, in one
clock cycle as there are three separated in the system.
Example : R3 R1 + R2
Bus System for Four Register
A common bus system can be constructed with the help of multiplexer and decoders where
decoder select the destination register for the bus transfer.
Multiplexer select the source register whose binary information is placed on the bus and decoder
select one destination register to transfer the information from the bus.
Function Table for bus
S1 S0 Register
0 0 A
0 1 B
1 0 C
1 1 D
Function Table
S1 S2 Register Selected
0 0 A
0 1 B
1 0 C
1 1 D
only where there are corresponding 0’s in B. the mask operation is an AND micro operation, for
example:-
1010 A before
1100 B (logic operand)
1000 A after masking
INSERT OPERATION
The insert operation inserts a new value into a group of bits. This is done by first masking the
bits and then Oring them with the required value. For example, suppose that an A register
contains eight bits, 0110 1010. to replace the four leftmost bits by the value 1001 we first the
four unwanted bits:-
0110 1010 A before
0000 1111 B (mask)
0000 1010 A after masking
and then insert the new value:-
0000 1010 A before
1001 0000 B (insert)
1001 1010 A after insertion
The mask operation is an AND microoperation and the insert operation is an OR microoperation.
CLEAR OPERATION
The clear operation compares the words in A and B and produces an all 0’s result if the two
numbers are equal. This operation is achieved by an exclusive-OR microoperation as has own by
the following example:
1010 A
1010 B
0000 A A ++ B
When A and B are equal, the two corresponding bits are either both 0 or both 1. In either case the
exclusive-OR operation produces a 0. the all-0’s result is then checked to determine if the tow
Circular shift
The circular shift is also known as rotate operation. It circulates the bits of the register around the
two ends and there is no loss of information. This is accomplished by connecting the serial
output of the shift register to its serial input. We use the symbols cil and cir for the circular shift
left and circular shift right. E.g. suppose Q1 register contains 01101101 then after cir operation,
it Vcontains 0110110 and after cil operation it will contain 11011010.
Arithmetic Shift
An arithmetic shift micro operation shifts a signed binary number to the left or right. The effect
of an arithmetic shift left operation is to multiply the binary number by 2. Similarly an arithmetic
shift right divides the number by 2. Because the sign of the number must remain the same
arithmetic shift-right must leave the sign bit unchanged, when it is multiplied or divided by 2.
The left most bit in a register holds the sign bit, and the remaining bits hold the number. The sign
bit is 0 for positive and 1 for negative. Negative numbers are in 2’s complement form. Following
Bit Rn-1 in the left most position holds the sign bit. Rn-2 is the most significant bit of the
number and R0 is the least significant bit. The arithmetic shift-right leaves the sign bit
unchanged and shifts the number (including the sign bits) to the right. Thus Rn-1 remains the
same, Rn-2 receives the bit from Rn-1, and so on for other bits in the register.
Format:
1bit 11bit 52bit Double Precision
Both format works the same differing only by the number of bits used to present each components.
Bits in Sign 1 1
Bits in exponents 8 11
Bits in mantissa 23 52
Total Bits 32 64
Example
Convert the 32bit single precision IEEE 754 numbers below in binary.
1101011010110110101100000000000
The number can be represented as 2k+1 – 2m = 24- 20= 16 - 1 = 15. Therefore, the
multiplication M x 14, where M is the multiplicand and 14 the multiplier may be computed as M
x 24 - M x 21. That is, the product can be obtained by shifting the binary multiplicand M four
times to the left and subtracting M shifted left once. Booth algorithm needs examination of the
multiplier bits and shifting of the partial product. Prior to the shifting, the multiplicand added to
the partial product, subtracted from the partial product, or left unchanged by the following rules:
1. The multiplicand is subtracted from the partial product when we get the first least
significant 1 in a string of 1's in the multiplier.
2. The multiplicand is added to the partial product when we get the first Q (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 the same as the
previous multiplier bit
Hardware Implementation
SUGGESTED READINGS:
Text Book
1. Computer System Architecture, M. Mano(PHI)
Reference Books
1. Computer Organization, Vravice, Zaky & Hamacher (TMH
Publication)
2. Structured Computer Organization, Tannenbaum(PHI)
3. Computer Organization, Stallings(PHI)
4. Computer Organization, John P.Hayes (McGraw Hill)