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

Finding the index of a given permutation
General approach to count word occurrence in large number of files
Binary String Search - minimum bin width?
interviewstreet Triplet challenge
Reverse Rectangle Packing
What is the time complexity of initializing a 2-D matrix?
Block Placement Algorithm
Increasing relevancy of search results
Questions about encryption [closed]
How to compute single source shortest paths with OSRM?
Fast algorithm to access tiles in a circle in a tiled map based game
Get some point location using the degrees based on the main point [closed]
Heap - Preforming DeleteMax operations on an unknown input - realization
How to find the smallest missing positive integer from an unsorted stream of positive integers? [duplicate]
C4.5 Decision tree making algorithm
Red black tree red children property check

Categories

HOME
obfuscation
sublimetext
iis-6
endpoint
3nf
git-extensions
production
lilypond
postscript
aggregation
flask-sqlalchemy
direct3d11
beautifier
interbase
licensing
amazon-quicksight
outliers
entity-relationship-model
browser-sync
paragraph
dsx-desktop
activexobject
vue-chartjs
reactjs.net
indy10
arduino-ide
least-squares
mnist
servicestack-text
raft
zoomify
ods
apns-php
news
tasm
print-css
logback-groovy
x++
flask-restful
arq
java-bytecode-asm
otp
type-theory
rxtx
renaming
parfor
pacemaker
burrows-wheeler-transform
uicolor
cifilter
maybe
django-urls
dock
linked-tables
umlgraph
nodelist
administration
cbind
wcm
build-script
getopt
sbcl
syndicationfeed
rolify
onload-event
mysql-error-2013
promotion-code
matlab-load
cloudfiles
office-2007
application-verifier
pagemethods
lxr
data-mapping
skype4java
dsl-tools
sqlobject
movieplayer
blind
appliance

Resources

Encrypt Message