Is there a code in the CPU12 processor that provides straightforward NOT functionality?
Asked
Active
Viewed 124 times
3
-
Logical NOT is not a common microprocessor feature. I suppose it could exist on some processor, but not any those that I've ever worked with. – Jim Mischel Sep 30 '12 at 22:11
-
Jim, on a MIPS processor, there is a way to do this: slti dest_reg, src_reg, 1 is exactly equivalent to a logical not. 0 becomes 1 and all non-zero values become 0. – gary Nov 12 '12 at 12:37
2 Answers
1
This should be the datasheet you're looking for. There is no logical NOT
available, you'll have to code it yourself.

Avio
- 2,700
- 6
- 30
- 50
0
COM, COMA and COMB look like they do what you're looking for; they calculate the one's complement for a memory location, the A or the B register, respectively.

Omaha
- 2,262
- 15
- 18
-
I'm looking for a logical NOT, not a bitwise NOT. ie. I do not want 10 to become 01, i want it to become 00. – fgda Asdfasdaf Sep 30 '12 at 03:48