SlideShare a Scribd company logo
1 of 55
Computer Organization UNIT 1 Prepared By Prof. Rakesh Roshan [email_address] n Prof.  RAKESH ROSHAN 09971640291
REGISTER  TRANSFER  AND  MICROOPERATIONS •  Register Transfer Language •  Register Transfer •  Bus and Memory Transfers •  Arithmetic Microoperations •  Logic Microoperations •  Shift Microoperations •  Arithmetic Logic Shift Unit Prof.  RAKESH ROSHAN 09971640291
SIMPLE DIGITAL SYSTEMS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Prof.  RAKESH ROSHAN 09971640291
MICROOPERATIONS (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Register Transfer Language Prof.  RAKESH ROSHAN 09971640291
MICROOPERATION (2) An elementary operation performed (during  one clock pulse), on the information stored  in one or more registers R    f(R, R) f:  shift, load, clear, increment, add, subtract, complement, and, or, xor, … 1 clock cycle Register Transfer Language Prof.  RAKESH ROSHAN 09971640291 ALU (f) Registers (R)
ORGANIZATION OF A DIGITAL SYSTEM - Set of registers and their functions - Microoperations set  Set of allowable microoperations provided by the organization of the computer - Control signals that initiate the sequence of  microoperations (to perform the functions) ,[object Object],Register Transfer Language Prof.  RAKESH ROSHAN 09971640291
REGISTER  TRANSFER LEVEL ,[object Object],[object Object],[object Object],[object Object],[object Object],Register Transfer Language Prof.  RAKESH ROSHAN 09971640291
REGISTER  TRANSFER  LANGUAGE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Register Transfer Language Prof.  RAKESH ROSHAN 09971640291
DESIGNATION OF REGISTERS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Register Transfer Language MAR Prof.  RAKESH ROSHAN 09971640291
DESIGNATION OF REGISTERS Register Transfer Language R1 Register  Numbering of bits Showing individual bits Subfields PC(H) PC(L) 15 8 7 0 - a register - portion of a register - a bit of a register ,[object Object],7  6  5  4  3  2  1  0 R2 15 0 ,[object Object],Prof.  RAKESH ROSHAN 09971640291
REGISTER  TRANSFER ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Register Transfer Prof.  RAKESH ROSHAN 09971640291
REGISTER  TRANSFER ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Register Transfer Prof.  RAKESH ROSHAN 09971640291
CONTROL FUNCTIONS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Register Transfer Prof.  RAKESH ROSHAN 09971640291
HARDWARE  IMPLEMENTATION  OF  CONTROLLED TRANSFERS Implementation of controlled transfer  P:  R2   R1 Block diagram Timing diagram Clock Register Transfer Transfer occurs here R2 R1 Control  Circuit Load P n Clock Load t t+1 The  block diagram  that depicts the transfer from R1 to R2. The n outputs of register R1 are connected to the n inputs of register R2. The letter n will be used to indicate any number of bits for the register. It will be replaced by an actual number when the length  Of the register is known. Register R2 has load input that is activated by the control variable P.  In  timing diagram , P is activated in the control section by the rising edge of a clock pulse at time t. The next positive transition of the clock at time t+1 finds the load active and the data inputs of R2 are then loaded into the register in parallel. P may go back to 0 at  Time t+1; otherwise, the transfer will occur with every clock pulse transition while P remains active. Prof.  RAKESH ROSHAN 09971640291
SIMULTANEOUS OPERATIONS ,[object Object],[object Object],[object Object],Register Transfer Prof.  RAKESH ROSHAN 09971640291
BASIC SYMBOLS FOR REGISTER TRANSFERS Capital letters  Denotes a register     MAR, R2 & numerals  Parentheses ()  Denotes a part of a register   R2(0-7), R2(L) Arrow      Denotes transfer of information   R2   R1 Colon  :   Denotes termination of control function   P: Comma  ,   Separates two micro-operations   A   B,  B   A Symbols Description  Examples Register Transfer Prof.  RAKESH ROSHAN 09971640291
Bus and Memory Transfer ,[object Object],[object Object],[object Object],Register Transfer Prof.  RAKESH ROSHAN 09971640291
Bus System for four registers From a register to bus: BUS    R Bus and Memory Transfers We can construct  the common bus system is with multiplexers. The multiplexers select the source Register whose binary information is then placed on the bus. Prof.  RAKESH ROSHAN 09971640291 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 Register A Register B Register C Register D B C D 1 1 1 4 x1 MUX B C D 2 2 2 4 x1 MUX B C D 3 3 3 4 x1 MUX B C D 4 4 4 4 x1 MUX 4-line bus x y select 0 0 0 0 Register A Register B Register C Register D Bus lines x y Register Selected 0 0 A 0 1 B 1 0 C 1 1 D
TRANSFER  FROM  BUS  TO  A  DESTINATION  REGISTER Three-State Bus Buffers Bus line with three-state buffers Output Y=A if C=1 High-impedence if C=0 Normal input A Control input C Select Enable 0 1 2 3 S0 S1 A0 B0 C0 D0 Bus line for bit 0 Bus and Memory Transfers A bus system can be constructed with three-state gated instead of multiplexers. A three-state gate  Is a 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 A logic significance. Three-state gates may perform any conventional logic, such as AND and NAND. However, the one most commonly used in the design of a bus system is the buffer gate. In the above diagram, The outputs of four buffers are connected together to form a single bus  line . The control inputs to the buffers determine which of the four normal inputs will communicate With the bus line. No more than one buffer may be in the active state at any given time. The Connected buffers must be controlled so that only one three-state buffer has access to the bus line while all other buffers are maintained in a high impedance state. Prof.  RAKESH ROSHAN 09971640291
BUS  TRANSFER  IN  RTL ,[object Object],[object Object],[object Object],Bus and Memory Transfers R2   R1 BUS   R1, R2    BUS Prof.  RAKESH ROSHAN 09971640291
MEMORY (RAM) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Bus and Memory Transfers Prof.  RAKESH ROSHAN 09971640291 data input lines data output lines n n k address lines Read Write RAM unit
MEMORY  TRANSFER ,[object Object],[object Object],[object Object],[object Object],[object Object],Bus and Memory Transfers M Prof.  RAKESH ROSHAN 09971640291 AR Memory unit Read Write Data in Data out
MEMORY  READ ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Bus and Memory Transfers R1    M[MAR] Prof.  RAKESH ROSHAN 09971640291
MEMORY  WRITE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Bus and Memory Transfers M[MAR]    R1 Prof.  RAKESH ROSHAN 09971640291
SUMMARY OF R. TRANSFER MICROOPERATIONS Bus and Memory Transfers A   B   Transfer content of reg. B into reg. A AR   DR(AD) Transfer content of AD portion of reg. DR into reg. AR A    constant Transfer a binary constant into reg. A ABUS   R1,   Transfer content of R1 into bus A and, at the same time,  R2   ABUS   transfer content of bus A into R2  AR   Address register DR   Data register M[R]   Memory word specified by reg. R M   Equivalent to M[AR] DR    M   Memory  read  operation: transfers content of memory word specified by AR into DR M    DR   Memory  write  operation: transfers content of DR into memory word specified by AR Prof.  RAKESH ROSHAN 09971640291
MICROOPERATIONS ,[object Object],- Register transfer microoperations - Arithmetic microoperations - Logic microoperations - Shift microoperations Arithmetic Microoperations Prof.  RAKESH ROSHAN 09971640291
ARITHMETIC  MICROOPERATIONS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Summary of Typical Arithmetic Micro-Operations Arithmetic Microoperations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Prof.  RAKESH ROSHAN 09971640291
BINARY  ADDER / SUBTRACTOR / INCREMENTER Binary Adder-Subtractor Binary Adder Arithmetic Microoperations The addition and subtraction operations can be combined into one common circuit by including An exclusive-OR gate with full adder. In 4-bit adder-subtractor circuit, the mode input M controls The operation. When M=0 the circuit is an adder and when M=1 the circuit becomes a subtractor. Each exclusive-OR gate receive input M and one of the inputs of B. When M=0, we have B  0=B. The full adders receives the value of B, input carry is 0, and the circuit performs A plus B. When M=1 we have B  1=B’ and C0 = 1. The B inputs are all complemented and a 1 is added through  The input carry. The circuit performs the operation A plus the 2’s complement of B. Prof.  RAKESH ROSHAN 09971640291
Binary Incrementer ,[object Object],Prof.  RAKESH ROSHAN 09971640291
ARITHMETIC  CIRCUIT S1 S0 Cin Y Output Microoperation 0  0 0 B D = A + B Add 0  0 1 B D = A + B + 1 Add with carry 0  1 0 B’ D = A + B’ Subtract with borrow 0  1 1 B’ D = A + B’+ 1 Subtract 1  0 0 0 D = A Transfer A  1  0 1 0 D = A + 1 Increment A 1  1 0 1 D = A - 1 Decrement A 1  1 1 1 D = A Transfer A  Arithmetic Microoperations Prof.  RAKESH ROSHAN 09971640291 S1 S0 0 1 2 3 4x1 MUX X0 Y0 C0 C1 D0 FA S1 S0 0 1 2 3 4x1 MUX X1 Y1 C1 C2 D1 FA S1 S0 0 1 2 3 4x1 MUX X2 Y2 C2 C3 D2 FA S1 S0 0 1 2 3 4x1 MUX X3 Y3 C3 C4 D3 FA Cout A0 B0 A1 B1 A2 B2 A3 B3 0 1 S0 S1 Cin
Arithmetic Circuit Contd….. ,[object Object],[object Object],[object Object],[object Object],Prof.  RAKESH ROSHAN 09971640291
LOGIC  MICROOPERATIONS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Logic Microoperations Prof.  RAKESH ROSHAN 09971640291
LIST  OF  LOGIC  MICROOPERATIONS ,[object Object],[object Object],[object Object],2 2 n ,[object Object],[object Object],Boolean Function Micro- Operations Name x  0 0 1 1 y  0 1 0 1 Logic Microoperations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Prof.  RAKESH ROSHAN 09971640291
HARDWARE  IMPLEMENTATION  OF  LOGIC MICROOPERATIONS 0  0  F = A    B  AND 0  1  F = A  B  OR 1  0  F = A    B  XOR 1  1  F = A’  Complement S 1   S 0 Output  -operation Function table Logic Microoperations Prof.  RAKESH ROSHAN 09971640291 B A S S F 1 0 i i i 0 1 2 3 4 X 1 MUX Select
APPLICATIONS OF LOGIC MICROOPERATIONS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Logic Microoperations Prof.  RAKESH ROSHAN 09971640291
SELECTIVE SET ,[object Object],[object Object],[object Object],[object Object],[object Object],Logic Microoperations Prof.  RAKESH ROSHAN 09971640291
SELECTIVE COMPLEMENT ,[object Object],[object Object],[object Object],[object Object],[object Object],Logic Microoperations Prof.  RAKESH ROSHAN 09971640291
SELECTIVE CLEAR ,[object Object],[object Object],[object Object],[object Object],[object Object],Logic Microoperations Prof.  RAKESH ROSHAN 09971640291
MASK OPERATION ,[object Object],[object Object],[object Object],[object Object],[object Object],Logic Microoperations Prof.  RAKESH ROSHAN 09971640291
CLEAR OPERATION ,[object Object],[object Object],[object Object],[object Object],Logic Microoperations Prof.  RAKESH ROSHAN 09971640291
INSERT OPERATION ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Logic Microoperations Prof.  RAKESH ROSHAN 09971640291
SHIFT  MICROOPERATIONS ,[object Object],[object Object],[object Object],[object Object],Shift Microoperations ,[object Object],[object Object],Shift micro operations are used for serial transfer of data. They are also used in conjunction with arithmetic, Logic and other data-processing operations. The contents of a register can be shifted to the left or the right. At the same time that the bits are shifted , the first flip-flop receives its binary information from the serial Input. During a shift-left operation the serial input transfers a bit into the rightmost position . During a shift- Right operation the serial inputs transfers a bit into the leftmost position. The information transferred through the serial input determines the type of shift. Prof.  RAKESH ROSHAN 09971640291 Serial input Serial input
LOGICAL SHIFT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Shift Microoperations Prof.  RAKESH ROSHAN 09971640291 0 0
CIRCULAR SHIFT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Shift Microoperations Prof.  RAKESH ROSHAN 09971640291
ARITHMETIC SHIFT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Shift Microoperations sign bit sign bit Prof.  RAKESH ROSHAN 09971640291 0
ARITHMETIC SHIFT Shift Microoperations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Prof.  RAKESH ROSHAN 09971640291
HARDWARE  IMPLEMENTATION  OF  SHIFT  MICROOPERATIONS Shift Microoperations A combinational circuit shifter can be constructed with multiplexers. The 4-bit shifter has four  Data inputs, A0 through A3 and four data outputs, H0 through H3. There are two serial inputs, one For shift left (IL) and the other for shift right (IR). When the selection input S=0 , the input data are  Shifted right (down in the diagram). When S=1, the input data are shifted left(up in the diagram). The function table shows which input goes to each output after the shift.  A shifter with n data and  Outputs requires n multiplexers. The two serial inputs can be controlled another multiplexer to  Provide the three possible types of shifts. Prof.  RAKESH ROSHAN 09971640291 S 0 1 H0 MUX S 0 1 H1 MUX S 0 1 H2 MUX S 0 1 H3 MUX Select 0 for shift right (down)  1 for shift left (up) Serial input (I R ) A0 A1 A2 A3 Serial input (I L )  Select Output S H0 H1 H2 H3 0 I R A0 A1 A2 1 A1 A2 A3 I L
ARITHMETIC  LOGIC  SHIFT  UNIT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Shift Microoperations The arithmetic, logic and shift circuits can be combined into One ALU with common selection variables. The subscript i  Designates a typical stage. Input A i  and B i  are applied to both the arithmetic and logic units. A particular microoperation is  selected with inputs S1 and S0. A 4*1 multiplexer at the output  chooses between an arithmetic output in E i  and a logic output  in Hi. The data in the multiplexer are selected with S3 and S2. The other two data inputs to the multiplexer receive inputs A i-1 for the shift-left operation. The output carry C i+1  of a given  arithmetic stage must be connected to the input carry C i  of  the next  stage in sequence. The input carry to the first stage  is the input carry C in  , which provides a selection variable for The arithmetic operations. Prof.  RAKESH ROSHAN 09971640291 Arithmetic Circuit Logic Circuit C C 4 x 1 MUX Select 0 1 2 3 F S3 S2 S1 S0 B A i A D A E shr shl i+1 i i i i+1 i-1 i i
Design of Fast adder  (Carry- Lookahead Addition) A fast adder circuit must speed up the generation of the carry signals. The logic expressions for s i (sum) and c i+1 (carry out) of stage i are  si=xi  yi  zi And ci+1=xiyi+xici+yici Factoring the second equation into ci+1=xiyi+(xi+yi)ci We can write ci+1=Gi and Pici Where Gi=xiyi and Pi=xi+yi The expression Gi and Pi are called the generate and propagate functions of stage i. If the generate function for stage I is equal to 1, then ci+1=1, independent of the input carry ci. This occurs when both xi and yi are 1. The propagate function means that an input carry will produce an output carry when either xi is 1 or yi is 1. All Gi and Pi functions can be formed independently and in parallel in one logic gate delay after the X and Y vectors are applied to the inputs of an n-bit adder. Prof.  RAKESH ROSHAN 09971640291
Design of Fast adder  (Carry-  Lookahead Addition) A fast adder circuit must speed up the generation of the carry signals. The logic expressions for s i (sum) and c i+1 (carry out) of stage i are  si=xi  yi  zi And ci+1=xiyi+xici+yici Factoring the second equation into ci+1=xiyi+(xi+yi)ci We can write ci+1=Gi and Pici Where Gi=xiyi and Pi=xi+yi Expanding ci in terms of i-1 subscripted variables and substituting into the ci+1 Expression, we obtain ci+1=Gi+PiGi-1 + PiPi-1ci-1 Continuing this type of expansion, the final expression for any carry variable is ci+1=Gi+PiGi-1 + PiPi-1Gi-2+……….+PiPi-1….P1G0+PiPi…….P0c0 Example:- c1=G0+Poc0 c2=G1+P1G0+P1P0c0 c3=G2+P2G1+P2P1G0+P2P1P0c0 c4=G3+P3G2+P3P2G1+P3P2P1G0+P3P2P1P0c0 The carries are implemented in the block labeled carry- lookahead logic. An adder implemented in this form is called a carry- lookahead adder. Prof.  RAKESH ROSHAN 09971640291
4-bit Carry- lookahead adder c0 s3 Where P 0 I =P 3 P 2 P 1 P 0 and  G 0 I =G 3 +P 3 G 2 +P 3 P 2 P 1 G 0 Prof.  RAKESH ROSHAN 09971640291 Carry- look ahead logic B cell B cell B cell B cell x3 y3 x2 y2 x1 y1 x0 y0 c3 c2 c1 s3 s2 s1 s0 c4 G3 G2 G1 G0 P3 P2 P1 P0 G 0 I P 0 I
Addition and Subtraction Algorithm Minuend in A Subtrahend in B Augend in A Addend in B As  Bs As  Bs EA   A+B’+1 AVF   0 EA   A+B E AVF   E A A   A’ A  A+1 As  As As   0 END (result is in A and As) Subtraction Operation Add Operation 1 0 1 0 0 1 !=0 0 A<B A>=B As=Bs As!=Bs As!=Bs As=Bs Prof.  RAKESH ROSHAN 09971640291
Booth Multiplication Algorithm Multiply Booth algorithm gives a procedure for multiplying binary integers in signed 2’s complement representation Prof.  RAKESH ROSHAN 09971640291 Multiplicand in BR Multiplier in QR AC   0 Qn+1   o SC   n QnQn+1 AC   AC-BR AC  AC+BR Ashr(AC & QR) SC   SC-1 SC END 10 01 00 11 !=0 0
Example of Multiplication with Booth algorithm Let n=5 , multiply =(-9) * (-13)=+117 Prof.  RAKESH ROSHAN 09971640291 Q n Q n+1 BR=10111 (BR)’+1=01001 AC QR Q n+1 SC Initial 00000 10011 0 101 10 Subtract BR 01001 01001 Ashr 00100 11001 1 100 11 Ashr 00010 01100 1 011 01 Add BR 10111 11001 Ashr 11100 10110 0 010 00 Ashr 11110 01011 0 001 10 Subtract BR 01001 00111 Ashr 00011 10101 1 000
IEEE standard for floating numbers This standard for representing floating-point numbers in 32 bits has been developed and specifies in detail By the Institute of Electrical and Electronics Engineers(IEEE).  The standard describes both the representation  and the way in which the four basic arithmetic operations are to be performed. In 32-bit representation, the  sign of the number is given in the first bit, followed by a representation for the exponent (to the base 2) of the Scale factor. Instead of the signed exponent, E, the value actually stored in the exponent field is an unsigned Integer E’=E+127. This is called the excess-127 format. The last 23 bits represent the mantissa. S E’ M 32 bits Sign of Number: 0 signifies + 1 signifies - 8-bit signed  Exponent in Excess-127 representation 23-bit Mantissa fraction Value represented=±1.M × 2  E’-127 Example : Representation of 1.001010……….0 ×2  -87 0  00101011 . 001010………………………………………………………………0 Prof.  RAKESH ROSHAN 09971640291

More Related Content

What's hot

Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
Umang Gupta
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
Bảo Hoang
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
Subesh Kumar Yadav
 

What's hot (20)

Register transfer language & its micro operations
Register transfer language & its micro operationsRegister transfer language & its micro operations
Register transfer language & its micro operations
 
Instruction codes
Instruction codesInstruction codes
Instruction codes
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
 
Computer Organisation - Addressing Modes
Computer Organisation - Addressing ModesComputer Organisation - Addressing Modes
Computer Organisation - Addressing Modes
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
Types of Instruction Format
Types of Instruction FormatTypes of Instruction Format
Types of Instruction Format
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
 
Computer organization and architecture
Computer organization and architectureComputer organization and architecture
Computer organization and architecture
 
Instruction Set Architecture
Instruction Set ArchitectureInstruction Set Architecture
Instruction Set Architecture
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
 
Instruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptxInstruction Cycle in Computer Organization.pptx
Instruction Cycle in Computer Organization.pptx
 
Control unit-implementation
Control unit-implementationControl unit-implementation
Control unit-implementation
 
CO by Rakesh Roshan
CO by Rakesh RoshanCO by Rakesh Roshan
CO by Rakesh Roshan
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instruction
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptxCS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
CS304PC:Computer Organization and Architecture Session 8 Address Sequencing.pptx
 
ADDRESSING MODES.pptx
ADDRESSING MODES.pptxADDRESSING MODES.pptx
ADDRESSING MODES.pptx
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 

Viewers also liked

Increment & decrement operator
Increment & decrement operatorIncrement & decrement operator
Increment & decrement operator
pratik8897
 
Register reference
Register referenceRegister reference
Register reference
Nitesh Singh
 
Article 52 swayam ko samajhana part1
Article 52 swayam ko samajhana   part1Article 52 swayam ko samajhana   part1
Article 52 swayam ko samajhana part1
Rakesh Roshan
 
1 s1 signed numbers
1 s1 signed numbers1 s1 signed numbers
1 s1 signed numbers
math123a
 

Viewers also liked (20)

Increment & decrement operator
Increment & decrement operatorIncrement & decrement operator
Increment & decrement operator
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer language
 
bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)bus and memory tranfer (computer organaization)
bus and memory tranfer (computer organaization)
 
