Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Complete subtrator 2 bits cascade for 4 bits

Hi! I'm new using quartus and I did a subtrator of 2 bits using 74151 multiplex in my protoboard and I want a complete subtrator in quartus but using a cascade for 4 bits, can somebody help me with this? thank u :D

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Implement a basic full adder circuit and build a functionality of an XOR gate (if the input to XOR is 1 then it subtracts if 0 it adds)

    to elaborate for a full adder

    A and B are inputs carry_out and sum_out are outputs

    XOR B with 1 for subtraction and cascade the carry_out to the next full adder (as carry_in).

    Best is to do it in schematic entry , instantiate a symbol of a full adder and draw four blocks in the block diagram file and connect the carryout to carry_in of the other full adders (the carry_in for the LSB full adder will be 0)

    Hope this helps