### 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

How is pre-computation handled by complexity notation?

Smallest missing integer algorithm that runs in O(n)?

Recursively deleting nodes from a balanced tree

Programming a probability to allow an AI decide when to discard a card or not in 5 card poker

How to approximate the sum of number of divisors from 1 to n?

Why is it mandatory that Dijkstra's algorithm extracts min in each round?

case matching strings based on an algorithm. Which algorithm should I use?

Compressed Sparse Row (CSR): How do you store empty rows?

Why Shortest Job First(SJF) algorithm is not used instead of FCFS at final level in Multilevel Feedback Scheduling

Do Red-Black tree and AVL tree have same balance condition?

Calculate the formula from pseudo code

How many sets of 4 numbers are there such that their xor is equal to 0?

Compare growth rate of two functions. (Tricky)

Scala Stream Method takeWhile

Runtime of following algorithm?

What is the highest suitable integer for rolling modulo hasing?