‹ Back to the paper
A shopping mall allows customers to shop using cash or credit card of any nationalised bank. It…
A shopping mall allows customers to shop using cash or credit card of any nationalised bank. It awards bonus points to their customers on the basis of criteria given below:
• The customer is an employee of the shopping mall and makes the payment using a credit card
OR
• The customer shops items which carry bonus points and makes the payment using a credit card with a shopping amount of less than ₹10,000/-
OR
• The customer is not an employee of the shopping mall and makes the payment not through a credit card but in cash for the shopping amount above ₹10,000/-
The inputs are:
(In all the above cases, 1 indicates yes and 0 indicates no.)
Output: X [1 indicates bonus point awarded, 0 indicates bonus point not awarded for all cases]
Draw the truth table for the inputs and outputs given above and write the POS expression for $X (C, A, E, I)$.
| INPUTS | |
|---|---|
| C | Payment through a credit card |
| A | Shopping amount is above ₹10,000/- |
| E | The customer is an employee of the shopping mall |
| I | Item carries a bonus point |
Answer
Answer
AIFrom the three criteria, bonus points are awarded ($X = 1$) when:
1. employee and credit card: $C = 1, E = 1$ (any A, I)
2. bonus item, credit card, amount less than ₹10,000: $I = 1, C = 1, A = 0$ (any E)
3. not an employee, cash (not credit card), amount above ₹10,000: $E = 0, C = 0, A = 1$ (any I)
So $X = CE + CA'I + C'AE'$.
Truth table:
The POS expression is the product of the maxterms (rows where $X = 0$):
$X(C, A, E, I) = \pi(0, 1, 2, 3, 6, 7, 8, 12, 13)$
$= (C + A + E + I)(C + A + E + I')(C + A + E' + I)(C + A + E' + I')(C + A' + E' + I)(C + A' + E' + I')(C' + A + E + I)(C' + A' + E + I)(C' + A' + E + I')$
(This reduces to $X = (C + A)(C + E')(C' + A' + E)(A + E + I)$.)
| C | A | E | I | X |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
From ISC 2023 Computer Science Paper 1, question 4(i).