4th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-74th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-7
 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mca
 
How to Open a Computer Repair Shop: 8 Steps to Build Your Client List [Slides]
How to Open a Computer Repair Shop: 8 Steps to Build Your Client List [Slides]How to Open a Computer Repair Shop: 8 Steps to Build Your Client List [Slides]
How to Open a Computer Repair Shop: 8 Steps to Build Your Client List [Slides]
 
RTL
 RTL RTL
RTL
 
Register reference
Register referenceRegister reference
Register reference
 
Article 52 swayam ko samajhana part1
Article 52 swayam ko samajhana   part1Article 52 swayam ko samajhana   part1
Article 52 swayam ko samajhana part1
 
Arithmetic Process in Computer Systems
Arithmetic Process in Computer SystemsArithmetic Process in Computer Systems
Arithmetic Process in Computer Systems
 
Module 1 8086
Module 1 8086Module 1 8086
Module 1 8086
 
1 s1 signed numbers
1 s1 signed numbers1 s1 signed numbers
1 s1 signed numbers
 
09 arithmetic
09 arithmetic09 arithmetic
09 arithmetic
 
Unit4 Slides
Unit4 SlidesUnit4 Slides
Unit4 Slides
 
C language UPTU Unit3 Slides
C language UPTU Unit3 SlidesC language UPTU Unit3 Slides
C language UPTU Unit3 Slides
 
