guys please help me in this Logic gates problem?
Which of the following expressions obtains -n for an 8-digit binary number n when a negative number is expressed as the two's complement? Here, + indicates addition,while OR and XOR indicate,respectively , the logical sum and exclusive logical sum of the bits
a) (n OR 10000000) + 00000001
b) (n OR 11111110) + 11111111
c) (n XOR 10000000) + 11111111
d) (n XOR 11111111) + 00000001
guys can you pls also explain... i really having a hard time in this problem... i just need your help... thnx
- Anonymous1 decade ago
converting to negative in 2's complement:
flip all the bits, then add 1. looks like D. although i haven't thought that hard about it, because this is the algorithm for turning a positive into a negative so i dunno if it works in reverse.