[1] Listed below are the NOP instruction for some CPU architectures: 0x0F 0x1F 0x00 0x0F 0x1F 0x40 0x00 0x0F 0x1F 0x44 0x00 0x00 0x66 0x0F 0x1F 0x44 0x00 0x00 0x0F 0x1F 0x80 0x00 0x00 0x00 0x00 0x0F 0x1F 0x84 0x00 0x00 0x00 0x00 0x00 0x66 0x0F 0x1F 0x84 0x00 0x00 0x00 0x00 0x00[2] In the case of both the NOP and NOPR instructions, the first 0 in the second byte is the "mask" value, the condition to test such as equal, not equal, high, low, etc.
(Thus, if the programmer forgets to write a sequence of statements, the program will fail to compile.)
Most C compilers generate no code for null statements, which has historical and performance reasons.
An empty block (compound statement) is also a NOP, and may be more legible, but will still have no code generated for it by the compiler.
The null statement is useless by itself, but it can have a syntactic use in a wider context, e.g., within the context of a loop: alternatively, or more tersely: (note that the last form may be confusing, and as such generates a warning with some compilers or compiler options, as semicolon usually indicates an end of function call instruction when placed after a parenthesis on the end of line).
The above code continues calling the function getchar() until it returns a \n (newline) character, essentially fast-forwarding the current reading location of standard input to the beginning of next line.
The Python programming language has a pass statement which has no effect when executed and thus serves as a NOP.
The ':' [colon] command is a shell builtin that has similar effect to a "NOP" (a do-nothing operation).
A NOOP command is part of the following protocols (this is a partial list): Note that unlike the other protocols listed, the IMAP4 NOOP command has a specific purpose—it allows the server to send any pending notifications to the client.
While most telnet or FTP servers respond to a NOOP command with "OK" or "+OK", some programmers have added quirky responses to the client.
For example, the ftpd daemon of MINIX responds to NOOP with the message:[23] NOPs are often involved when cracking software that checks for serial numbers, specific hardware or software requirements, presence or absence of hardware dongles, etc.