Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

UNIVERSITI TUNKU ABDUL RAHMAN

Faculty of Engineering and Green Technology


Bachelor of Engineering (HONS) Electronic Engineering

UGEA1323 DIGITAL ELECTRONICS

Lab Report 2

Student(s) detail(s):
Name ID. No.

Date of Submission:
Introduction
A digital circuit known as a full adder conducts addition on three inputs and generates
two outputs. A and B make up the first two inputs, and C-IN is the third input. The normal output
is denoted as S, which represents SUM, while the output carry is designated as C-OUT. A full
adder logic is created in a way that it can combine eight inputs to produce a byte. The full adder
is generally used as a component in a cascade of adders where the circuit performs the arithmetic
sum of eight, sixteen or thirty-two-bit binary numbers (bilal (2019)). The input and output
relationships of the digital combinational circuit are represented by its Boolean Expression.
Digital computers and calculators perform the various arithmetic operations on numbers
that are represented in binary form. Full adder is actual logic circuits that perform binary addition
in a digital system that account for values carried in as well from the previous less-significant
stage. The full adder is usually a component in a cascade of adders, which add 8, 16, 32, etc. bit
binary numbers. The full adder had three inputs, A, B, and Cin, and two outputs, Sum and Cout.

A, B, and Cin are the three inputs that a full adder requires. Where Cin is the carry bit
from the previous step of binary addition, and A and B are the two binary digits. The bits A, B,
and Cin are XORed to get the entire adder's output sum. While the AND and OR operations are
used to retrieve the carry output bit (Cout)(tutorialspoint, n.d.).

Binary Coded Decimal, or BCD, is another process for converting decimal numbers into
their binary equivalents. Each digit of a decimal number is represented as a set of bits in this type
of binary encoding. You have the option of using 4-bit or 8-bit for this encoding (usually 4-bit is
preferred). Compared to the current binary system, it is a quick and effective mechanism for
converting decimal numbers into binary numbers. They are typically utilised in digital displays
where manipulating data might be challenging. BCD is so important in this situation since each
digit is manipulated as a separate single sub-circuit.
The four bit binary equivalent of each decimal digit in the integer and fractional sections
of a decimal number is used to represent the BCD equivalent of that value. the weights of the
various bits in the four-bit groups, starting from MSB and moving towards LSB, are represented
by the numbers 8, 4, 2, and 1 in the BCD code, which is more specifically known as 8421 BCD
code. It is a weighted code as a result of this feature since each bit in the four-bit group
representing a particular decimal digit has a certain weight (GeeksforGeeks. (2020)).
A combinational circuit known as a BCD-invalid code detector may identify illegitimate
or invalid BCD. The term "Binary Coded Decimal" refers to the four-bit binary equivalent of
each decimal. For single-digit decimal, BCD and binary are equivalent. Only the first 10 binary
numbers in BCD are accepted. The other five are invalid. BCD codes have the benefit of being
fairly comparable to the decimal system. Only the binary equivalents of the decimal numerals 0
to 9 need to be retained. The fact that BCD addition and subtraction follow different sets of rules
is one of the drawbacks of BCD codes. The BCD calculation is a little more difficult. To express
a decimal number in BCD, more bits are required than in binary. BCD is therefore less effective
than binary.

Figure 2: A Binary-Code-Detector Diagram


Objectives
(a) Design, construct and test a full adder
(b) Design, construct and test a BCD-invalid code detector circuit that implements the
simplified expression

Equipments and components


(a) 7486 XOR IC, 7408 AND IC, 7432 OR IC, 330 Ω resistor, 1 kΩ resistor, Push button,
LEDs
(b) 7400 IC, LED, 330 Ω resistor, 1 kΩ resistor

Procedure
Experiment Part I
1. Construct a truth table to list all possible inputs and the corresponding outputs.
2. Write the Boolean equations for each of the full adder outputs.
3. Draw a logic diagram of the full adder based on the Boolean equations.
4. Construct a full adder using XOR, AND and OR gate IC. Use push buttons as input and
LEDs to display the output.
5. Verify your circuit and demonstrate to the lecturer in charge.

Experiment Part II
1. Develop the truth table for a BCD-invalid code detector.
2. Use a Karnaugh map to obtain the minimum sum of products expression.
3. The circuit below can be used to implement the logic expression. The circuit
is designed with output inverted. X is used to light the LED with a LOW logic level. The
design requires only two gates but it requires two different ICs. Change the circuit so
that it can be implemented with only one 7400 IC. Draw the new circuit.

