arithmetic logic unit.doc

Upload: dinesh-kumar-mehra

Post on 11-Feb-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/23/2019 ARITHMETIC LOGIC UNIT.doc

    1/7

    ARITHMETIC LOGIC UNITInstruction manual

    AMBEY INTERNATIONAL

    118,KARANPURI, BEHIND B.D FLOOR MILL

    AMBALA CANTT0171-2690119

    09416688905, 09671237222, 08059302001

    [email protected],[email protected]

    AMBEYnew generation equipments

    mailto:[email protected]:[email protected]:[email protected]:[email protected]:[email protected]
  • 7/23/2019 ARITHMETIC LOGIC UNIT.doc

    2/7

    ARITHMETIC LOGIC UNIT

    To verify the Function table of 4 bit ALU( IC 74181.

    FEATURE:

    Provides 16 arithmetic operations: add, subtract, compare, double, plus twelve otherarithmetic operations Provides all 16 logic operations of two variables:exclusive-OR, compare, AND, NAND, OR, NOR, plus ten other logic operations Full lookahead for high speed arithmetic operation on long words

    The DM74LS181 is a 4-bit high speed parallel Arithmetic Logic Unit (ALU). Controlledby the four Function Select inputs (S0S3) and the Mode Control input (M), it canperform all the 16 possible logic operations or 16 different arithmetic operations onactive HIGH or active LOW operands. The Function Table lists these operations Whenthe Mode Control input (M) is HIGH, all internal carries are inhibited and the deviceperforms logic operations on the individual bits as listed. When the Mode Control

    input is LOW, the carries are enabled and the device performs arithmetic operationson the two 4-bit words. The device incorporates full internal carry look ahead andprovides for either ripple carry between devices using the Cn+4 output, or for carrylook ahead between packages using thesignals P (Carry Propagate) and G (Carry Generate). In the ADD mode, P indicatesthat F is 15 or more, while G indicates that F is 16 or more. In the SUBTRACT mode, Pindicates that F is zero or less, while G indicates that F is less than zero. P and G arenot affected by carry in. When speed requirements are not stringent, it can be usedin a simple ripple carry mode by connecting the Carry output (Cn+4) signal to theCarry input (Cn ) of the next unit. For high speed operation the device is used inconjunction withthe 9342 or 93S42 carry look ahead circuit. One carry look ahead package is requiredfor each group of four DM74LS181 devices. Carry look ahead can be provided at

    various levels and offers high speed capability over extremely long word lengths.The A = B output from the device goes HIGH when all four F outputs are HIGH andcan be used to indicate logic equivalence over four bits when the unit is in thesubtract mode.

    The A = B output is open-collector and can be wiredAND with other A = B outputs togive a comparison for more than four bits. The A = B signal can also be used with theCn+4 signal to indicate A > B and A < B.

    The Function Table lists the arithmetic operations that are performed without a carryin. An incoming carry adds a one to each operation. Thus, select code LHHLgenerates A minus B minus 1 (2s Complement notation) without a carry in andgenerates A minus B when a carry is applied.Because subtraction is actually performed by complementary addition (1scomplement), a carry out means borrow;thus a carry is generated when there is no underflow and no carry is generated whenthere is underflow. As indicated, this device can be used with either active LOWinputs producing active LOW outputs or with active HIGH inputs producing activeHIGH outputs. For either case thetable lists the operations that are performed to the operands labeled inside the logicsymbol.

    Procedure: -

  • 7/23/2019 ARITHMETIC LOGIC UNIT.doc

    3/7

    1. Connections are made as shown in the Connection diagram shown

    below.

    2. Connect the inputs switches to both inputs A & B.

    3. Connect the output indicator with all outputs.

    4. Connect the select inputs to the input switches.5. Connect the control inputs as per the truth table shown below.

    6. Check and verify the connections with circuit diagram,.

    7. Switch on the power to the trainer.

    8. Decide the operation which to be performed.

    9. Say I have decided to implement the complement operation.

    10.We know it is a logic function, so we have to apply the control

    signal as per logic operations.

    11.Select the corresponding select code 0000 through the input

    switches.

    12.Apply control signal M=1and carry = X (Dont care).

    13.Now apply the input signal at the pins of A input A3A2A1A0= 0101

    14.Then you will observe the output at F= 1010 , the complement of

    A inputs.

    15.Same way the repeat the procedure for other logical operation by

    looking up the truth table.

    16.Keep in mind, each arithmetic & logic operation have its own

    select code, control input setting, you must apply the correct

    inputs for get the correct results.

    17.Perform and try the other operations.

    Pin detail & Function table:-

  • 7/23/2019 ARITHMETIC LOGIC UNIT.doc

    4/7

  • 7/23/2019 ARITHMETIC LOGIC UNIT.doc

    5/7

  • 7/23/2019 ARITHMETIC LOGIC UNIT.doc

    6/7

    IC 74181

  • 7/23/2019 ARITHMETIC LOGIC UNIT.doc

    7/7