# Lab 3 - Exercise 1

## Question

1. Y=1 if A(MSB) B C D(LSB) = 1, 2, 4, 5, 6, 7, 8, 9, 11, 12, 13 else 0. Identify the Boolean logic for Y & Implement the same in WOKWI tool.

## Solution

* Final Expression after solving K-Map is `Y = A'.B + A.C' + C'.D + A.B'.D + A'.C.D'`, which is implemented here using logic gates.

## Truth Table for expression

| A | B | C | D | Y |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 0 |
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
sw4:1
sw4:2
sw4:3
not1:IN
not1:OUT
not2:IN
not2:OUT
not3:IN
not3:OUT
not4:IN
not4:OUT
and1:A
and1:B
and1:OUT
and2:A
and2:B
and2:OUT
and3:A
and3:B
and3:OUT
and4:A
and4:B
and4:OUT
and5:A
and5:B
and5:OUT
and6:A
and6:B
and6:OUT
and7:A
and7:B
and7:OUT
or1:A
or1:B
or1:OUT
or2:A
or2:B
or2:OUT
or3:A
or3:B
or3:OUT
or4:A
or4:B
or4:OUT