Making a negative number with ALU

Thread Starter

clguy

Joined Sep 26, 2012
2
Hello, I am stuck on a problem I am having in class. We are making ALU's and I am supposed to get my value to pass a number and make it a negative. Its an 8 bit number to negative. Example I am passing 5 and 5 as the two numbers...make negative by complementing them (A/A)...then add 1 I am getting B/B...my instructor told me I should be getting A/B...I am lost!! can anyone help...design attached.

I am to get with this design:
A+B
A-B
A^B
AorB
A
-A

All of them are working but the -A. Three switches: 1 to choose logic or arithmetic, 1 fpr A and/or B...A, and 1 switch for A+/-B and -A.
 

Attachments

Last edited:

WBahn

Joined Mar 31, 2012
29,978
Yeah, I'm lost, too.

Could you try to explain what you are trying to do bit more clearly and provide a complete example both of what you are getting and what you think you should be getting?
 
Top