Figure 3: An implementation of the BCD-invalid code detector


4. Construct and test the circuit. Draw a logic diagram with pin numbers and IC numbers
before beginning construction. Insert your hookup wires away from the IC pins so that
you have room to check voltages on the pins of the IC.
5. Verify your circuit and demonstrate to the lecturer in charge.

Results and Discussion


Truth Table for Part I
A B Cin Sum Cout

0 0 0 0 0

0 0 1 1 0

0 1 0 1 0

0 1 1 0 1

1 0 0 1 0

1 0 1 0 1

1 1 0 0 1

1 1 1 1 1

'
𝑆𝑢𝑚 = 𝐴'𝐵'𝐶𝑖𝑛 + 𝐴'𝐵𝐶𝑖𝑛 + 𝐴'𝐵𝐶𝑖𝑛 + 𝐴𝐵𝐶𝑖𝑛
= (𝐴 ⊕ 𝐵) ⊕ 𝐶𝑖𝑛
'
𝐶𝑜𝑢𝑡 = 𝐴'𝐵𝐶𝑖𝑛 + 𝐴𝐵'𝐶𝑖𝑛 + 𝐴𝐵𝐶𝑖𝑛 + 𝐴𝐵𝐶𝑖𝑛
= (𝐴 + 𝐵)𝐶𝑖𝑛 + 𝐴𝐵
Figure 4: Logic Diagram of the Full Adder based on Boolean Equations

Truth table for BCD-invalid code detector

D C B A X

0 0 0 0 0

0 0 0 1 0

0 0 1 0 0

0 0 1 1 0

0 1 0 0 0

0 1 0 1 0

0 1 1 0 0

0 1 1 1 0

1 0 0 0 0

1 0 0 1 0

1 0 1 0 1

1 0 1 1 1

1 1 0 0 1

1 1 0 1 1

1 1 1 0 1
1 1 1 1 1

Figure 5: Karnaugh map of BCD-invalid code detector

In experiment 1, after testing all the possible input for 3 bits, a truth table can be plotted.
According to the truth table that was plotted, if there is only a single ‘1’ within the 3 input, Sum
will output ‘1’ while Cout will output ‘0’. On the contrary, Sum has an output of ‘0’ and Cout
will output ‘1’ when there are only two ‘1s’ within the 3 inputs. However, both Sum and Cout
will only output ‘1’ at the same time when all three inputs are ‘1’. This results in a fully
functioning 2 bit full adder.

After plotting the truth table for BCD-invalid code detector, the simplest version of SOP is easily
found using the Karnaugh map drawn using the results of the said truth table. Having the
simplest algebra equation, the logic circuit can be designed with different logic gates that were
later all changed to the form of NAND gates. Having the characteristic of being a universal gate,
any other gates can be translated in terms of NAND gate which simplifies the use of different
gates. After the full NAND gate logic circuit is constructed, the actual circuit is then constructed
and tested upon with 4 bits inputs. It results in a fully functional BCD-invalid code detector,
outputting ‘1’ when the input is above the bit number ‘1001’, while outputting ‘0’ otherwise.

Conclusion
With the help of the universal gate, NAND gate the full adder circuit could be constructed with
purely NAND Gate to minimize the IC used, making the process more efficient.Given multiple
circuits of full adder being wired together cascading, more complex equations can be solved.

With the help of Karnaugh map, the simplest form of algebra equation can be found to get the
simplest circuit there is. Help make the process of constructing both circuits much easier, while
being simple.
References
bilal (2019). Introduction to Full Adder. [online] projectiot123 Technology
Information Website worldwide. Available at:
https://projectiot123.com/2019/07/20/introduction-to-full-adder/ [Accessed 4 Apr.
2023].

www.tutorialspoint.com. (n.d.). Full Adder in Digital Electronics. [online] Available


at:
https://www.tutorialspoint.com/full-adder-in-digital-electronics#:~:text=What%20is%
20a%20Full%20Adder [Accessed 4 Apr. 2023].

GeeksforGeeks. (2020). BCD or Binary Coded Decimal. [online] Available at:


https://www.geeksforgeeks.org/bcd-or-binary-coded-decimal/.

You might also like