Meaning of negate binary number

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Meaning of negate binary number

perrothedog
After reading chapter 2 of the book, I am confused as to whether negating an input means to flip all of the bits in the binary number (Not16) or to actually make the number negative using two`s complement, (Not16 then Inc16). To me, it seems like negating should mean to actually make a number negative but I need to know for sure in order to make my ALU.
Reply | Threaded
Open this post in threaded view
|

Re: Meaning of negate binary number

ybakos
The ALU supports both operations: !x and -x. The first is boolean/binary negation (flipping the bits) while the latter is arithmetic negation (negating the value of a number).
Reply | Threaded
Open this post in threaded view
|

Re: Meaning of negate binary number

perrothedog
Oh ok thank you but I`m still wondering whether when selected do the nx and ny control bits indicate arithmetic negation or binary negation.
Reply | Threaded
Open this post in threaded view
|

Re: Meaning of negate binary number

perrothedog
Well I actually just finished my ALU using binary negation and it checked out fine so I guess my question is answered