Digital 1
Digital 1Digital 1
Digital 1
 
C language Unit 2 Slides, UPTU C language
C language Unit 2 Slides, UPTU C languageC language Unit 2 Slides, UPTU C language
C language Unit 2 Slides, UPTU C language
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Ch4
Ch4Ch4
Ch4
 

Similar to CO By Rakesh Roshan

Regis&Microo_fgfhkgfvg microperation aee
Regis&Microo_fgfhkgfvg microperation aeeRegis&Microo_fgfhkgfvg microperation aee
Regis&Microo_fgfhkgfvg microperation aee
Bala Anand
 
PPT in register and micro operations in electronic
PPT in register and micro operations in electronicPPT in register and micro operations in electronic
PPT in register and micro operations in electronic
aaravjamela
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4
Umang Gupta
 
LEC 2-register transfer and register transfer language.ppt
LEC 2-register transfer and register transfer language.pptLEC 2-register transfer and register transfer language.ppt
LEC 2-register transfer and register transfer language.ppt
mailmynew202
 
temp-1e80a1dc-6041-493a-af5a-e9ac6efabc65.pdf
temp-1e80a1dc-6041-493a-af5a-e9ac6efabc65.pdftemp-1e80a1dc-6041-493a-af5a-e9ac6efabc65.pdf
temp-1e80a1dc-6041-493a-af5a-e9ac6efabc65.pdf
BhureVedika
 

