You are on page 1of 12

Digital Electronics Circuits Laboratory

(EC2P004)

Experiment - 1: Introduction to Logic Gates


Date: 21th Jan 2021

Group No: 15

Members

Sidharth A Narayanan (20EC01016)

Deepak Meena (20EC01050)

Objectives of the Experiment

To design and implement 4 bit :

1. Binary to Gray Code converter

2. Gray Code to Binary converter

3. Binary Coded Decimal (BCD) to Excess - 3 converter

4. Exess - 3 to BCD converter

Software Used

Logisim

Part 1: Binary to Gray Code converter

Truth table for Binary to Gray Code converter

B3 B2 B1 B0 G3 G2 G1 G0

0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 1

0 0 1 0 0 0 1 1

0 0 1 1 0 0 1 0

0 1 0 0 0 1 1 0

0 1 0 1 0 1 1 1

0 1 1 0 0 1 0 1

0 1 1 1 0 1 0 0

1 0 0 0 1 1 0 0

1 0 0 1 1 1 0 1

1 0 1 0 1 1 1 1

1 0 1 1 1 1 1 0

1 1 0 0 1 0 1 0

1 1 0 1 1 0 1 1

1 1 1 0 1 0 0 1

1 1 1 1 1 0 0 0

K - Map obtained for G3,G2,G1 and G0

G3 = B3

G2 = B3’B2 + B3B2’

G1 = B2’B1 + B2B1’

G0 = B1’B0 + B1B0’

We already know that X’Y + XY’ = XOR (X,Y). Using the


knowledge we can design the circuit with the following truth
table

Digital Circuit of Binary to Gray Code converter in Logisim

Part 2: Gray Code to Binary converter

• We have been given the clue that this circuit can be made
only by using XOR gates. We have the 4 K-Maps for each
of the 4 outputs as follows

Truth table for Gray Code to Binary converter

G3 G2 G1 G0 B3 B2 B1 B0

0 0 0 0 0 0 0 0

0 0 0 1 0 0 0 1

0 0 1 0 0 0 1 1

0 0 1 1 0 0 1 0

0 1 0 0 0 1 1 1

0 1 0 1 0 1 1 0

0 1 1 0 0 1 0 0

0 1 1 1 0 1 0 1

1 0 0 0 1 1 1 1

1 0 0 1 1 1 1 0

1 0 1 0 1 1 0 0

1 0 1 1 1 1 0 1

1 1 0 0 1 0 0 0

1 1 0 1 1 0 0 1

1 1 1 0 1 0 1 1

1 1 1 1 1 0 1 0
We have :

B3 = G3

B2 = G3’G2 + G3G2’ (can be directly done using an XOR gate)

B1 & B0 are evaluated as shown below

Digital Logic Circuit of Gray code to Binary Converter using


Logisim
Part 3: BCD to Excess-3 converter

The truth table for BCD to Excess-3 converter

B3 B2 B1 B0 E3 E2 E1 E0

0 0 0 0 0 0 1 1

0 0 0 1 0 1 0 0

0 0 1 0 0 1 0 1

0 0 1 1 0 1 1 0

0 1 0 0 0 1 1 1

0 1 0 1 1 0 0 0

0 1 1 0 1 0 0 1

0 1 1 1 1 0 1 0

1 0 0 0 1 0 1 1

1 0 0 1 1 1 0 0

• We have 4 inputs and 4


outputs. Therefore, we would
B̄1B̄0 B̄1B0 B1B0 B1B̄0
have to find all the 4 K-Maps B̄3B̄2  1 0 0 1
associated with each output.

B̄3B2 1 0 0 1
For G0 we have the following K- B B - - - -
3 2
map, resulting in the expression

B3B̄2 1 0 - -
B0’ (hypens are for don’t care bits)

Similarly we have the expression

B̄1B̄0 B̄1B0 B1B0 B1B̄0


B̄3B̄2
1 0 1 0
 
E1 = B1B0 + B1’B0’

B̄3B2 1 0 1 0
B3B2 - - - -
B3B̄2 1 0 - -

B̄1B̄0 B̄1B0 B1B0 B1B̄0


B̄3B̄2  0 1 1 1
B̄3B2 1 0 0 0 E2 = B2’B0+B2’B1+B2B1’B0’

B3B2 - - - -
B3B̄2 0 1 - -

B̄1B̄0 B̄1B0 B1B0 B1B̄0


B̄3B̄2  0 0 0 0
B̄3B2 0 1 1 1
E3 = B3 + B2B0 + B2B1

B3B2 - - - -
B3B̄2 1 1 - -
Logic Circuit for BCD to Excess-3 Converter

Ouput K-Map from Logisim for BCD to Excess-3 Converter



Part 4: Excess-3 to BCD converter

The truth table for BCD to Excess-3 converter

E3 E2 E1 E0 B3 B2 B1 B0

0 0 1 1 0 0 0 0

0 1 0 0 0 0 0 1

0 1 0 1 0 0 1 0

0 1 1 0 0 0 1 1

0 1 1 1 0 1 0 0

1 0 0 0 0 1 0 1

1 0 0 1 0 1 1 0

1 0 1 0 0 1 1 1

1 0 1 1 1 0 0 0

1 1 0 0 1 0 0 1

• Just as with the former logic circuit, we obtain this one


also from basic boolean algebraic operations 


E E E E
Combinational Analysis Table from Logisim with
unnecessary part darkened out / cropped out

E E E E

Digital Circuit of Excess-3 to BCD converter in Logisim


You might also like