1.8Applications: web searching and logic circuits
Covers IGNOU MCS-212 §Programme guide topic "Application of Propositional Logic" (Web Page Searching, Logic Circuits); not in the unit PDF
Propositional logic is not only theory. Every search box and every chip in your phone uses it. This section shows two applications that the IGNOU programme guide lists for this unit: Boolean web searches and logic circuits. Unit 3 of this block studies circuits in much more depth.
Boolean searches
A search engine treats each keyword as a proposition about a page: “the page contains this word”. A query is a compound proposition; the engine returns the pages for which it is true.
| Logic | Meaning | Google syntax |
|---|---|---|
| page contains both words | ignou mca (a space means AND) | |
| page contains at least one | ignou OR nptel (OR in capitals) | |
| page does not contain the word | -syllabus (minus sign, no space after it) | |
| exact phrase | the words appear together, in order | "discrete mathematics" |
Library catalogues and many databases use the words AND, OR and NOT directly. In SQL the same idea appears in WHERE clauses: WHERE city = 'Khanna' AND NOT active.
Logic circuits
A logic circuit takes input signals that are 1 (high voltage, true) or 0 (low voltage, false) and produces output signals. It is built from gates:
| Gate | Logic | Output is 1 when |
|---|---|---|
| NOT (inverter) | the input is 0 | |
| AND | all inputs are 1 | |
| OR | at least one input is 1 |
Every compound proposition can be built as a circuit, and every circuit computes a compound proposition. Simplifying the formula with the laws of logic gives a smaller, cheaper circuit — this is the main topic of Unit 3.
Key takeaways
- In a Boolean search each keyword is a proposition about a page; AND, OR and NOT are , , .
- In Google: a space means AND,
OR(capital letters) means OR,-wordmeans NOT, quotes give an exact phrase. - Logic gates NOT, AND, OR implement , , with 1 and 0.
- Simplifying a formula with the laws of logic simplifies the circuit (Unit 3).
Practice questions
Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 6 · short answer
Describe the circuit for and give its input/output table.
Show worked answer
Circuit: and go into an OR gate; goes into a NOT gate; the outputs of the OR gate and the NOT gate go into an AND gate, whose output is the result. Table for inputs in the order 111, 110, 101, 100, 011, 010, 001, 000: = 1, 1, 1, 1, 1, 1, 0, 0; = 0, 1, 0, 1, 0, 1, 0, 1; output = 0, 1, 0, 1, 0, 1, 0, 0. The output is 1 exactly when at least one of , is 1 and is 0.