Similar to CO By Rakesh Roshan (20)

Chapter 4
Chapter 4Chapter 4
Chapter 4
 
coa
coacoa
coa
 
Top schools in noida
Top schools in noidaTop schools in noida
Top schools in noida
 
REGISTER TRANSFER AND MICROOPERATIONS
REGISTER  TRANSFER  AND  MICROOPERATIONSREGISTER  TRANSFER  AND  MICROOPERATIONS
REGISTER TRANSFER AND MICROOPERATIONS
 
COA LESSON.ppt
COA LESSON.pptCOA LESSON.ppt
COA LESSON.ppt
 
Register transfer and microoperations part 1
Register transfer and microoperations part 1Register transfer and microoperations part 1
Register transfer and microoperations part 1
 
Register Transfer Language & Microoperations.ppt
Register Transfer Language & Microoperations.pptRegister Transfer Language & Microoperations.ppt
Register Transfer Language & Microoperations.ppt
 
CO UNIT I PART I NOTES (1).ppt
CO UNIT I PART I NOTES (1).pptCO UNIT I PART I NOTES (1).ppt
CO UNIT I PART I NOTES (1).ppt
 
Regis&Microo_fgfhkgfvg microperation aee
Regis&Microo_fgfhkgfvg microperation aeeRegis&Microo_fgfhkgfvg microperation aee
Regis&Microo_fgfhkgfvg microperation aee
 
