Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21336 Discussions

Complete subtrator 2 bits cascade for 4 bits

Altera_Forum
Honored Contributor II
1,135 Views

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

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
446 Views

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
0 Kudos
Reply