Jump to content

Logical bit operator NOT

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
jastein

jastein

    Newbie

  • Members
  • Pip
  • 1 posts
I just started studying the MIPS processor architecture. In this architecture, the instruction set includes AND, OR, and NAND. However, there is no opcode for the NOT bitwise operation.

My question is, how can I use AND/OR/NAND to find the complement of a bit?

#2
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
NAND the bits together and will you will get its complement.

A NAND A = A'
1 NAND 1 = 0
0 NAND 0 = 1