Digital Logic Circuit Design: Laboratory #4
Digital Logic Circuit Design: Laboratory #4
Faculty of Engineering
Mechatronics Department
Second Year
LABORATORY #4
a) Design using LogicWorks a half adder circuit using only XOR gates and NAND gates. Then during
the Lab construct the circuit and verify its operation.
A Sum
B
Carry
b) Design using LogicWorks a full adder circuit using only XOR gates and NAND gates. Then during
the Lab construct the circuit and verify its operation.
A
B
Sum
Cin
Cout
c) Use IC 7483 to add the two 4-bit numbers A and B shown in Table1. In LogicWorks, select
the chip 74-83 and use Binary switches for the bits of the two numbers and the input carry and
use Binary Probe for the sum and carry out.
0 Table 1.
1 A A A A B B B B
14
0 3 2 1 0 3 2 1 0 Sum Carry
1 16 CO
0 4
B3 1
1 7
B2 83 0 out
B1 15
0 11 S3 2 1
1 B0 1
S2
0 1 S1
6 1 0 0 1 0 0 1 0 1 0 1 1 0
A3 9
1 3 S0
8
A2
0 A1 0 1 1 0 1 0 1 1 0 0 0 1 1
1 10
A0 CI
0
1 1 0 0 1 0 1 0 0 1 1 0 1
13
1
0
1
0
d) Connect the adder-subtractor circuit as shown in Fig 2. Perform the following operations and
record the values of the output sum and the output carry Co.
14
9- 5 0 1 0 0 0 16 CO
B3
4 X
9 + 13 0 1 1 0 1 7
B2 83 X
11
B1 15 X
B0 S3 2
9- 9 0 0 0 0 0 S2 6 X
1 S1
10 + 6 0 0 0 0 1 3
A3 9
S0
A2
8
6 - 10 1 1 0 0 0 A1
10
A0 CI
13
Table 2.
M
e) Use IC7485 to compare the following two 4 bit numbers A and B. Record the outputs in table
3. Note that in LogicWorks you need to connect (A = B) input to logic 1 (as an indication that
previous stages are equal in multi-digit numbers) for correct results while this is not necessary
for the hardware.
A B Outputs 1
0
1001 0110 A>B 1 15 A3
1100 1110 A<B 0 13 A2 85 1
1 12 A1
A>B 5 0
0011 0101 A<B 0 10 A0
1 0
A=B 6
0101 0101 A=B 0 1 B3 A<B 7
1 14 B2
0 11 B1
Table 3. 9
1 B0
0 4 A>Bin
1 3 A=Bin
0 2 A<Bin
1
0
1
0
1
0
1
0