0% found this document useful (0 votes)
31 views5 pages

Lab 5 (DLD)

Uploaded by

Heba Saqib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

Lab 5 (DLD)

Uploaded by

Heba Saqib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Heba Saqib 02-239232-061 Lab-05

TASK 1:
3-Bit Even Parity Generator:

Truth table:

x y z Parity
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1

1
Heba Saqib 02-239232-061 Lab-05

3-Bit Even Parity Checker:

Truth table:

x y z P C
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 0
0 1 1 0 0
0 1 1 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 0

2
Heba Saqib 02-239232-061 Lab-05

TASK 2:
2-bit Magnitude Comparator:

Truth table:
INPUTS OUTPUTS
A B A<B A=B A>B
A1 A0 B1 B0
0 0 0 0 0 1 0
0 0 0 1 1 0 0
0 0 1 0 1 0 0
0 0 1 1 1 0 0
0 1 0 0 0 0 1
0 1 0 1 0 1 0
0 1 1 0 1 0 0
0 1 1 1 1 0 0
1 0 0 0 0 0 1
1 0 0 1 0 0 1
1 0 1 0 0 1 0
1 0 1 1 1 0 0
1 1 0 0 0 0 1
1 1 0 1 0 0 1
1 1 1 0 0 0 1
1 1 1 1 0 1 0
3
Heba Saqib 02-239232-061 Lab-05

TASK 3:
Half Adder:

Truth table:
A B C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

Full Adder:

4
Heba Saqib 02-239232-061 Lab-05

Truth table:
X Y Z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1

You might also like