PPT in register and micro operations in electronic
PPT in register and micro operations in electronicPPT in register and micro operations in electronic
PPT in register and micro operations in electronic
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4
 
LEC 2-register transfer and register transfer language.ppt
LEC 2-register transfer and register transfer language.pptLEC 2-register transfer and register transfer language.ppt
LEC 2-register transfer and register transfer language.ppt
 
Register Transfer Language
Register Transfer LanguageRegister Transfer Language
Register Transfer Language
 
Commputer organization and assembly .ppt
Commputer organization and assembly .pptCommputer organization and assembly .ppt
Commputer organization and assembly .ppt
 
unit1COA Computer Organisation and Architecture
unit1COA Computer Organisation and Architectureunit1COA Computer Organisation and Architecture
unit1COA Computer Organisation and Architecture
 
REGISTER TRANSFER AND MICRO OPERATIONS
REGISTER TRANSFER AND MICRO OPERATIONSREGISTER TRANSFER AND MICRO OPERATIONS
REGISTER TRANSFER AND MICRO OPERATIONS
 
student important knowledge on computer data .pptx
student important knowledge on computer data .pptxstudent important knowledge on computer data .pptx
student important knowledge on computer data .pptx
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Register transfer and micro operation
Register transfer and micro operationRegister transfer and micro operation
Register transfer and micro operation
 
