### algorithm

#### How to “NOT” a register in mips assembly

Since there isn't a NOT logical operator in mips assembly, how can one "not" the contents of a register?

Load -1 into another register, then XOR the registers. https://www.cs.umd.edu/class/sum2003/cmsc311/Notes/Mips/bitwise.html

You can use nor and the zero-register to fit everything into one instruction: nor $<dest_reg> $<in_reg> $zero Another approach would be using xor and -1 as this is encoded as 1111...1111 in 2s-component. li $<help_reg>, -1 # load -1 into help-register xor $<dest_reg>, $<in_reg>, $<help_reg> # actual not-operation

### Related Links

Symbolic Differentiation Algorithm

Dynamic programming graph algorithm

Graph: count cycles that include a node

What is the inductive invariant of the simple concurrent program?

Preventing lines from overlapping

Optimising manipulation of large vectors

Linked List Class in MATLAB - Insert node manually without insertAfter()

How to solve this with simple forward-backward algorithm?

Keep only largest/smallest sized versioned file each in a directory?

What is the next number in this sequence of numbers? [closed]

2D map translation computation

Find Shortest path to the items in a grocery store [duplicate]

Finding keywords in a set of small texts

Removing duplicate strings with limited memory [closed]

How to find the index of a k-permutation from n elements?

What does decrease-by-one algorithm mean? [duplicate]