<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
NOP	B-Language
,	O
no-op	B-Language
,	O
or	O
NOOP	B-Language
(	O
pronounced	O
"	O
no	B-Language
op	I-Language
"	O
;	O
short	O
for	O
no	B-Language
operation	I-Language
)	O
is	O
a	O
machine	B-Language
language	I-Language
instruction	O
and	O
its	O
assembly	B-Language
language	I-Language
mnemonic	O
,	O
programming	O
language	O
statement	O
,	O
or	O
computer	O
protocol	O
command	O
that	O
does	O
nothing	O
.	O
</s>
<s>
Some	O
computer	O
instruction	B-General_Concept
sets	I-General_Concept
include	O
an	O
instruction	O
whose	O
explicit	O
purpose	O
is	O
to	O
not	O
change	O
the	O
state	O
of	O
any	O
of	O
the	O
programmer-accessible	O
registers	B-General_Concept
,	O
status	B-Operating_System
flags	I-Operating_System
,	O
or	O
memory	O
.	O
</s>
<s>
In	O
other	O
instruction	B-General_Concept
sets	I-General_Concept
,	O
there	O
is	O
no	O
explicit	O
NOP	B-Language
instruction	O
,	O
but	O
the	O
assembly	B-Language
language	I-Language
mnemonic	O
NOP	B-Language
represents	O
an	O
instruction	O
which	O
acts	O
as	O
a	O
NOP	B-Language
;	O
e.g.	O
,	O
on	O
the	O
SPARC	B-Architecture
,	O
sethi	O
0	O
,	O
%g0	O
.	O
</s>
<s>
A	O
NOP	B-Language
must	O
not	O
access	O
memory	O
,	O
as	O
that	O
could	O
cause	O
a	O
memory	O
fault	O
or	O
page	B-General_Concept
fault	I-General_Concept
.	O
</s>
<s>
A	O
NOP	B-Language
is	O
most	O
commonly	O
used	O
for	O
timing	O
purposes	O
,	O
to	O
force	O
memory	B-Application
alignment	I-Application
,	O
to	O
prevent	O
hazards	B-General_Concept
,	O
to	O
occupy	O
a	O
branch	B-General_Concept
delay	I-General_Concept
slot	I-General_Concept
,	O
to	O
render	O
void	O
an	O
existing	O
instruction	O
such	O
as	O
a	O
jump	O
,	O
as	O
a	O
target	O
of	O
an	O
execute	B-General_Concept
instruction	I-General_Concept
,	O
or	O
as	O
a	O
place-holder	O
to	O
be	O
replaced	O
by	O
active	O
instructions	O
later	O
on	O
in	O
program	O
development	O
(	O
or	O
to	O
replace	O
removed	O
instructions	O
when	O
reorganizing	O
would	O
be	O
problematic	O
or	O
time-consuming	O
)	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
a	O
NOP	B-Language
can	O
have	O
minor	O
side	O
effects	O
;	O
for	O
example	O
,	O
on	O
the	O
Motorola	B-Device
68000	I-Device
series	I-Device
of	O
processors	O
,	O
the	O
NOP	B-Language
opcode	B-Language
causes	O
a	O
synchronization	O
of	O
the	O
pipeline	B-General_Concept
.	O
</s>
<s>
Listed	O
below	O
are	O
the	O
NOP	B-Language
instruction	O
for	O
some	O
CPU	B-General_Concept
architectures	O
:	O
</s>
<s>
CPU	B-General_Concept
architecture	O
Instruction	O
mnemonic	O
Bytes	B-Application
Opcode	B-Language
Notes	O
Intel	B-Operating_System
x86	I-Operating_System
CPU	B-General_Concept
family	O
NOP	B-Language
1	O
;	O
1	O
–	O
9	O
for	O
i686	O
and	O
x86-64	O
0x90	O
0x90	O
decodes	O
to	O
xchg	O
eax	O
,	O
eax	O
in	O
all	O
modes	O
except	O
long	B-Application
mode	I-Application
,	O
where	O
the	O
opcode	B-Language
0x90	O
still	O
has	O
no	O
effect	O
.	O
</s>
<s>
Intel	B-Architecture
8051	I-Architecture
/	O
MCS-51	B-Architecture
family	O
NOP	B-Language
1	O
0x00	O
ARM	B-Architecture
A32	I-Architecture
NOP	B-Language
4	O
0x00000000	O
This	O
stands	O
for	O
andeq	O
r0	O
,	O
r0	O
,	O
r0	O
.	O
</s>
<s>
The	O
assembly	O
instruction	O
nop	B-Language
will	O
most	O
likely	O
expand	O
to	O
mov	O
r0	O
,	O
r0	O
which	O
is	O
encoded	O
0xE1A00000	O
(	O
little-endian	O
architecture	O
)	O
.	O
</s>
<s>
ARM	O
T32	O
(	O
16	O
bit	O
)	O
NOP	B-Language
2	O
0xb000	O
Opcode	B-Language
for	O
ADD	O
SP	O
,	O
#0	O
-	O
Add	O
zero	O
to	O
the	O
stack	O
pointer	O
(	O
No	B-Language
operation	I-Language
)	O
.	O
</s>
<s>
The	O
assembly	O
instruction	O
nop	B-Language
will	O
most	O
likely	O
expand	O
to	O
mov	O
r8	O
,	O
r8	O
which	O
is	O
encoded	O
0x46C0	O
.	O
</s>
<s>
ARM	O
T32	O
(	O
32	O
bit	O
)	O
NOP	B-Language
4	O
0xF3AF	O
8000	O
ARM	O
A64	O
(	O
64	O
bit	O
)	O
NOP	B-Language
4	O
0xD503201F	O
AVR	B-Architecture
NOP	B-Language
2	O
0x0000	O
one	O
clock	O
cycle	O
IBM	O
System/360	O
,	O
IBM	O
System/370	O
,	O
IBM	O
System/390	O
,	O
z/Architecture	B-Device
,	O
UNIVAC	O
Series	O
90	O
NOP	B-Language
4	O
0x47000000	O
or	O
0x470nnnnn	O
or	O
0x47n0nnnn	O
where	O
"	O
n	O
"	O
is	O
any	O
4-bit	O
value	O
.	O
</s>
<s>
The	O
NOP	B-Language
(	O
"	O
No-Op	B-Language
"	O
)	O
and	O
NOPR	O
(	O
"	O
No-Op	B-Language
Register	O
"	O
)	O
are	O
a	O
subset	O
of	O
the	O
"	O
Branch	O
on	O
Condition	O
"	O
or	O
"	O
Branch	O
on	O
Condition	O
Register	O
"	O
instructions	O
,	O
respectively	O
;	O
both	O
versions	O
have	O
two	O
options	O
for	O
generating	O
a	O
NO-OP	B-Language
.	O
</s>
<s>
In	O
the	O
case	O
of	O
both	O
the	O
NOP	B-Language
and	O
NOPR	O
instructions	O
,	O
the	O
first	O
0	O
in	O
the	O
second	O
byte	B-Application
is	O
the	O
"	O
mask	O
"	O
value	O
,	O
the	O
condition	O
to	O
test	O
such	O
as	O
equal	O
,	O
not	O
equal	O
,	O
high	O
,	O
low	O
,	O
etc	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
the	O
NOPR	O
instruction	O
,	O
the	O
second	O
value	O
in	O
the	O
second	O
byte	B-Application
is	O
the	O
register	O
to	O
branch	O
on	O
.	O
</s>
<s>
Thus	O
,	O
if	O
either	O
of	O
the	O
two	O
values	O
in	O
the	O
second	O
byte	B-Application
is	O
0	O
,	O
the	O
branch	O
will	O
not	O
happen	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
the	O
NOP	B-Language
instruction	O
,	O
the	O
second	O
value	O
in	O
the	O
second	O
byte	B-Application
is	O
the	O
"	O
base	O
"	O
register	O
of	O
a	O
combined	O
base	O
register	O
,	O
displacement	O
register	O
and	O
offset	O
address	O
.	O
</s>
<s>
SuperH	O
NOP	B-Language
2	O
0x0009	O
MIPS	B-Device
NOP	B-Language
4	O
0x00000000	O
Stands	O
for	O
sll	O
r0	O
,	O
r0	O
,	O
0	O
,	O
meaning	O
:	O
Logically	O
shift	O
register	O
0	O
zero	O
bits	O
to	O
the	O
left	O
and	O
store	O
the	O
result	O
in	O
register	O
0	O
.	O
</s>
<s>
MIPS-X	B-General_Concept
NOP	B-Language
4	O
0x60000019	O
(	O
extended	O
opcode	B-Language
for	O
add	O
r0	O
,	O
r0	O
,	O
r0	O
)	O
MIX	O
NOP	B-Language
1	O
word	O
±	O
*	O
*	O
*	O
*	O
0	O
The	O
*	O
bytes	B-Application
are	O
arbitrary	O
,	O
and	O
can	O
be	O
anything	O
from	O
0	O
to	O
the	O
maximum	O
byte	B-Application
(	O
required	O
to	O
be	O
in	O
the	O
range	O
63-99	O
)	O
.	O
</s>
<s>
Motorola	B-Device
68000	I-Device
family	I-Device
NOP	B-Language
2	O
0x4E71	O
This	O
synchronizes	O
the	O
pipeline	B-General_Concept
and	O
prevents	O
instruction	O
overlap	O
.	O
</s>
<s>
Motorola	B-Device
6809	I-Device
NOP	B-Language
1	O
0x12	O
MOS	B-General_Concept
Technology	I-General_Concept
65xx	I-General_Concept
(	O
e.g.	O
</s>
<s>
6502	B-General_Concept
)	O
NOP	B-Language
1	O
0xEA	O
NOP	B-Language
consumes	O
two	O
clock	O
cycles	O
.	O
</s>
<s>
Undefined	B-Language
opcodes	I-Language
in	O
the	O
NMOS	B-Algorithm
versions	O
of	O
the	O
65xx	B-General_Concept
family	O
were	O
converted	O
to	O
be	O
NOPs	B-Language
of	O
varying	O
instruction	O
lengths	O
and	O
cycle	O
times	O
in	O
the	O
65C02	B-General_Concept
.	O
</s>
<s>
PowerPC	B-Architecture
NOP	B-Language
4	O
0x60000000	O
(	O
extended	O
opcode	B-Language
for	O
ori	O
r0	O
,	O
r0	O
,	O
0	O
)	O
PIC	B-Architecture
microcontroller	I-Architecture
NOP	B-Language
12	O
bits	O
0b000000000000	O
MOVW	O
0	O
,	O
W	O
RISC-V	B-Device
NOP	B-Language
4	O
0x00000013	O
ADDI	O
x0	O
,	O
x0	O
,	O
0	O
SPARC	B-Architecture
NOP	B-Language
4	O
0x01000000	O
Stands	O
for	O
sethi	O
0	O
,	O
%g0	O
which	O
zeroes	O
the	O
hardwired-to-zero	O
%g0	O
register	O
Z80	B-General_Concept
NOP	B-Language
1	O
0x00	O
There	O
are	O
some	O
other	O
instructions	O
without	O
any	O
effect	O
(	O
and	O
the	O
same	O
timing	O
)	O
:	O
LD	O
A	O
,	O
A	O
,	O
LD	O
B	O
,	O
B	O
etc	O
.	O
</s>
<s>
From	O
a	O
hardware	O
design	O
point	O
of	O
view	O
,	O
unmapped	O
areas	O
of	O
a	O
bus	O
are	O
often	O
designed	O
to	O
return	O
zeroes	O
;	O
since	O
the	O
NOP	B-Language
slide	O
behavior	O
is	O
often	O
desirable	O
,	O
it	O
gives	O
a	O
bias	O
to	O
coding	O
it	O
with	O
the	O
all-zeroes	O
opcode	B-Language
.	O
</s>
<s>
A	O
function	O
or	O
a	O
sequence	O
of	O
programming	O
language	O
statements	O
is	O
a	O
NOP	B-Language
or	O
null	O
statement	O
if	O
it	O
has	O
no	O
effect	O
.	O
</s>
<s>
In	O
Ada	B-Language
,	O
the	O
null	O
statement	O
serves	O
as	O
a	O
NOP	B-Language
.	O
</s>
<s>
The	O
simplest	O
NOP	B-Language
statement	O
in	O
C	O
is	O
the	O
null	O
statement	O
,	O
which	O
is	O
just	O
a	O
semi-colon	O
in	O
a	O
context	O
requiring	O
a	O
statement	O
.	O
</s>
<s>
An	O
empty	O
block	O
(	O
compound	O
statement	O
)	O
is	O
also	O
a	O
NOP	B-Language
,	O
and	O
may	O
be	O
more	O
legible	O
:	O
</s>
<s>
In	O
Fortran	B-Application
,	O
the	O
CONTINUE	O
statement	O
is	O
used	O
in	O
some	O
contexts	O
such	O
as	O
the	O
last	O
statement	O
in	O
a	O
DO	O
loop	O
,	O
although	O
it	O
can	O
be	O
used	O
anywhere	O
,	O
and	O
does	O
not	O
have	O
any	O
functionality	O
.	O
</s>
<s>
The	O
JavaScript	B-Language
language	I-Language
does	O
not	O
have	O
a	O
built-in	O
NOP	B-Language
statement	O
.	O
</s>
<s>
Use	O
a	O
NOP	B-Language
function	O
available	O
in	O
a	O
third-party	O
library	O
—	O
see	O
below	O
;	O
</s>
<s>
Define	O
a	O
custom	O
NOP	B-Language
function	O
,	O
as	O
in	O
the	O
following	O
example	O
(	O
using	O
the	O
ES6	O
arrow	O
function	O
syntax	O
)	O
:	O
</s>
<s>
The	O
AngularJS	B-Application
framework	O
provides	O
function	O
that	O
performs	O
no	B-Language
operations	I-Language
.	O
</s>
<s>
The	O
jQuery	B-Language
library	I-Language
provides	O
a	O
function	O
jQuery.noop( )	O
,	O
which	O
does	O
nothing	O
.	O
</s>
<s>
The	O
Lodash	B-Language
library	O
provides	O
a	O
function	O
_.noop( )	O
,	O
which	O
returns	O
undefined	O
and	O
does	O
nothing	O
.	O
</s>
<s>
As	O
with	O
C	O
,	O
the	O
;	O
used	O
by	O
itself	O
can	O
be	O
used	O
as	O
a	O
null	O
statement	O
in	O
Pascal	B-Application
.	O
</s>
<s>
The	O
Python	B-Language
programming	I-Language
language	I-Language
has	O
a	O
pass	O
statement	O
which	O
has	O
no	O
effect	O
when	O
executed	O
and	O
thus	O
serves	O
as	O
a	O
NOP	B-Language
.	O
</s>
<s>
It	O
is	O
primarily	O
used	O
to	O
ensure	O
correct	O
syntax	O
due	O
to	O
Python	B-Language
's	O
indentation-sensitive	B-Language
syntax	I-Language
;	O
for	O
example	O
the	O
syntax	O
for	O
definition	O
of	O
a	O
class	O
requires	O
an	O
indented	O
block	O
with	O
the	O
class	O
logic	O
,	O
which	O
has	O
to	O
be	O
expressed	O
as	O
pass	O
when	O
it	O
should	O
be	O
empty	O
.	O
</s>
<s>
The	O
'	O
:	O
'	O
 [ colon ] 	O
