Question: binSub.v: A digital circuit that subtracts two 8 - bit 2 ' s complement numbers. Your task in this assignment part is to create a
binSub.v: A digital circuit that subtracts two bit s complement numbers.
Your task in this assignment part is to create a digital circuit that calculates difference minuend subtrahend for three numbers minuend, subtrahend, and difference all encoded as bit s complement numbers.
Input and output format: The interface to the binary subtraction logic is given in binSub.v
Hints: The demonstration code for a bit negator that finds the negated value of a bit s complement number in the negator directory should be useful. You may also want to read about halfadders and fulladders for additional hints for this part. The logic for this part can be co
mpleted in under lines of code.
Here is given binSub.v:
input : minuend;
input : subtrahend;
output : difference;
wire invsubtrahend;
wire invsubtrahend;
wire invsubtrahend;
wire invsubtrahend;
wire invsubtrahend;
wire invsubtrahend;
wire invsubtrahend;
wire invsubtrahend;
wire negatorcarry;
wire negatorcarry;
wire negatorcarry;
wire negatorcarry;
wire negatorcarry;
wire negatorcarry;
wire negatorcarry;
wire negatorcarry;
wire negsubtrahend;
wire negsubtrahend;
wire negsubtrahend;
wire negsubtrahend;
wire negsubtrahend;
wire negsubtrahend;
wire negsubtrahend;
wire negsubtrahend;
assign invsubtrahend ~ subtrahend;
assign invsubtrahend ~ subtrahend;
assign invsubtrahend ~ subtrahend;
assign invsubtrahend ~ subtrahend;
assign invsubtrahend ~ subtrahend;
assign invsubtrahend ~ subtrahend;
assign invsubtrahend ~ subtrahend;
assign invsubtrahend ~ subtrahend;
assign negatorcarry invsubtrahend;
assign negatorcarry negatorcarry & invsubtrahend;
assign negatorcarry negatorcarry & invsubtrahend;
assign negatorcarry negatorcarry & invsubtrahend;
assign negatorcarry negatorcarry & invsubtrahend;
assign negatorcarry negatorcarry & invsubtrahend;
assign negatorcarry negatorcarry & invsubtrahend;
assign negatorcarry negatorcarry & invsubtrahend;
assign negsubtrahend ~ invsubtrahend;
assign negsubtrahend negatorcarry invsubtrahend;
assign negsubtrahend negatorcarry invsubtrahend;
assign negsubtrahend negatorcarry invsubtrahend;
assign negsubtrahend negatorcarry invsubtrahend;
assign negsubtrahend negatorcarry invsubtrahend;
assign negsubtrahend negatorcarry invsubtrahend;
assign negsubtrahend
negatorcarry invsubtrahend;
Here is example input and outputs:
TestCase:
Answer:
difference
TestCase:
Answer:
difference
TestCase:
Answer:
difference
TestCase:
Answer:
difference
TestCase:
Answer:
difference
TestCase:
Answer:
difference
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
