Full Subtractor Design using Logical Gates (Data Flow Modeling Style)-
Program-
//-----------------------------------------------------------------------------
//
// Title : full_subtractor
// Design : vhdl_test
// Author : Naresh Singh Dobal
// Company : nsd
//
//-----------------------------------------------------------------------------
//
// File : Full Subtractor Design using Logical Expression.v
module full_subtractor ( a ,b ,c ,diff ,borrow );
output diff ;
output borrow ;
input a ;
input b ;
input c ;
assign diff = a ^ b ^ c;
assign borrow = ((~a) & b) | (b & c) | (c & (~a));
endmodule
Output Waveform : Full Subtractor |
Program-
//-----------------------------------------------------------------------------
//
// Title : full_subtractor
// Design : vhdl_test
// Author : Naresh Singh Dobal
// Company : nsd
//
//-----------------------------------------------------------------------------
//
// File : Full Subtractor Design using Logical Expression.v
module full_subtractor ( a ,b ,c ,diff ,borrow );
output diff ;
output borrow ;
input a ;
input b ;
input c ;
assign diff = a ^ b ^ c;
assign borrow = ((~a) & b) | (b & c) | (c & (~a));
endmodule
2 comments :
Can this be extended to 16 bit?
fuck you
Post a Comment