command	O
is	O
a	O
shell	O
builtin	O
that	O
has	O
similar	O
effect	O
to	O
a	O
"	O
NOP	B-Language
"	O
(	O
a	O
do-nothing	O
operation	O
)	O
.	O
</s>
<s>
It	O
is	O
not	O
technically	O
an	O
NOP	B-Language
,	O
as	O
it	O
changes	O
the	O
special	O
parameter	O
$	O
?	O
</s>
<s>
The	O
TeX	B-Application
typographical	O
system	O
's	O
macro	O
language	O
has	O
the	O
\relax	O
command	O
.	O
</s>
<s>
Many	O
computer	O
protocols	O
,	O
such	O
as	O
telnet	B-Protocol
,	O
include	O
a	O
NOP	B-Language
command	O
that	O
a	O
client	O
can	O
issue	O
to	O
request	O
a	O
response	O
from	O
the	O
server	O
without	O
requesting	O
any	O
other	O
actions	O
.	O
</s>
<s>
Such	O
a	O
command	O
can	O
be	O
used	O
to	O
ensure	B-Protocol
the	I-Protocol
connection	I-Protocol
is	I-Protocol
still	I-Protocol
alive	I-Protocol
or	O
that	O
the	O
server	O
is	O
responsive	O
.	O
</s>
<s>
A	O
NOOP	B-Language
command	O
is	O
part	O
of	O
the	O
following	O
protocols	O
(	O
this	O
is	O
a	O
partial	O
list	O
)	O
:	O
</s>
<s>
Note	O
that	O
unlike	O
the	O
other	O
protocols	O
listed	O
,	O
the	O
IMAP4	B-Protocol
NOOP	B-Language
command	O
has	O
a	O
specific	O
purpose	O
—	O
it	O
allows	O
the	O
server	O
to	O
send	O
any	O
pending	O
notifications	O
to	O
the	O
client	O
.	O
</s>
<s>
While	O
most	O
telnet	B-Protocol
or	O
FTP	B-Protocol
servers	I-Protocol
respond	O
to	O
a	O
NOOP	B-Language
command	O
with	O
"	O
OK	O
"	O
or	O
"	O
+OK	O
"	O
,	O
some	O
programmers	O
have	O
added	O
quirky	O
responses	O
to	O
the	O
client	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
ftpd	B-Protocol
daemon	O
of	O
MINIX	B-Operating_System
responds	O
to	O
NOOP	B-Language
with	O
the	O
message	O
:	O
</s>
<s>
200	B-Protocol
NOOP	B-Language
to	O
you	O
too	O
!	O
</s>
<s>
NOPs	B-Language
are	O
often	O
involved	O
when	O
cracking	B-Application
software	O
that	O
checks	O
for	O
serial	O
numbers	O
,	O
specific	O
hardware	O
or	O
software	O
requirements	O
,	O
presence	O
or	O
absence	O
of	O
hardware	O
dongles	B-Device
,	O
etc	O
.	O
</s>
<s>
Because	O
most	O
of	O
the	O
instructions	O
in	O
the	O
security	O
check	O
routine	O
will	O
be	O
unused	O
,	O
these	O
would	O
be	O
replaced	O
with	O
NOPs	B-Language
,	O
thus	O
removing	O
the	O
software	O
's	O
security	O
functionality	O
without	O
altering	O
the	O
positioning	O
of	O
everything	O
which	O
follows	O
in	O
the	O
binary	O
.	O
</s>
<s>
The	O
NOP	B-Language
opcode	B-Language
can	O
be	O
used	O
to	O
form	O
a	O
NOP	B-Language
slide	O
,	O
which	O
allows	O
code	O
to	O
execute	O
when	O
the	O
exact	O
value	O
of	O
the	O
instruction	O
pointer	O
is	O
indeterminate	O
(	O
e.g.	O
,	O
when	O
a	O
buffer	O
overflow	O
causes	O
a	O
function	O
's	O
return	O
address	O
on	O
the	O
stack	O
to	O
be	O
overwritten	O
)	O
.	O
</s>
