Digital logic design
LAB REPORT
           SUBMITTED TO:
            SIR Ehtesham
            SUBMITTED BY:
        HAIQA SUHAIL(11770)
          Azka khalid (11794)
          Zahra abbas (11788
            Kinza (11755)
BSSE 23-4-A (SOFTWARE ENGINEERING) M
                                       3/8/2020
                                             0
                                            Lab# 06
                       Design And Implementation Of Full Adder
    Objective:
         Thee bits are added by using full adder
        Equipments:
   2.1 Breadboard
   2.2           ICs
   2.2.1         IC 7404
   2.2.2         IC 7483
   2.3 Wires
step# 1
Problem Statement
Add three inputs
step# 2
No. Of inputs = 3
No. Of outputs = 2
Step# 3
Assign distinct labels to inputs and outputs
Inputs = x,y,x
Outputs = c, s
Step# 4
                                                                 1
      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
Sum = x’y’z’+ x’yz’+ xy’z’+ xyz
Carry = x’yz+ xy’z’+ xyz’+ xyz
Step# 5
K-Map:
K-Map For Carry
It remains unchanged
                                              2
K-Map For Carry
Carry decreases to
Carry = xz + xy + yz
Step# 6
Circuit diagram:
                                           Lab# 07
                  Design and Implementation of Full Subtractor
    Objective:
       Thee bits are subtracted by using full adder
      Equipments:
                                                                 3
2.1 Breadboard
2.2         ICs
2.2.1       IC 7404
2.2.2       IC 7483
2.3 Wires
     Theory:
      Half-Subtractor circuit has a major drawback; we do not have the scope to
      provide Borrow in bit for the subtraction in Half-Subtractor. In case of full
      Subtractor construction, we can actually make a Borrow in input in the
      circuitry and could subtract it with other two inputs A and B. So, in the case
      of Full Subtractor Circuit we have three inputs, A which is minuend, B
      which is subtrahend and Borrow In. On the other side we get two final
      output, Diff (Difference) and Borrow out.
 Pin diagram
                                                                                   4
     Truth table:
Borrow In     Input A    Input B   DIFF   Borrow Out
0             0          0         0      0
0             1          0         1      0
0             0          1         1      1
0             1          1         0      0
1             0          0         1      1
1             1          0         0      0
1             0          1         0      1
1             1          1         1      1
     Circuit diagram:
                                                       5
                                          Lab# 08
                Design and Implementation of BCD to Excess-3
Objective:
      Understanding how ICs can be implemented to convert bcd to excess-3.
      Use of truth table and Logic Diagram to construct circuit.
Equipment:
2.1 Breadboard
2.2 ICs
       2.2.1 IC 7408
       2.2.2 IC 7432
       2.2.3 IC 7404
       2.2.4 IC 7486
2.3 Wires
Theory:
Excess-3 binary code is an unweighted self-complementary BCD code. Self-Complementary
property means that the 1’s complement of an excess-3 number is the excess-3 code of the 9’s
complement of the corresponding decimal number. This property is useful since a decimal
number can be nines complemented (for subtraction) as easily as a binary number can be ones
complemented; just by inverting all bits. For example, the excess-3 code for 3(0011) is 0110 and
to find the excess-3 code of the complement of 3, we just need to find the 1’s complement of
                                                                                               6
0110 -> 1001, which is also the excess-3 code for the 9’s complement of 3 -> (9-3) = 6.
Truth Table:
                  BCD Input                                    Excess-3 Output
     A           B        C              D           W           X         Y              Z
     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
     1           0           1            0           X           X           X           X
     1           0           1            1           X           X           X           X
     1           1           0            0           X           X           X           X
     1           1           0            1           X           X           X           X
                                                                                              7
   1      1   1   0   X   X   X   X
   1      1   1   1   X   X   X   X
K- Map:
                                      8
Equations:
     i.   E1= A + BC + BD
    ii.   E2= B’C + B’D + BC’D’
   iii.   E3= CD + C’D’ = C XOR D
   iv.    E4= D’
Circuit Diagram:
                                    9
                                          Lab# 09
              Design and Implementation of Excess-3 to BCD
 Objective:
 To successfully retrieve the information sent from the sender
 To securely send the data.
 To avoid stealing of data.
     Equipments:
2.1 Breadboard
2.2          ICs
2.2.1        IC 7408
2.2.2        IC 7432
          2.2.3        IC 7404
          2.2.4 IC 7486
2.3 Wires
     Theory:
     The availability of large variety of codes for the same discrete elements of information
      results in the use of different codes by different systems. A conversion circuit must be
      inserted between the two systems if each uses different codes for same information.
      Thus, code converter is a circuit that makes the two systems compatible even though each
      uses different binary code.
      A code converter is a circuit that makes the two systems compatible even though each
      uses a different binary code. To convert from binary code to Excess-3 code, the input lines
                                                                                              10
       must supply the bit combination of elements as specified by code and the output lines
       generate the corresponding bit combination of code. Each one of the four maps
       represents one of the four outputs of the circuit as a function of the four input variables.
      truth table:
   Kmap
K-map for B3:
                                                                                                11
   K-map for B2:
K-map for B1:
                   12
K-map for B0:
                13
Circuit diagram:
                   14
                                         Lab # 10
    Statement: Design and implementation of BCD to Decimal
     Decoder
    Objective:
       1. Understanding how ICs can be implemented to convert bcd to decimal decoder.
       2. Using Truth table and logic diagrams to construct circuit.
      Equipments:
       1. Breadboard.
       2. IC 74145
       3. Wires.
      Theory:
In computing and electronic systems, a binary-coded decimal (BCD) is a digital encoding
method for decimal numbers in which each digit is represented by its own binary sequence.
BCD is different from converting a decimal number to binary. For example, 45, when converted
to binary, is 101101, and when represented in BCD is 01000101.
    Pin diagram
                                                                                          15
 Truth table:
    Inputs                       Outputs
A   B   C    D   0   1   2   3    4   5    6   7   8   9
0   0   0    0   1   0   0   0    0   0    0   0   0   0
0   0   0    1   0   1   0   0    0   0    0   0   0   0
0   0   1    0   0   0   1   0    0   0    0   0   0   0
0   0   1    1   0   0   0   1    0   0    0   0   0   0
0   1   0    0   0   0   0   0    1   0    0   0   0   0
0   1   0    1   0   0   0   0    0   1    0   0   0   0
0   1   1    0   0   0   0   0    0   0    1   0   0   0
0   1   1    1   0   0   0   0    0   0    0   1   0   0
1   0   0    0   0   0   0   0    0   0    0   0   1   0
1   0   0    1   0   0   0   0    0   0    0   0   0   1
1   0   1    0   0   0   0   0    0   0    0   0   1   0*
1   0   1    1   0   0   0   0    0   0    0   0   0   1*
1   1   0    0   0   0   0   0    0   0    0   0   1   0*
1   1   0    1   0   0   0   0    0   0    0   0   0   1*
1   1   1    0   0   0   0   0    0   0    0   0   1   0*
1   1   1    1   0   0   0   0    0   0    0   0   0   1*
                                                            16
   Circuit diagram:
                                          Lab # 11
Statement: Design and implementation of magnitude comparator:
   Objective:
    1. Understanding how ICs can be implemented for magnitude comparator.
      2. Using Truth table and logic diagrams to construct circuit.
     Equipments:
      1. Breadboard.
      2. IC 7485
      3. Wires.
     Theory:
      A magnitude digital comparator is a combinational circuit that compares two digital or
      binary numbers (consider A and B) and determines their relative magnitudes in order to
      find out whether one number is equal, less than or greater than the other digital
      number.
      Three binary variables are used to indicate the outcome of the comparison as A>B, A<B,
      or A=B. The below figure shows the block diagram of a n-bit comparator which
                                                                                          17
  compares the two numbers of n-bit length and generates their relation between
  themselves.
 Pin diagram
 Truth table:
 A1          A0           B1           B0          A>B          A=B          A<B
 0           0            0            0            0            1            0
 0           0            0            1            0            0            1
 0           0            1            0            0            0            1
 0           0            1            1            0            0            1
 0           1            0            0            1            0            0
 0           1            0            1            0            1            0
 0           1            1            0            0            0            1
 0           1            1            1            0            0            1
 1           0            0            0            1            0            0
 1           0            0            1            1            0            0
 1           0            1            0            0            1            0
 1           0            1            1            0            0            1
 1           1            0            0            1            0            0
 1           1            0            1            1            0            0
 1           1            1            0            1            0            0
 1           1            1            1            0            1            0
                                                                                   18
 Circuit diagram:
                     19