# Lab 2 (Part 2) - Exercise 6
## Question
1. Find the logic expression for output high only when input is multiple of 3, 4 or 7 for 3 bit system?
## Solution
* Expression in SOP form is `Y = A'.B.C + A.B'.C' + A.B.C`
* Final Expression after solving K-Map is `Y = A.B'.C' + B.C`, which is implemented here using logic gates.
## Truth Table for expression `Y = A'.B.C + A.B'.C' + A.B.C`
| A | B | C | Y |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |
led1:A
led1:C
sw1:1
sw1:2
sw1:3
sw2:1
sw2:2
sw2:3
sw3:1
sw3:2
sw3:3
vcc1:VCC
gnd1:GND
or1:A
or1:B
or1:OUT
and1:A
and1:B
and1:OUT
not1:IN
not1:OUT
not2:IN
not2:OUT
and2:A
and2:B
and2:OUT
and3:A
and3:B
and3:OUT