temp-1e80a1dc-6041-493a-af5a-e9ac6efabc65.pdf
temp-1e80a1dc-6041-493a-af5a-e9ac6efabc65.pdftemp-1e80a1dc-6041-493a-af5a-e9ac6efabc65.pdf
temp-1e80a1dc-6041-493a-af5a-e9ac6efabc65.pdf
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

CO By Rakesh Roshan

  • 1. Computer Organization UNIT 1 Prepared By Prof. Rakesh Roshan [email_address] n Prof. RAKESH ROSHAN 09971640291
  • 2. REGISTER TRANSFER AND MICROOPERATIONS • Register Transfer Language • Register Transfer • Bus and Memory Transfers • Arithmetic Microoperations • Logic Microoperations • Shift Microoperations • Arithmetic Logic Shift Unit Prof. RAKESH ROSHAN 09971640291
  • 3.
  • 4.
  • 5. MICROOPERATION (2) An elementary operation performed (during one clock pulse), on the information stored in one or more registers R  f(R, R) f: shift, load, clear, increment, add, subtract, complement, and, or, xor, … 1 clock cycle Register Transfer Language Prof. RAKESH ROSHAN 09971640291 ALU (f) Registers (R)
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. HARDWARE IMPLEMENTATION OF CONTROLLED TRANSFERS Implementation of controlled transfer P: R2  R1 Block diagram Timing diagram Clock Register Transfer Transfer occurs here R2 R1 Control Circuit Load P n Clock Load t t+1 The block diagram that depicts the transfer from R1 to R2. The n outputs of register R1 are connected to the n inputs of register R2. The letter n will be used to indicate any number of bits for the register. It will be replaced by an actual number when the length Of the register is known. Register R2 has load input that is activated by the control variable P. In timing diagram , P is activated in the control section by the rising edge of a clock pulse at time t. The next positive transition of the clock at time t+1 finds the load active and the data inputs of R2 are then loaded into the register in parallel. P may go back to 0 at Time t+1; otherwise, the transfer will occur with every clock pulse transition while P remains active. Prof. RAKESH ROSHAN 09971640291
  • 15.
  • 16. BASIC SYMBOLS FOR REGISTER TRANSFERS Capital letters Denotes a register MAR, R2 & numerals Parentheses () Denotes a part of a register R2(0-7), R2(L) Arrow   Denotes transfer of information R2  R1 Colon : Denotes termination of control function P: Comma , Separates two micro-operations A  B, B  A Symbols Description Examples Register Transfer Prof. RAKESH ROSHAN 09971640291
  • 17.
  • 18. Bus System for four registers From a register to bus: BUS  R Bus and Memory Transfers We can construct the common bus system is with multiplexers. The multiplexers select the source Register whose binary information is then placed on the bus. Prof. RAKESH ROSHAN 09971640291 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 Register A Register B Register C Register D B C D 1 1 1 4 x1 MUX B C D 2 2 2 4 x1 MUX B C D 3 3 3 4 x1 MUX B C D 4 4 4 4 x1 MUX 4-line bus x y select 0 0 0 0 Register A Register B Register C Register D Bus lines x y Register Selected 0 0 A 0 1 B 1 0 C 1 1 D
  • 19. TRANSFER FROM BUS TO A DESTINATION REGISTER Three-State Bus Buffers Bus line with three-state buffers Output Y=A if C=1 High-impedence if C=0 Normal input A Control input C Select Enable 0 1 2 3 S0 S1 A0 B0 C0 D0 Bus line for bit 0 Bus and Memory Transfers A bus system can be constructed with three-state gated instead of multiplexers. A three-state gate Is a 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 A logic significance. Three-state gates may perform any conventional logic, such as AND and NAND. However, the one most commonly used in the design of a bus system is the buffer gate. In the above diagram, The outputs of four buffers are connected together to form a single bus line . The control inputs to the buffers determine which of the four normal inputs will communicate With the bus line. No more than one buffer may be in the active state at any given time. The Connected buffers must be controlled so that only one three-state buffer has access to the bus line while all other buffers are maintained in a high impedance state. Prof. RAKESH ROSHAN 09971640291
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. SUMMARY OF R. TRANSFER MICROOPERATIONS Bus and Memory Transfers A  B Transfer content of reg. B into reg. A AR  DR(AD) Transfer content of AD portion of reg. DR into reg. AR A  constant Transfer a binary constant into reg. A ABUS  R1, Transfer content of R1 into bus A and, at the same time, R2  ABUS transfer content of bus A into R2 AR Address register DR Data register M[R] Memory word specified by reg. R M Equivalent to M[AR] DR  M Memory read operation: transfers content of memory word specified by AR into DR M  DR Memory write operation: transfers content of DR into memory word specified by AR Prof. RAKESH ROSHAN 09971640291
  • 26.
  • 27.
  • 28. BINARY ADDER / SUBTRACTOR / INCREMENTER Binary Adder-Subtractor Binary Adder Arithmetic Microoperations The addition and subtraction operations can be combined into one common circuit by including An exclusive-OR gate with full adder. In 4-bit adder-subtractor circuit, the mode input M controls The operation. When M=0 the circuit is an adder and when M=1 the circuit becomes a subtractor. Each exclusive-OR gate receive input M and one of the inputs of B. When M=0, we have B 0=B. The full adders receives the value of B, input carry is 0, and the circuit performs A plus B. When M=1 we have B 1=B’ and C0 = 1. The B inputs are all complemented and a 1 is added through The input carry. The circuit performs the operation A plus the 2’s complement of B. Prof. RAKESH ROSHAN 09971640291
  • 29.
  • 30. ARITHMETIC CIRCUIT S1 S0 Cin Y Output Microoperation 0 0 0 B D = A + B Add 0 0 1 B D = A + B + 1 Add with carry 0 1 0 B’ D = A + B’ Subtract with borrow 0 1 1 B’ D = A + B’+ 1 Subtract 1 0 0 0 D = A Transfer A 1 0 1 0 D = A + 1 Increment A 1 1 0 1 D = A - 1 Decrement A 1 1 1 1 D = A Transfer A Arithmetic Microoperations Prof. RAKESH ROSHAN 09971640291 S1 S0 0 1 2 3 4x1 MUX X0 Y0 C0 C1 D0 FA S1 S0 0 1 2 3 4x1 MUX X1 Y1 C1 C2 D1 FA S1 S0 0 1 2 3 4x1 MUX X2 Y2 C2 C3 D2 FA S1 S0 0 1 2 3 4x1 MUX X3 Y3 C3 C4 D3 FA Cout A0 B0 A1 B1 A2 B2 A3 B3 0 1 S0 S1 Cin
  • 31.
  • 32.
  • 33.
  • 34. HARDWARE IMPLEMENTATION OF LOGIC MICROOPERATIONS 0 0 F = A  B AND 0 1 F = A  B OR 1 0 F = A  B XOR 1 1 F = A’ Complement S 1 S 0 Output  -operation Function table Logic Microoperations Prof. RAKESH ROSHAN 09971640291 B A S S F 1 0 i i i 0 1 2 3 4 X 1 MUX Select
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47. HARDWARE IMPLEMENTATION OF SHIFT MICROOPERATIONS Shift Microoperations A combinational circuit shifter can be constructed with multiplexers. The 4-bit shifter has four Data inputs, A0 through A3 and four data outputs, H0 through H3. There are two serial inputs, one For shift left (IL) and the other for shift right (IR). When the selection input S=0 , the input data are Shifted right (down in the diagram). When S=1, the input data are shifted left(up in the diagram). The function table shows which input goes to each output after the shift. A shifter with n data and Outputs requires n multiplexers. The two serial inputs can be controlled another multiplexer to Provide the three possible types of shifts. Prof. RAKESH ROSHAN 09971640291 S 0 1 H0 MUX S 0 1 H1 MUX S 0 1 H2 MUX S 0 1 H3 MUX Select 0 for shift right (down) 1 for shift left (up) Serial input (I R ) A0 A1 A2 A3 Serial input (I L ) Select Output S H0 H1 H2 H3 0 I R A0 A1 A2 1 A1 A2 A3 I L
  • 48.
  • 49. Design of Fast adder (Carry- Lookahead Addition) A fast adder circuit must speed up the generation of the carry signals. The logic expressions for s i (sum) and c i+1 (carry out) of stage i are si=xi yi zi And ci+1=xiyi+xici+yici Factoring the second equation into ci+1=xiyi+(xi+yi)ci We can write ci+1=Gi and Pici Where Gi=xiyi and Pi=xi+yi The expression Gi and Pi are called the generate and propagate functions of stage i. If the generate function for stage I is equal to 1, then ci+1=1, independent of the input carry ci. This occurs when both xi and yi are 1. The propagate function means that an input carry will produce an output carry when either xi is 1 or yi is 1. All Gi and Pi functions can be formed independently and in parallel in one logic gate delay after the X and Y vectors are applied to the inputs of an n-bit adder. Prof. RAKESH ROSHAN 09971640291
  • 50. Design of Fast adder (Carry- Lookahead Addition) A fast adder circuit must speed up the generation of the carry signals. The logic expressions for s i (sum) and c i+1 (carry out) of stage i are si=xi yi zi And ci+1=xiyi+xici+yici Factoring the second equation into ci+1=xiyi+(xi+yi)ci We can write ci+1=Gi and Pici Where Gi=xiyi and Pi=xi+yi Expanding ci in terms of i-1 subscripted variables and substituting into the ci+1 Expression, we obtain ci+1=Gi+PiGi-1 + PiPi-1ci-1 Continuing this type of expansion, the final expression for any carry variable is ci+1=Gi+PiGi-1 + PiPi-1Gi-2+……….+PiPi-1….P1G0+PiPi…….P0c0 Example:- c1=G0+Poc0 c2=G1+P1G0+P1P0c0 c3=G2+P2G1+P2P1G0+P2P1P0c0 c4=G3+P3G2+P3P2G1+P3P2P1G0+P3P2P1P0c0 The carries are implemented in the block labeled carry- lookahead logic. An adder implemented in this form is called a carry- lookahead adder. Prof. RAKESH ROSHAN 09971640291
  • 51. 4-bit Carry- lookahead adder c0 s3 Where P 0 I =P 3 P 2 P 1 P 0 and G 0 I =G 3 +P 3 G 2 +P 3 P 2 P 1 G 0 Prof. RAKESH ROSHAN 09971640291 Carry- look ahead logic B cell B cell B cell B cell x3 y3 x2 y2 x1 y1 x0 y0 c3 c2 c1 s3 s2 s1 s0 c4 G3 G2 G1 G0 P3 P2 P1 P0 G 0 I P 0 I
  • 52. Addition and Subtraction Algorithm Minuend in A Subtrahend in B Augend in A Addend in B As Bs As Bs EA  A+B’+1 AVF  0 EA  A+B E AVF  E A A  A’ A  A+1 As  As As  0 END (result is in A and As) Subtraction Operation Add Operation 1 0 1 0 0 1 !=0 0 A<B A>=B As=Bs As!=Bs As!=Bs As=Bs Prof. RAKESH ROSHAN 09971640291
  • 53. Booth Multiplication Algorithm Multiply Booth algorithm gives a procedure for multiplying binary integers in signed 2’s complement representation Prof. RAKESH ROSHAN 09971640291 Multiplicand in BR Multiplier in QR AC  0 Qn+1  o SC  n QnQn+1 AC  AC-BR AC  AC+BR Ashr(AC & QR) SC  SC-1 SC END 10 01 00 11 !=0 0
  • 54. Example of Multiplication with Booth algorithm Let n=5 , multiply =(-9) * (-13)=+117 Prof. RAKESH ROSHAN 09971640291 Q n Q n+1 BR=10111 (BR)’+1=01001 AC QR Q n+1 SC Initial 00000 10011 0 101 10 Subtract BR 01001 01001 Ashr 00100 11001 1 100 11 Ashr 00010 01100 1 011 01 Add BR 10111 11001 Ashr 11100 10110 0 010 00 Ashr 11110 01011 0 001 10 Subtract BR 01001 00111 Ashr 00011 10101 1 000
  • 55. IEEE standard for floating numbers This standard for representing floating-point numbers in 32 bits has been developed and specifies in detail By the Institute of Electrical and Electronics Engineers(IEEE). The standard describes both the representation and the way in which the four basic arithmetic operations are to be performed. In 32-bit representation, the sign of the number is given in the first bit, followed by a representation for the exponent (to the base 2) of the Scale factor. Instead of the signed exponent, E, the value actually stored in the exponent field is an unsigned Integer E’=E+127. This is called the excess-127 format. The last 23 bits represent the mantissa. S E’ M 32 bits Sign of Number: 0 signifies + 1 signifies - 8-bit signed Exponent in Excess-127 representation 23-bit Mantissa fraction Value represented=±1.M × 2 E’-127 Example : Representation of 1.001010……….0 ×2 -87 0 00101011 . 001010………………………………………………………………0 Prof. RAKESH ROSHAN 09971640291