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

Fast Text Search Over Logs
Secret santa algorithm
Algorithm to blend gradient filled corners in image
Non-repeating pseudo random number stream with 'clumping'
given 5 numbers, what is the minimum number of comparisons needed to find the median?
How many floating-point operations for Strassen's algorithm for a matrix of size k x k?
Is there a simple algorithm that can determine if X is prime, and not confuse a mere mortal programmer?
How are ssl certificates verified?
Extracting Leaf paths from n-ary tree in F#
How to sort 32bit numbers to find unique entries?
room/timeslot schedule optimization
What's a good, non-recursive algorithm to calculate a Cartesian product?
Cluster and rank blogs by logical categories
An algorithm for splitting a sequence in equally spaced, non colliding subsequences
Smooth average of sales data
Array Fill w/Grouping

Categories

HOME
scikit-learn
api
jpa
phpmyadmin
pyqt
r-googlesheets
yandex
soa
pyqt4
gluon-mobile
odoo-8
lanczos
p2p
openpyxl
mxgraph
automatic-ref-counting
intercom
code-generation
comsol
renjin
heat
scsi
microsoft-dynamics-nav
aws-sdk
smartclient
jmp
selinux
dpdk
inno-download-plugin
android-maps
ms-access-2003
exchangewebservices
sqlpackage
zend-debugger
weather
angularjs-material
android-sugarorm
dynamic-jasper
reactjs.net
carriage-return
hibernate-search
pop3
modalviewcontroller
reverse
processwire
apic
ideascript
nohup
amazon-ses
google-data-api
unordered-map
hackintosh
trigonometry
oracle-service-bus
vaadin-charts
procfile
ovf
textsum
mongotemplate
openblas
google-cse
modelsim
jtree
filenet
branch-prediction
simplepie
latin
lean
embedding
tracker-enabled-dbcontext
uiactionsheet
contentcontrol
boomerang
assertion
grgit
xvim
viola-jones
amiga
ansi
rrule
bcache
apache-spark-1.3
administration
nsmenu
mintty
tinyxml
draw2d-js
sphinxql
observium
cnf
cmmi
tree-balancing
jquery-blockui
vfs
garbage
extconf.rb
josql
kqueue
hibernateexception
node-redis
denied
multiplatform
http-daemon
ie-compatibility-mode
blender-2.49
web-application-project
tui
todos
movieplayer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App