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

Why do I get an error in Scheme when I try to test for an empty list?
How to decrease background noise in binary image
Verify validity of a key without weakening of the chipher strength
What are the stabilty “factors” of sorting?
fuzzy list of items - shuffled, but in strict order
KMP v.s. Suffix Tree for sub-string match
Zig-zag fill algorithm?
Automatically compute mnemonic charachers for menu items
Seeking a O(nlogn) alg for counting point pairs with coordinates distance greater than certain value
Recursive Algorithm using iteration Method
How to set up a recurrence relation for a given algorithm or program
Polynomial reduction of Hamiltonian path to cycle and cycle to path
K distinct hash functions
How can I find out an induced subgraph of k nodes with at least m*k*(k-1)/n*(n-1) edges
linear solution of grid constraints
Inserting index that already exist into the tree

Categories

HOME
notepad++
fabricjs
assembly
serialization
camera
carousel
alsa
vxml
p2p
spring-social
pybossa
symbol
altera
capistrano3
fileserver
video-editing
delphi-xe5
inno-download-plugin
parcelable
aggregation
highstock
comparator
mount
syntax-highlighting
android-things
bringtofront
user-defined-functions
browser-sync
mql
corenlp-server
gitlab-api
livelink
jmockit
papaparse
gojs
baidu-map
swagger-php
recurrent-neural-network
bindingnavigator
knime
stylecop
robomongo
wcftestclient
hammer.js
arq
pair-programming
amq
subnet
colorbar
git-flow
cup
template-toolkit
mapxtreme
ng-grid
xdoclet
bizagi
crouton-os
sapi
gocql
oracle-spatial
amiga
dronekit-android
google-refine
nsurlsessiondatatask
uvc
broadband
primitive-types
with-statement
jjaql
koala
windows-embedded-standard
kendo-dataviz
inappsettingskit
beaker-testing
tlf
route-provider
joomla-template
cardreader
mysql-error-2013
jquery-blockui
xcode3.2
multiplexing
azman
fitbounds
jquery-address
ikimagebrowserview
lr
ie-compatibility-mode
easyb
aspmenu
zend-rest
lalr
sifr3

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