Part (i): Logic Circuit Design
Step 1: Truth Table (Part (i)(a))
The inputs are two 2-bit binary numbers, AB and CD, meaning A, B, C, D are individual bits. The outputs L, G, E are high (1) based on the comparison of AB and CD: L is high when AB < CD, G is high when AB > CD, and E is high when AB = CD.
A0000000011111111B0000111100001111C0011001100110011D0101010101010101AB(dec)0000111122223333CD(dec)0123012301230123L(AB<CD)0111001100010000G(AB>CD)0000100011001110E(AB=CD)1000010000100001
Step 2: Boolean Expressions (Part (i)(b))
Using comparator logic, the simplified Boolean expressions for L, G, and E are:
E=(AXNORC)⋅(BXNORD)
L=A′C+(AXNORC)B′D
G=AC′+(AXNORC)BD′
Step 3: Circuit Diagram (Part (i)(c))
The circuit diagram is constructed using standard logic gates based on the Boolean expressions.
Let XAC=AXNORC and XBD=BXNORD.
- For E: An AND gate takes XAC and XBD as inputs.
- For L:
- An AND gate takes A′ (NOT A) and C as inputs.
- Another AND gate takes XAC, B′ (NOT B), and D as inputs.
- An OR gate takes the outputs of these two AND gates as inputs.
- For G:
- An AND gate takes A and C′ (NOT C) as inputs.
- Another AND gate takes XAC, B, and D′ (NOT D) as inputs.
- An OR gate takes the outputs of these two AND gates as inputs.
This circuit requires two XNOR gates, four NOT gates, five AND gates, and two OR gates.
Part (ii): 8-bit 2's Complement and Logic Gates
Step 4: 8-bit 2's Complement Computations (Part (ii)(a))
Step 5: Hexadecimal Addition (Part (ii)(b))
Add (93)16 and (DE)16:
9316+DE16
- Rightmost column: 3+E=3+14=1710. This is 116 with a carry of 1.
- Leftmost column: 9+D+1(carry)=9+13+1=2310. This is 716 with a carry of 1.
- Final carry: 1.
The sum is ∗17116∗.
Step 6: Generate NOT and OR gates using NAND gates ONLY (Part (ii)(c))
-
NOT gate using NAND gates:
A NOT gate can be created by connecting both inputs of a NAND gate to the same input signal. If the input is A, the output is (A⋅A)′=A′.
A⟶NAND⟶A′
-
OR gate using NAND gates:
An OR gate can be created using three NAND gates, based on De Morgan's theorem: A+B=(A′⋅B′)′.
- Invert input A using a NAND gate to get A′.
- Invert input B using a NAND gate to get B′.
- Feed A′ and B′ into a third NAND gate. The output will be (A′⋅B′)′=A′′+B′′=A+B.
ABA′B′⟶⟶⟶⟶NAND⟶A′NAND⟶B′NAND⟶A+B
What's next? Send 'em!