Which one of the following is not a logical operator?
- (a)NOT
- (b)OR
- (c)AND
- (d)Division
Correct — D, Division. Logical operators take truth values and return truth values. NOT takes one operand and reverses it, turning true into false and false into true. AND takes two and returns true only when both are true. OR takes two and returns true when at least one is true. Those three are the complete basis of Boolean algebra — every other logical connective, including exclusive-OR, implication and equivalence, can be built from them — and each corresponds to a physical logic gate in the circuits from which processors are made. Division belongs to a different family. It takes two numbers and returns a number, and it is one of the arithmetic operators alongside addition, subtraction and multiplication. Inside a processor the two families are even handled by different parts of the machine: the arithmetic and logic unit contains both, but arithmetic operations set numeric results and carry or overflow flags, while logical operations produce a truth value that a branch instruction can test. A useful check is to ask what the operator returns. If the answer is 'true or false', it is logical; if the answer is 'a number', it is not.
- (a)NOT — The unary logical operator, also called negation or complement. It reverses a truth value, and the NOT gate is the simplest gate in any logic family.
- (b)OR — The logical disjunction — true when at least one operand is true. It is one of the three operators from which all of Boolean algebra is built.
- (c)AND — The logical conjunction — true only when both operands are true. Like OR and NOT, it has a corresponding gate and a two-line truth table.
Boolean algebra works with two values, usually written 1 and 0 or true and false, and three basic operations: complement or NOT, disjunction or OR, and conjunction or AND. George Boole set out the algebra in the middle of the nineteenth century and Claude Shannon showed in 1937 that it describes switching circuits, which is why every digital computer is built on it. The operators are realised as gates: an inverter for NOT, and two-input gates for AND and OR. Two derived gates, NAND and NOR, are called universal because either one on its own can be wired to reproduce all three basic operations, which is why real chips are often built almost entirely from them.
Questions of this shape put three members of one family next to an intruder from another and ask you to spot the outsider, so the fastest route is to name the family rather than to test each item. Here the family is Boolean logic, and division is arithmetic. The same trick appears with relational operators — less than, greater than, equal to — which are a third family again: they take numbers and return a truth value, which is what lets them feed into a logical expression. Keep the three families straight and this whole class of question becomes mechanical. Note also that some programming languages use similar-looking symbols for bitwise operations, which apply AND, OR and NOT to each bit position of a number rather than to a single truth value; those are still logical operations, just applied across a word.
- NOT, AND and OR are the three basic logical operators of Boolean algebra; NOT takes one operand, AND and OR take two.
- AND is true only when both operands are true; OR is true when at least one is true; NOT reverses its operand.
- NAND and NOR are universal gates — either alone can reproduce NOT, AND and OR.
- Division, along with addition, subtraction and multiplication, is an arithmetic operator: it returns a number, not a truth value.
- Relational operators such as less than and equal to form a third family — numeric inputs, truth-value output.
Ask what the operator returns. Truth value means logical; a number means arithmetic.
- Treating exclusive-OR as one of the basic operators. It is derived from the three basic ones, not a fourth primitive.
- Confusing bitwise operations with arithmetic because they are written on numbers. They still apply the logical rule, one bit position at a time.
- Assuming the odd one out must be the least familiar name. Here it is the most familiar — division.
As an odd-one-out item mixing operator families, or as a truth-table item asking for the output of a small combination of gates.
Which one of the following is not an application software?
- (a) Spreadsheet
- (b) AutoCAD
- (c) MS PowerPoint
- (d) Linker
Answer(d) Linker
The same odd-one-out construction on the neighbouring topic. Three items belong to one category and the fourth to another, and the work is in naming the category before testing the members.
- practice — not a real PYQ
Which one of the following logic gates is described as universal, because circuits using only that gate can reproduce NOT, AND and OR?
- (a)XOR
- (b)NAND
- (c)Buffer
- (d)AND
Answer(b) NAND — NOR shares the property, which is why real integrated circuits are often built almost entirely from one or the other.
- practice — not a real PYQ
For two Boolean variables A and B, the expression A AND B is true in how many of the four possible combinations of their values?
- (a)One
- (b)Two
- (c)Three
- (d)Four
Answer(a) One — only when both A and B are true. The OR of the same two variables would be true in three of the four combinations.