Browse Definitions :

logical negation symbol

What is the logical negation symbol (¬)?

The logical negation symbol is used in Boolean algebra to indicate that the truth value of the statement that follows is reversed. The symbol (¬) resembles a dash with a tail or the upper half of a rectangle. The arithmetic subtraction symbol (−) and tilde (~) are also used to indicate logical negation.

Illustration of the logical negation symbol
The logical negation symbol looks like a dash with a tail or the top half of a rectangle.

The negation symbol is a unary logical operator. It simply reverses the truth value of a given statement. Thus, if a statement is represented as A, then ¬A is the logical opposite or negation of A.

Thus, ¬A = not A
If A = true, ¬A = false
If A = false, ¬A = true
Also, ¬(¬A) = A

The symbol ¬ is often found within or preceding complex logical statements. However, its simplest use is with a single sentence.

If A: The sky is blue, then
¬A: The sky is not blue, or it is not true that the sky is blue

The rules for using the logical negation symbol become more complicated when the symbol appears in complex statements.

If A: The sky is blue, and
If B: The grass is green, then
¬(A V B): Neither the sky is blue nor is the grass green

Since the ~ and ¬ symbols can be used interchangeably, the above statement can also be represented logically as ~(A V B). The option for using either symbol depends on the user's preference or the context to denote negation.

Compound statements and the logical negation symbol

In ordinary, everyday language, statements can be conveyed by complete declarative sentences, such as the following:

  • The sky is blue.
  • It is raining.
  • Soccer is a popular global sport.

However, to express the logical relationships between such statements, it becomes cumbersome to write out the entire sentence at every occurrence of each statement. Therefore, specific individual statements are represented using capital letters as statement constants.

Thus, A, B and C can be used to represent the previous statements:

  • A: The sky is blue.
  • B: It is raining.
  • C: Soccer is a popular global sport.

Lowercase letters of the alphabet, beginning with p, are used as statement variables. Thus, one might say, "Consider any statement, p" or "Suppose that a pair of statements, p and q, are both true."

The logical negation symbol ¬ or ~ is one of the statement connectives or operators that can be used to form new compound statements from two or more statements. It simply reverses the truth value of any statement in front of which it appears. This statement can be simple or compound.

So, if the original is true, the ¬ statement is false. But if the original is false, the ¬ statement becomes true. Its meaning can be represented by this truth table:

p ¬p
True False
False True

Examples of ¬ with simple statements

p: The lion is roaring
¬p: The lion is not roaring

p: The sun is not shining
¬p: The sun is shining

Examples of ¬ with complex statements

p: The lion is roaring
q: The birds are chirping
¬(p V q): Neither the lion is roaring nor the birds are chirping

p: The lion is roaring
q: The birds are not chirping
¬(p V q): The lion is not roaring and the birds are chirping

The English expression "It is not the case that ..." serves the same function as the logical negation symbol. However, even the single word not is enough to convey negation.

In compound sentences, negation is always performed before logical AND and logical OR. Further, as in algebra -- according to the BODMAS rule, or order of operations -- all operations within parentheses are performed first.

ASCII code of the logical negation symbol

The American Standard Code for Information Interchange (ASCII) code, created in 1963, is a commonly used and universally accepted character encoding format for textual data in computing systems. Since 1969, ASCII has also been used as the standard for internet data.

The ASCII system uses unique values for 128 alphabetic (A through Z uppercase and lowercase letters), numeric and special characters and control codes. The ASCII code for the logical negation symbol is 170. It is part of the group of ASCII extended characters. The ¬ symbol is preceded by ® at 169 and followed by ½ at 171.

Typing the logical negation symbol on Windows systems

The ¬ symbol can be typed on Windows-based computers using the following keyboard shortcuts:

  • Hold down the Alt key on the keyboard.
  • While keeping the key pressed down, type the number 170. (As mentioned earlier, 170 is the number of the letter or symbol ¬ in the ASCII table.)
  • Let go of the Alt key.

Logical negation symbol in Unicode

The Unicode value U+00AC corresponds to the logical negation symbol ¬. The Alt code is defined as 0172; typing 0172 while holding down the Alt key will type this symbol in a Word or other document. When the Alt key is released, the symbol gets inserted in the document.

Logical negation operator in JavaScript

In JavaScript, the logical negation operator is expressed as ! (logical NOT). Also known as logical complement, the operator takes truth to falsity and vice versa. It is usually used with logical or Boolean values.

When used with non-Boolean values, it returns false if its single operand can be converted to true. Otherwise, it returns true. If the value can be converted to true, it is called truthy, and if it can be converted to false, it is called falsy.

Since the return value can always be converted to a Boolean primitive, the ! operator is considered a Boolean operator even though it can be used with operands that are not Boolean values.

See also: Mathematical symbols

This was last updated in August 2022

Continue Reading About logical negation symbol

  • User Datagram Protocol (UDP)

    User Datagram Protocol (UDP) is a communications protocol primarily used to establish low-latency and loss-tolerating connections...

  • Telnet

    Telnet is a network protocol used to virtually access a computer and provide a two-way, collaborative and text-based ...

  • big-endian and little-endian

    The term endianness describes the order in which computer memory stores a sequence of bytes.

  • Mitre ATT&CK framework

    The Mitre ATT&CK (pronounced miter attack) framework is a free, globally accessible knowledge base that describes the latest ...

  • timing attack

    A timing attack is a type of side-channel attack that exploits the amount of time a computer process runs to gain knowledge about...

  • privileged identity management (PIM)

    Privileged identity management (PIM) is the monitoring and protection of superuser accounts that hold expanded access to an ...

  • employee resource group (ERG)

    An employee resource group is a workplace club or more formally realized affinity group organized around a shared interest or ...

  • employee training and development

    Employee training and development is a set of activities and programs designed to enhance the knowledge, skills and abilities of ...

  • employee sentiment analysis

    Employee sentiment analysis is the use of natural language processing and other AI techniques to automatically analyze employee ...

Customer Experience
  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...

  • customer insight (consumer insight)

    Customer insight, also known as consumer insight, is the understanding and interpretation of customer data, behaviors and ...

  • buyer persona

    A buyer persona is a composite representation of a specific type of customer in a market segment.